Skip to main content

Sandbox: Merchant card payments

When testing your integration, you might need to simulate certain events with the Partner Testing API.

Prerequisites
  • Merchant profile status: Enabled
  • Card payment method status: Enabled

Simulate updating the statuses for your merchant profile and card payment method if needed.

Create a payment link in the main API section of the API Explorer, not the Testing API.

mutation CardPaymentLink {
createMerchantPaymentLink(
input: {
merchantProfileId: "$MERCHANT_PROFILE_ID"
amount: { value: "50", currency: "EUR" }
paymentMethodIds: "$CARD_PAYMENT_METHOD_ID"
label: "Link for card payment simulation"
}
) {
... on CreateMerchantPaymentLinkSuccessPayload {
__typename
merchantPaymentLink {
id
}
}
}
}
{
"data": {
"createMerchantPaymentLink": {
"__typename": "CreateMerchantPaymentLinkSuccessPayload",
"merchantPaymentLink": {
"id": "$YOUR_MERCHANT_PAYMENT_LINK_ID"
}
}
}
}

Simulate receiving merchant card payment​

Enter the id from the createMerchantPaymentLink success payload.

mutation SimulateCardPaymentReception {
simulateIncomingCardAuthorization(
input: {
paymentLinkId: "$PAYMENT_LINK_ID"
authorization: { status: Authorized }
threeDS: { status: Successful }
autoCapture: true
cardDetails: {
scheme: Visa
category: Commercial
type: Credit
country: "FRA"
}
}
) {
... on InternalErrorRejection {
__typename
}
}
}

Simulate booking merchant card payment​

Get the transactionId from simulating the reception of a merchant card payment from your Dashboard.

mutation SimulateCardBooking {
simulateIncomingCardBooking(
input: { transactionId: "$TRANSACTION_ID" }
) {
... on SimulateIncomingCardBookingSuccessPayload {
__typename
}
}
}

Simulate releasing merchant card payment​

mutation SimulateRelease {
simulateReleaseReservedBalance(
input: { transactionId: "$TRANSACTION_ID" }
) {
... on ForbiddenRejection {
__typename
message
}
... on TransactionNotFoundRejection {
__typename
message
transactionId
}
... on ReleaseReservedBalanceSuccessPayload {
__typename
transactionId
}
}
}