Transactions
Understanding TransactionsCopied!
UnblockPay's API enables seamless conversion between fiat currencies and stablecoins (and vice-versa). The process involves two key components: a sender
and a receiver
— these can be either fiat sources (like bank accounts) or crypto sources (like blockchain wallets). Our API supports these transaction types:
-
Fiat to stablecoins (Pay-in)
-
Stablecoins to fiat (Payout)
-
Stablecoin to stablecoin (soon)
-
Fiat to fiat (soon)
We support multiple stablecoins and fiat payment rails.
For payment methods like wire transfers and crypto transfers where UnblockPay cannot pull funds directly, we provide sender_deposit_instructions
containing deposit addresses where your customer (or you acting on their behalf) can initiate the transaction. Once your customer completes the deposit, funds automatically move to the specified receiver without needing additional API calls.
Transaction StatesCopied!
A payout transaction can be in one of the following status:
-
awaiting_deposit
: UnblockPay is waiting to receive funds from the customer before processing the transfer. This state occurs only when awaiting customer deposits (such as crypto deposits). -
processing
: This indicates that UnblockPay has received your funds and is processing the payout to your customer. -
completed
: The payout has been completed successfully. The funds have been delivered to the specified destination. -
failed
: UnblockPay attempted the payment but received a failure notification. The funds have been returned to UnblockPay and will be refunded to the sender. -
refunded
: The funds have been returned to the original sender's account. -
cancelled
: The payout has been cancelled. Payouts can only be cancelled when in theawaiting_deposit
state. -
error
: There was a problem preventing UnblockPay from processing this transfer. Manual intervention may be required to resolve the issue. Please contact our support team if you haven't already been contacted about this transfer.
Please note that a payout will always progress from awaiting_deposit
→ processing
→ completed
. It can never go backwards.
A transaction can only be set to cancelled
status from awaiting_deposit
status by making a request to our PUT /transactions/{id} endpoint.
Testing Scenarios: Sandbox MocksCopied!
To see a payout status in the sandbox environment, we have mocked payouts transactions to facilitate. You can easily test these scenarios by hitting our GET/transactions/{id}
endpoint with the following IDs:
Payout status |
Mocked transactions IDs |
---|---|
awaiting_deposit |
00000000-0000-0000-0000-000000000000 |
processing |
11111111-1111-1111-1111-111111111111 |
completed |
22222222-2222-2222-2222-222222222222 |
failed |
33333333-3333-3333-3333-333333333333 |
refunded |
44444444-4444-4444-4444-444444444444 |
cancelled |
55555555-5555-5555-5555-555555555555 |
error |
66666666-6666-6666-6666-66666666666 |