Testing Crypto Payments
Unlike fiat payments, crypto payment testing requires real test tokens sent to a test wallet address. IvoryPay provides test tokens you can request for free to use exclusively in the test environment.
This flow only works with test API keys (
sk_test_...). Test tokens have no real monetary value and cannot be used on live networks.
Step 1 — Request Test Tokens
Visit the IvoryPay token faucet to request test tokens:
https://www.ivorypay.io/get-tokens
Select the token and network you want to test with (e.g. USDT on BSC Testnet)
Enter your test wallet address
Tokens are sent to your account and available for testing immediately
Step 2 — Create a Crypto Payment Request
Use your test secret key to initiate a crypto collection transaction. The response will contain a wallet address and the exact crypto amount to send.
POST /v1/transactions
Authorization: sk_test_xxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"amount": 10,
"email": "customer@example.com",
"firstName": "John",
"lastName": "Doe",
"type": "CRYPTO",
"baseFiat": "USD",
"crypto": "USDT",
"chain": "BSC_TESTNET",
"reference": "b7e2d1f3-49a8-4c20-8e5b-2f3a4b5c6d7e"
}Response:
Step 3 — Send the Test Tokens
Send the exact crypto amount to the wallet address returned in collectionDetails.address.
Important:
Send the exact amount shown — partial or excess amounts will not confirm
Use the correct network — sending on the wrong network results in permanent loss of tokens
Transactions must be sent before
expiresAt— expired sessions returnEXPIREDstatus
Step 4 — Verify the Transaction Status
Once the tokens are sent and the blockchain confirms the transaction, the status will move from PENDING → PROCESSING → SUCCESS.
Poll this endpoint every few seconds until the status is SUCCESS or FAILED.
Supported Test Networks
BNB Smart Chain Testnet
BSC_TESTNET
USDT, USDC
Polygon Mumbai
POLYGON_TESTNET
USDT, USDC
To get available networks and tokens for your test account:
Transaction Status Values
PENDING
Awaiting crypto transfer from the customer
PROCESSING
Transfer detected on-chain, awaiting confirmations
SUCCESS
Confirmed — payment complete
EXPIRED
Session expired before payment was received
FAILED
Transfer failed or could not be confirmed
Refreshing an Expired Session
If a session expires before the customer pays, you can refresh it to get a new wallet address and expiry window:
Code Samples
Node.js
Python
PHP
Webhook Testing
Once the test transaction reaches SUCCESS, IvoryPay fires a cryptoCollection.success event to your configured webhook URL.
Example webhook payload:
See Webhooks for how to verify the signature and handle events.
Important Notes
Test tokens only
Only use tokens received from ivorypay.io/get-tokens — do not send real funds
Exact amount
Send the exact amountInCrypto shown — mismatches will not confirm
Correct network
Always match the network in the response — wrong network means unrecoverable tokens
Session expiry
Sessions expire after 10 minutes — use the refresh endpoint if needed
Test keys only
sk_test_... keys only — test tokens sent to live addresses are unrecoverable
Last updated