BaaS Card Sandbox
Triggering Card Payment Events in Sandbox
This guide describes how to simulate Card Payment events in the ConnectPay Sandbox environment, specifically:
- Authorization — creates a card payment reservation.
- Financial Transaction (Capture) — captures the authorized amount and creates the completed card transaction.
Preconditions
Before triggering card transaction events, ensure the following conditions are met:
- Activated Card
- The card application has been successfully approved.
- An active card is available. The
cardIdparameter is required for the Sandbox requests.
- Activated Account
- The account linked to the card is open and active.
- An IBAN has been created and is available.
- Sufficient Balance
- The account must have sufficient available funds to cover the transaction amount.
Step 1: Create Card Authorization (Reservation)
This step simulates the authorization request stage of a card payment. The requested amount is reserved on the account.
Endpoint: Create Sandbox Authorization
POST /sandbox/ob/cards/{cardId}/authorizationsRequest Body — recommended values for a test case:
{
"cardTransactionType": "AUTHORISATION_REQUEST",
"serviceType": "CARD_PURCHASE",
"transactionAmount": {
"amount": "1.00",
"currency": "EUR"
},
"originalAmount": {
"amount": "1.00",
"currency": "EUR"
},
"purchaseDatetime": "2025-10-31T05:22:30.000Z",
"merchant": {
"name": "Cards Automation Test",
"address": {
"city": "Vilnius",
"postcode": "65666",
"addressLine1": "Street name 13",
"countryCode": "LT"
},
"categoryCode": "123123"
}
}Expected Results
- A Card Payment Status Changed webhook notification is triggered.
- A reservation (card hold) is created on the account.
- The authorization response provides the card transaction identifier required for the Capture request.
Step 2: Capture the Transaction
After the authorization has been created, simulate the Financial Transaction (Capture) stage by capturing the previously authorized amount.
The Capture completes the card payment and converts the reservation into a completed card transaction.
Endpoint: Card Sandbox Payment Capture
POST /sandbox/ob/cards/{cardId}/capturesUse the cardTransactionId returned by the Authorization request in the authorization.cardTransactionId field.
Request Body — recommended values for a test case:
{
"serviceType": "CARD_PURCHASE",
"authorization": {
"cardTransactionId": "{{cardTransactionIdFromAddHoldResponseBody}}"
},
"transactionAmount": {
"amount": "1.00",
"currency": "EUR"
},
"originalAmount": {
"amount": "1.00",
"currency": "EUR"
},
"purchaseDatetime": "2025-10-31T05:22:30.000Z",
"merchant": {
"name": "Cards Automation Test",
"address": {
"city": "Vilnius",
"postcode": "65666",
"addressLine1": "Street name 13",
"countryCode": "LT"
},
"categoryCode": "123123"
}
}Expected Results
- The card payment is successfully completed.
- The Capture triggers a balance movement on the selected account.
- The completed card transaction can be retrieved using the Get Account Transactions API.
Notes
A successful Capture creates a balance movement and a card transaction on the selected account. The transaction can then be retrieved using Get Account Transactions.
Only EUR currency is supported for Sandbox card payment simulations.
Merchant address values can be modified for testing purposes.
Fields in the Authorization and Capture requests must match, except for the amount when testing a partial capture.
The standard test sequence is:Authorization → Capture
A successful Authorization triggers the Card Payment Status Changed notification.
Sandbox Testing Limitations
The Sandbox API does not communicate with the card issuer system. Therefore, it does not validate or enforce the following card configuration and security functions:
- Card Limits
- Card Security Settings
- MCC Code Validation
Note: MCC code validation is not applicable to the Create Card Authorisation Sandbox flow. The Merchant Category Code can still be provided as part of a requested test event but is not validated against card settings in Sandbox.
Ordering Card Testing Events
If specific card testing events are required, please send the request to:
Use the following template when ordering card testing events. Provide one row for each required test case.
| Variable | Description / Allowed Values |
|---|---|
| Currency to be Reserved | Currency in which the reservation should be created, for example EUR. |
| Original Currency | Original transaction currency presented by the merchant, for example EUR, USD, or GBP. |
| Merchant Category Code | MCC code to be used for the simulated merchant transaction. |
| Event Type | Type of card transaction to simulate: PoS, Online Purchase, Fuel Dispenser, or ATM. |
| Is Capture Needed | Defines whether a Capture event should follow the Authorization. Values: Yes / No. |
| Is Partial Reservation | Defines whether a partial reservation scenario should be tested. Values: Yes / No. Applicable when Fuel Dispenser is selected as the Event Type. |
| Merchant Country of Origin | Country where the simulated merchant is located. Provide the applicable country code, for example LT, DE, or GB. |
Test Case Order Template
| Test Case | Currency to be Reserved | Original Currency | Merchant Category Code | Event Type | Capture Needed | Partial Reservation | Merchant Country of Origin |
| Test Case 1 | EUR | EUR | PoS | Yes | No | LT | |
| Test Case 2 | 5.5 EUR | 6.3 USD | Not Specifyed | PoS | Yes | No | PL |
| Test Case 3 |
Use a separate row for each required transaction scenario.