Crypto Payment Refunds
Refund a completed crypto payment to a recipient blockchain address from your Ivorypay business wallet.
Send a refund for a completed crypto collection back to a recipient's blockchain address. The refund is debited from your business wallet and sent on-chain.
Base path: /v1/crypto-collection-refund
Authentication: API Key (Authorization: <secret-key>)
Endpoints
POST
/v1/crypto-collection-refund
Initiate a crypto refund
POST /v1/crypto-collection-refund
Initiates a refund for a previously completed crypto collection. The amount is sent on-chain to the provided wallet address.
Prerequisites
The original collection transaction must have a status of
SUCCESS.Only one refund is allowed per collection: a second request against the same
collectionReferencewill be rejected.Your business wallet must hold sufficient balance to cover the refund amount plus network fees.
Request
Headers
Authorization: <your-secret-api-key>
Content-Type: application/jsonBody
network
string
Yes
Blockchain network to send the refund on. Must match the original collection chain.
address
string
Yes
Recipient's blockchain wallet address.
amount
number
Yes
Amount to refund in the collection's crypto token. Must not exceed settled amount.
reference
string
Yes
Your unique reference for this refund. Reuse for the same operation; duplicate requests may be rejected rather than replayed.
collectionReference
string
Yes
The reference of the original collection transaction to refund.
Response
Response Fields
id
string
Refund record UUID
reference
string
Your supplied refund reference
collectionReference
string
The original collection reference being refunded
amount
number
Refund amount in crypto
token
string
Crypto token being refunded (e.g. USDT)
chain
string
Blockchain network used
fee
number
Platform fee deducted
gasFee
number
On-chain gas fee
environment
string
LIVE or TEST
businessId
string
Your business UUID
createdAt
string
ISO 8601 creation timestamp
Error Responses
400
A refund has already been processed for this collection
collectionReference was already refunded
400
No transaction found with the provided reference
collectionReference does not exist
400
Cannot process refund for a transaction that is not successful
Original collection is not in SUCCESS state
400
Amount exceeds the settled amount for this transaction
amount is greater than the collection settled amount
400
Insufficient balance
Wallet balance too low to cover refund + fees
400
Duplicate transaction reference
reference was already used
401
Unauthorized
Missing or invalid API key
Refund Status Values
PENDING
Refund created, queued for on-chain broadcast
PROCESSING
Broadcast to blockchain, awaiting confirmation
SUCCESS
Confirmed on-chain, wallet debited
FAILED
Refund failed. Check the final transaction and balance; a reservation may remain pending reconciliation.
Subscribe to webhook events to receive real-time status updates.
Code Examples
Node.js
cURL
Python
Notes
The
networkmust match the blockchain on which the original collection was received.The
amountcannot exceed thesettledAmountInCryptoof the original collection.Use your live key for live refunds and your test key for test refunds: refunds are scoped to the same environment as the original collection.
Last updated