Prerequisites
- An Agent API session and wallet-operation privileges.
- An approved Legal Identity that includes a country.
- A provider enabled for that identity’s country and the wallet’s currency.
- Provider confirmation that the environment uses test value, with a permitted positive amount and test payment method.
Referer. Replace every placeholder before sending a request.
1. Read the starting balance and providers
amount, reserved, currency, and timestamp. Record all four. Do not apply a cents-to-units conversion without the provider’s documented value convention.
The provider response contains a Providers array. Map the selected provider’s fields as follows:
An empty provider list means no discovered provider is available to this account in its current context. Ask the operator which provider is available for the account’s country and currency.
2. Retrieve provider options
Send the selectedserviceId and serviceProvider:
id and use that GUID as transactionId to retrieve its current information:
id, state, started, serviceId, serviceProvider, and options. Depending on the provider’s stage, it can also include clientUrl and ended. Options can initially be null.
Treat option fields as provider-defined data. If clientUrl requires user interaction, present the trusted provider page using your application’s reviewed redirect policy. Complete the provider’s required interaction before expecting a final result.
3. Review and initiate the purchase
Prepare the same provider identifiers, the acceptedcurrency, and the approved positive test amount. Replace the quoted amount placeholder below with a JSON number.
Review the provider, amount, currency, fees, and payment method with the user. Then explicitly initiate:
4. Observe the purchase
Use the purchase transaction ID in the same retrieval operation:
Confirm when your provider considers the payment settled. A balance change alone cannot identify a specific purchase when other transactions occur at the same time.
5. Reconcile and retain evidence
404 is not proof that no payment occurred.
Recover from failures
The optional
transactionId request field is not a documented idempotency guarantee. Do not automatically retry a purchase initiation when its outcome is unknown. Keep your application’s duplicate-submission controls separate from payment status.