Appearance
Emulation
Emulation features are only available in Sandbox
environment.
Tip – You can also rely on webhooks
For operations that cannot be emulated in the Sandbox, webhook examples are provided.
Card Transactions
You can emulate CardTransactions using the following request.
Parameters
Attribute | Type | Description |
---|---|---|
publicToken | string | The public token of the Card to use for the Card Transaction. |
transLink | string | A unique reference used to associate the Card Transaction with a paymentId . Must be 100000000000000 or higher. |
paymentStatus | string | The type of CardTransaction, which for simulation purposes can be A or S . See list of values. |
date | string | The date of the CardTransaction, as seen in the authorizationIssuerTime attribute. |
amount | float | The amount of the CardTransaction, as seen it the paymentAmount and paymentLocalAmount attributes. |
mcc | string | The Merchant Category Code for this CardTransaction, allowing you to check your Card MCC restrictions. |
merchantId | string | The Merchant's ID for this CardTransaction, allowing you to check your Card MID restrictions. |
merchantName | string | The name of the merchant. |
Tip – You can emulate a complete flow
To emulate a complete flow, set a paymentStatus
= A
followed by a S
while specifying the same transLink
for both requests.
Learn more about the different transaction flows in the Transaction examples article.
Request
bash
curl -X POST {baseUrl}/simulation/cardtransactions \
--header 'Authorization: Bearer {accessToken}' \
--header 'Content-Type: application/json' \
--data-raw '{payload}'
1
2
3
4
2
3
4
Here is a {payload}
example:
json
{
"publicToken": "103020378",
"date": "2022-02-12 13:00:00",
"amount": 15.90,
"mcc": "8574",
"merchantId": "3256",
"merchantName": "Merchant Name",
"paymentStatus": "A",
"paymentCode": "100000000000004"
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
The request returns a 201
HTTP Status Code without any content and sends a cardtransaction.create
webhook.
Note – Disclaimers about this emulation
- No impact on Wallet Balances: A
balance.update
webhook is sent, but values are set to0
. - No refunds and negative amount settlements support yet.