11. Verify Payment (OTP)

Payments made through Masterpass that require OTP verification can be processed using this service.

Verify Payment (OTP)

POST {{Base Address}}/api/paywall/masterpass/payment/verify

It will be sufficient to send a request to the address provided above. You can use the 'Base Address' for both the Test environment and the Production environment as you wish.

Important: To use the Masterpass - Verify Payment (OTP) service, you must include the parameters 'apikeyprivate' and 'apiclientprivate' in the 'Header' field. PaymentAPI Address

Parameter
Type
Mondatory
Description

apikeyprivate

string

Yes

The Private Key obtained from the merchant panel.

apiclientprivate

string

Yes

The Private Client obtained from the merchant panel.

The parameters that need to be sent to the service are as follows:

Parameter
Type
Mondatory
Description

SessionId

Guid

Yes

Session IDinformation

MasterpassPaymentId

Guid

Yes

It is included in the response returned from the Paywall services at the time of initiating the payment.

OtpToken

string

Yes

The relevant value from the Initiate Payment service is returned if the payment needs to proceed with OTP.

OtpCode

string

Yes

This is the verification code information obtained from the user on the payment screen.

{
    "OtpToken": "f6b4401774f544dc8ec958dbe7a8470f",
    "OtpCode": "123456",
    "SessionId": "5895433e-f36b-1410-825e-001264113a90",
    "MasterpassPaymentId": "ce55004d-888c-416f-84d7-ed2873531fe7"
}

Response returned from the service:

Parameter
Type
Description

Body

object

JSON containing payment details (optional)

ErrorCode

int

Error code. Returns '0' if the transaction is successful.

Result

bool

Returns either true or false. If the transaction is successful, it returns true.

Message

string

If the transaction fails, this is the error message provided, with language support according to the locale parameter.

{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Session": {
            "SessionRenewed": false,
            "SessionId": "a527433e-f36b-1410-80e5-004205aa382d"
        },
        "Masterpass": {
            "Result": {
                "RetrievalReferenceNumber": "100005844112",
                "IsVerified": true,
                "Url3d": null,
                "Url3dSuccess": null,
                "Url3dFail": null,
                "CardUniqueNumber": "382C4D4AA6AA93C7CF2D613BB144AA6305A46FDCD40B795C40B97A486D8E2BE2",
                "Token": "057227d485424da0a3394056b8c21bdc",
                "ResponseCode": "0000",
                "Description": "OTP verified successfully."
            },
            "BuildId": "78",
            "CorrelationId": "6ba60890-6f0e-479d-8987-c1cfd4cf4abc",
            "Exception": null,
            "Message": "OK",
            "RequestId": null,
            "StatusCode": 200,
            "Version": null
        }
    }
}

Last updated