Skip to content
GitHub

Wallet addresses

Each payment account belonging to your users (for example, your customers) must have at least one associated wallet address for the account to be able to send and receive payments over Interledger and Open Payments. A wallet address serves as a publicly shareable standardized ID for a payment account.

Create wallet addresses

There are a few ways in which you can create wallet addresses.

Create wallet addresses through a script

Writing your own script that loops through your list of account is one way to batch create wallet addresses for your existing account holders.

Ensure your script calls the createWalletAddress GraphQL mutation.

mutation CreateWalletAddress($input: CreateWalletAddressInput!) {
createWalletAddress(input: $input) {
code
success
message
walletAddress {
id
createdAt
publicName
url
asset {
code
id
scale
}
}
}
}

We strongly recommend you store at least the walletAddress.id in your internal database to be able to reference the account and wallet address later.

Create wallet addresses in response to a webhook event

The wallet_address.not_found event fires when a wallet address is requested through the Open Payments Get Wallet Address API, but Rafiki can’t find the address.

When you receive the event, look up the associated account in your system, then call the createWalletAddress mutation to create a wallet address for the account.

The mutation and example JSON request/response is the same as what’s given above.