Capabilities
Set up
1
Mirror the provider
Create a settlement account for the provider in each currency it holds. Its balance is the money you have at the provider, as your ledger sees it. See Ledgers and accounts.
2
Listen to the provider
Take the provider’s webhooks, or poll it, in your own code.
3
Post each movement
For every movement the provider confirms, post an entry that moves the settlement account, with the provider’s transaction id as
externalRef.Record a credit
Money arrived at the provider for a customer: debit settlement, credit the customer’s wallet.Never post twice
Providers send the same event more than once. Two things stop it posting twice:Idempotency-Key. Derive it from the provider’s transaction id, as above, so a retry with the same key returns the first entry. See Idempotency.uniqueExternalRef: true. Only one live entry can hold thatexternalRef. A second is refused with409 EXTERNAL_REF_EXISTS, even with a different key or when two workers race.