Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test Crypto Payments

Test IVB crypto collections with test tokens, a generated payment address and transaction-status verification.

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 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_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 return EXPIRED status


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

Network
Chain Value
Supported Tokens

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

Status
Meaning

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

For an eligible unfunded session, use session refresh and display its returned address, exact amount and expiry. Check for received funds before collecting again:


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

Rule
Detail

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_... keys only: test tokens sent to live addresses are unrecoverable

Last updated