Resources
Payment Requests
Request a payment from a Joey user on the XRP Ledger.
There's no separate payment-request format or tool for Joey. To request a payment, connect to Joey and send a Payment transaction for the user to approve. This works with both the browser extension and the mobile app.
Browser extension
import { waitForJoey } from '@joeywallet/wallet-sdk'
const joey = await waitForJoey()
const { accounts } = await joey.connect()
const payer = accounts[0].address
const result = await joey.signAndSubmitTransaction({
tx_json: {
TransactionType: 'Payment',
Account: payer,
Destination: 'rYourMerchantAddress…',
DestinationTag: 12345, // your invoice or customer reference
Amount: '2500000', // 2.5 XRP, in drops
},
})
const hash = result.hash // confirm the payment on-ledger by hash
Mobile (WalletConnect)
const result = await provider.request(
{
method: 'xrpl_signTransaction',
params: {
tx_json: {
TransactionType: 'Payment',
Account: payer, // the session account
Destination: 'rYourMerchantAddress…',
DestinationTag: 12345,
Amount: '2500000',
},
submit: true,
},
},
'xrpl:0',
);
const hash = result.tx_json.hash;
Tips
- Identify the payment with a
DestinationTag, or withMemosfor longer references such as invoice IDs. - Request tokens with an issued-currency amount:
{ currency: 'USD', issuer: 'r…', value: '25' }. The payer needs a trust line for that token. - Confirm on-ledger. Look up the transaction by hash and check it was validated with
tesSUCCESSand delivered the amount you expect (delivered_amount), before treating it as paid.