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.
intent
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.
processingFlow
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.
amount
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.
channel
string
Where the transaction is coming from.Use pos for a card machine, atm for an ATM, and web for an online payment.
paymentMethod
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.
currency
string
The numeric currency code for the transaction.Use 566 for Nigerian Naira. If you do not provide it, Cardcore uses 566.
cardId
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.
pan
string
The card number to test with.Only provide this when you are not using cardId.
expiry
string
The card expiry date to test with.Send it as YYMM or YYYYMM. Only provide this when you are not using cardId.
accountNumber
string
The account number linked to the test card.Only provide this when you are not using cardId.
merchantId
string
The merchant number to show on the simulated transaction.If you do not provide it, Cardcore uses a default test merchant.
terminalId
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.
responseMode
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.
transactionDate
string
The date and time to place on the simulated transaction.If you do not provide it, Cardcore uses the current time.
originalTransactionId
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.
originalStan
string
For reversals, this is the original transaction’s short trace number.Use it with originalRrn if you are not sending originalTransactionId.
originalRrn
string
For reversals, this is the original transaction’s retrieval reference number.Use it with originalStan if you are not sending originalTransactionId.
overrides
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.
{
  "intent": "authorization",
  "processingFlow": "purchase",
  "channel": "pos",
  "paymentMethod": "chip",
  "amount": 10.25,
  "currency": "566",
  "cardId": "{{cardId}}",
  "responseMode": "stub"
}

Test with card details

Use this when you do not want to look up an existing card by cardId.
{
  "intent": "authorization",
  "processingFlow": "purchase",
  "channel": "web",
  "paymentMethod": "ecom",
  "amount": 10.25,
  "currency": "566",
  "pan": "5064410000000149",
  "expiry": "2806",
  "accountNumber": "1234567890",
  "responseMode": "stub"
}

Test your webhook

Use responseMode: "forward" when you want the simulator to call your configured webhook.
{
  "intent": "authorization",
  "processingFlow": "purchase",
  "channel": "pos",
  "paymentMethod": "contactless",
  "amount": 10.25,
  "cardId": "{{cardId}}",
  "responseMode": "forward"
}
Your webhook should return a Postbridge response payload. See Postbridge webhook responses.

Test a reversal

For a reversal, send the original transaction using originalTransactionId.
{
  "intent": "reversal",
  "processingFlow": "purchase",
  "amount": 10.25,
  "cardId": "{{cardId}}",
  "originalTransactionId": "{{transactionId}}",
  "responseMode": "stub"
}
If you do not have originalTransactionId, send both originalStan and originalRrn.
{
  "intent": "reversal",
  "processingFlow": "purchase",
  "amount": 10.25,
  "cardId": "{{cardId}}",
  "originalStan": "123456",
  "originalRrn": "123456789012",
  "responseMode": "stub"
}

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.