# Send XRP This tutorial explains how to send a direct XRP Payment using `xrpl.js` for JavaScript, `xrpl-py` for Python, `xrpl4j` for Java or `XRPL_PHP` for PHP. First, we step through the process with the [XRP Ledger Testnet](/docs/concepts/networks-and-servers/parallel-networks). Then, we compare that to the additional requirements for doing the equivalent in production. Check out the [Code Samples](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples) for a complete version of the code used in this tutorial. ## Prerequisites script script To interact with the XRP Ledger, you need to set up a dev environment with the necessary tools. This tutorial provides examples using the following options: - **JavaScript** with the [xrpl.js library](https://github.com/XRPLF/xrpl.js/). See [Get Started Using JavaScript](/docs/tutorials/javascript/build-apps/get-started) for setup steps. - **Python** with the [`xrpl-py` library](https://xrpl-py.readthedocs.io/). See [Get Started using Python](/docs/tutorials/python/build-apps/get-started) for setup steps. - **Java** with the [xrpl4j library](https://github.com/XRPLF/xrpl4j). See [Get Started Using Java](/docs/tutorials/java/build-apps/get-started) for setup steps. - **PHP** with the [XRPL_PHP library](https://github.com/AlexanderBuzz/xrpl-php). See [Get Started Using PHP](/docs/tutorials/php/build-apps/get-started) for setup steps. - **Go** with the [xrpl-go library](https://github.com/Peersyst/xrpl-go). See [Get Started Using Go](/docs/tutorials/go/build-apps/get-started) for setup steps. ## Send a Payment on the Test Net ### 1. Get Credentials To transact on the XRP Ledger, you need an address and secret key, and some XRP. The address and secret key look like this: JavaScript // Example credentials const wallet = xrpl.Wallet.fromSeed("sn3nxiW7v8KXzPzAqzyHXbSSKNuN9") console.log(wallet.address) // rMCcNuTcajgw7YTgBy1sys3b89QqjUrMpH Python # Example Credentials ---------------------------------------------------------- from xrpl.wallet import Wallet from xrpl.constants import CryptoAlgorithm test_wallet = Wallet.from_seed(seed="sn3nxiW7v8KXzPzAqzyHXbSSKNuN9", algorithm=CryptoAlgorithm.SECP256K1) print(test_wallet.address) # "rMCcNuTcajgw7YTgBy1sys3b89QqjUrMpH" Java // Create a KeyPair KeyPair randomKeyPair = Seed.ed25519Seed().deriveKeyPair(); // Get the Classic address from testWallet Address classicAddress = randomKeyPair.publicKey().deriveAddress(); PHP // Example credentials $wallet = Wallet::fromSeed("sEd7zwWAu7vXMCBkkzokJHEXiKw2B2s"); print_r('Wallet Address: ' . $wallet->getAddress() .PHP_EOL); // rMCcNuTcajgw7YTgBy1sys3b89QqjUrMpH Go // Example credentials const WalletSeed = "sEd7zwWAu7vXMCBkkzokJHEXiKw2B2s" w, err := wallet.FromSeed(WalletSeed, "") if err != nil { panic(err) } The secret key shown here is for example only. For development purposes, you can get your own credentials, pre-funded with XRP, on the Testnet using the following interface: Get Testnet credentials div Ripple provides the [Testnet and Devnet](/docs/concepts/networks-and-servers/parallel-networks) for testing purposes only, and sometimes resets the state of these test networks along with all balances. As a precaution, **do not** use the same addresses on Testnet/Devnet and Mainnet. When you're building production-ready software, you should use an existing account, and manage your keys using a [secure signing configuration](/docs/concepts/transactions/secure-signing). ### 2. Connect to a Testnet Server First, you must connect to an XRP Ledger server so you can get the current status of your account and the shared ledger. You can use this information to [automatically fill in some required fields of a transaction](/docs/references/protocol/transactions/common-fields#auto-fillable-fields). You also must be connected to the network to submit transactions to it. The following code connects to a public Testnet servers: JavaScript // You can also use a