Overview

Use the Postbridge simulator to send a test card transaction through Cardcore. This is useful for testing purchases, withdrawals, balance enquiries, refunds, and reversals in sandbox. Go to Simulate Postbridge Transaction when you are ready to send the request.

What the simulator does

The simulator builds a Postbridge test transaction from the details you send. You can use Cardcore’s default approved response, or send the simulated transaction to your configured webhook to test your own transaction decision logic.

Simulate transaction request parameters

Send these parameters in the JSON body when you call POST /institutions/postbridge/simulate.
string
required
The kind of transaction you want to test.Use authorization when you want to test an approval check, financial when money should move, and reversal when you want to undo an earlier transaction.
string
required
The transaction flow you want to test.Use purchase for a normal card payment, cash_withdrawal for an ATM withdrawal, balance_inquiry to check balance, and refund when money is being returned.
number
required
The transaction amount in standard currency format.For example, send 10.25 for 10 naira and 25 kobo. Cardcore converts it to the Postbridge amount format before sending the test transaction.
string
Where the transaction is coming from.Use pos for a card machine, atm for an ATM, and web for an online payment.
string
How the card was used.Use chip for chip card payment, magstripe for swipe, contactless for tap-to-pay, manual when card details were typed in, ecom for online payment, and moto for mail or telephone order.
string
The numeric currency code for the transaction.Use 566 for Nigerian Naira. If you do not provide it, Cardcore uses 566.
string
The existing card you want to test with.When you provide cardId, Cardcore finds the card number, account number, and expiry date for you.
string
The card number to test with.Only provide this when you are not using cardId.
string
The card expiry date to test with.Send it as YYMM or YYYYMM. Only provide this when you are not using cardId.
string
The account number linked to the test card.Only provide this when you are not using cardId.
string
The merchant number to show on the simulated transaction.If you do not provide it, Cardcore uses a default test merchant.
string
The terminal or card machine number to show on the simulated transaction.If you do not provide it, Cardcore uses a default test terminal.
string
How Cardcore should get the response for the simulated transaction.Use stub when you want Cardcore to return its default approved response.Use forward when you want Cardcore to send the simulated transaction to your configured webhook and use your webhook’s reply.
string
The date and time to place on the simulated transaction.If you do not provide it, Cardcore uses the current time.
string
For reversals, this is the earlier transaction you want to reverse.If you provide it, Cardcore can find the original transaction details for you.
string
For reversals, this is the original transaction’s short trace number.Use it with originalRrn if you are not sending originalTransactionId.
string
For reversals, this is the original transaction’s retrieval reference number.Use it with originalStan if you are not sending originalTransactionId.
object
Optional field changes for special tests.Use the Postbridge field number as the key and the value you want the simulator to send. For example, field 4 changes the formatted transaction amount.

Test with an existing card

Use this when the card already exists in Cardcore.

Test with card details

Use this when you do not want to look up an existing card by cardId.

Test your webhook

Use responseMode: "forward" when you want the simulator to call your configured webhook.
Your webhook should return a Postbridge response payload. See Postbridge webhook responses.

Test a reversal

For a reversal, send the original transaction using originalTransactionId.
If you do not have originalTransactionId, send both originalStan and originalRrn.

Notes

  • This endpoint is for sandbox testing.
  • If you do not send responseMode, Cardcore uses stub.
  • If you do not send channel or paymentMethod, Cardcore uses its default point-of-sale test values.
  • If you do not send cardId, you must send pan, expiry, and accountNumber.
  • Use overrides only when you need to test a special Postbridge field value.