5. Verify OTP

You can verify Masterpass OTP processes with this service.

Verify OTP

POST {{Base Address}}/api/paywall/masterpass/otp/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 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
Mondotory
Description

OtpToken

string

Yes

It is included in the API response parameters at the time of the transaction requiring OTP. Masterpass > Result > Token

OtpCode

string

Yes

The OTP code received from the user on the screen.

ForLinkToMerchant

bool

No

If OTP verification is performed to establish the connection between the user and the merchant company, this parameter must be sent as true.

SessionId

Guid

Yes

Session ID information

{
    "OtpToken": "88599362e05441458c1efa588a711c8f",
    "OtpCode": "123456",
    "ForLinkToMerchant": false,
    "SessionId": "5095433e-f36b-1410-825e-001264113a90"
}

Response returned from the service:

Parameter
Type
Desciption

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.

Body > Masterpass > Result > StatusCode ve Body > Masterpass > Result > ResponseCode The flow must be established by checking the parameter under the directory.

  • Masterpass ResponseCode List

{
    "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