1

I want Mastercard to redirect to a specific page on transaction being unsuccessful.

I am using below API:
https://test-gateway.mastercard.com/api/rest/version/{version}/merchant/{merchantId}/session

Maybe there is something I can add inside the request body which is missing?

{
    "apiOperation": "INITIATE_CHECKOUT",
    "checkoutMode": "PAYMENT_LINK",
    "order": {
        "amount": 10.00,
        "currency": "USD",
        "id": "---",
        "reference": "---",
        "description": "---",
        "custom": {
            "type": "QR_PAYLINK"
        }
    },
    "interaction": {
        "operation": "PURCHASE",
        "returnUrl": "---",
        "merchant": {
            "url": "https://developer.mastercard.com",
            "name": "Skateboard Shop",
            "logo":"---"
        },
            "displayControl": {
            "billingAddress": "HIDE",
            "customerEmail": "HIDE",
            "shipping": "HIDE"
        }
    },
    "transaction": {
        "reference": "---"
    },
    "paymentLink": {
        "expiryDateTime": "---",
        "numberOfAllowedAttempts": "---"
    }
}

I want something which I can add in my request body so that the page is redirected to a specific page on Mastercard payment being unsuccessful.

Above request body is working fine and is giving me Mastercard payment link.

Abra
  • 19,142
  • 7
  • 29
  • 41

0 Answers0