Skip to content
GitHub

Create an incoming payment

Last reviewed: Nov 10, 2026

The Create Incoming Payment API lets you request the creation of an incoming payment resource. An incoming payment resource must be created before any payments can be sent to a wallet address.

The code snippets below let an authorized client, with the requisite grant, request an incoming payment resource for $10 USD at a given wallet address. After the resource is created, one or more payments up to $10 can be sent to the wallet address.

We recommend you create an account on the Interledger test network. Creating an account allows you to test your client against the Open Payments APIs by using an ILP-enabled wallet funded with play money.

Authenticated client required
Prerequisites(opens in a new tab)
Initial configuration

If you’re using JavaScript, only do the first step.

  1. Add "type": "module" to package.json.

  2. Add the following to tsconfig.json

    {
    "compilerOptions": {
    "target": "ES2022",
    "module": "ES2022"
    }
    }
// Import dependencies
import { createAuthenticatedClient } from '@interledger/open-payments'
// Initialize client
const client = await createAuthenticatedClient({
walletAddressUrl: CLIENT_WALLET_ADDRESS,
privateKey: PRIVATE_KEY_PATH,
keyId: KEY_ID
})
// Get wallet address information
const walletAddress = await client.walletAddress.get({
url: WALLET_ADDRESS
})
// Create incoming payment
const incomingPayment = await client.incomingPayment.create(
{
url: walletAddress.resourceServer,
accessToken: INCOMING_PAYMENT_ACCESS_TOKEN
},
{
walletAddress: WALLET_ADDRESS,
incomingAmount: {
value: '1000',
assetCode: 'USD',
assetScale: 2
},
expiresAt: new Date(Date.now() + 60_000 * 10).toISOString()
}
)
// Output
console.log('INCOMING_PAYMENT_URL =', incomingPayment.id)