Simulate Fiat Payment

The simulate endpoint lets you trigger a test fiat payment confirmation in the test environment without going through a real bank transfer. This is useful for end-to-end testing of your integration — confirming webhooks fire, order statuses update correctly, and your app handles payment success as expected.

This endpoint only works with test API keys (sk_test_...). Calling it with a live key will have no effect on live transactions.


How It Works

  1. You create a payment request using POST /v1/transactions (with your test secret key)

  2. The customer receives bank account details to pay into

  3. Instead of waiting for a real bank transfer, you call POST /v1/fiat-transfer/simulate with the transaction reference

  4. IvoryPay marks the transaction as SUCCESS and fires your configured webhook


Endpoint

POST /v1/fiat-transfer/simulate

Authentication: Secret key (Authorization: sk_test_...)

Request Body

Field
Type
Required
Description

reference

string

Yes

The reference of the transaction you want to confirm

Request Example

Response Example


Full Test Flow

Step 1 — Create a payment request

Response — payment details:

Step 2 — Simulate the payment

Step 3 — Verify the transaction status


Code Samples

Node.js

Python

PHP


Webhook Testing

When you call the simulate endpoint, IvoryPay will fire a fiatCollection.success webhook event to your configured webhook URL (if set). This is the same payload you will receive in production.

Example webhook payload:

See Webhooks for how to verify the signature and handle events.


Important Notes

Rule
Detail

Test only

Only works with sk_test_... keys — no effect on live transactions

One-time

Simulating the same reference twice has no effect after the first success

Reference must exist

The transaction must have been created first via POST /v1/transactions

Webhook fires

Your webhook URL will receive the fiatCollection.success event

Last updated