Sandbox testing

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:

  1. Activated Card
    • The card application has been successfully approved.
    • An active card is available. The cardId parameter is required for the Sandbox requests.
  2. Activated Account
    • The account linked to the card is open and active.
    • An IBAN has been created and is available.
  3. 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}/authorizations

Request 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}/captures

Use 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:

[email protected]

Use the following template when ordering card testing events. Provide one row for each required test case.

VariableDescription / Allowed Values
Currency to be ReservedCurrency in which the reservation should be created, for example EUR.
Original CurrencyOriginal transaction currency presented by the merchant, for example EUR, USD, or GBP.
Merchant Category CodeMCC code to be used for the simulated merchant transaction.
Event TypeType of card transaction to simulate: PoS, Online Purchase, Fuel Dispenser, or ATM.
Is Capture NeededDefines whether a Capture event should follow the Authorization. Values: Yes / No.
Is Partial ReservationDefines whether a partial reservation scenario should be tested. Values: Yes / No. Applicable when Fuel Dispenser is selected as the Event Type.
Merchant Country of OriginCountry where the simulated merchant is located. Provide the applicable country code, for example LT, DE, or GB.

Test Case Order Template

Test CaseCurrency to be ReservedOriginal CurrencyMerchant Category CodeEvent TypeCapture NeededPartial ReservationMerchant Country of Origin
Test Case 1EUREURPoSYesNoLT
Test Case 25.5 EUR6.3 USDNot SpecifyedPoSYesNoPL
Test Case 3

Use a separate row for each required transaction scenario.

Scroll to Top