🔐Authorization

TempToken

POST {{Base Adres}}/api/paywall/temptoken

Important: To use the TempToken service, you must include the 'apikeypublic' and 'apiclientpublic' parameters in the 'Header' field.

PaymentAPI Address

Parameter
Type
Compulsory
Description

apikeypublic

string

Yes

The Public Key you have obtained from the merchant panel.

apiclientpublic

string

Yes

The Public Client you have obtained from the merchant panel.

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

Parameter
Type
Compulsory
Description
ClientCardSave

boolean

Yes

Will the token be used for card storage on the client side?

ThreeDSession

boolean

Yes

Will the token be used for performing 3D transactions on the client side?

ExpiryMin

int

Yes

How long will the token be valid?

A value between 0 and 30 minutes can be defined.

The sample JSON and code snippets to be sent to the service are as follows:

{
    "ClientCardSave": true,
    "ThreeDSession": false,
    "ExpiryMin": 30
}

The parameters returned from the service are as follows:

Parameter
Type
Description

ErrorCode

int

Error code. Returns the value '0' if the operation is successful.

Result

bool

Returns a value of either true or false. If the operation is successful, it returns true.

Message

string

If the operation fails, this is the message describing the error. It provides language support based on the locale parameter.

Body

object

Transaction detail information.

{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "TempTokenId": 14533994,
        "Token": "22ae3b5a-8eb0-41cc-88c7-219e25b95441",
        "ExpiryDateTime": "2024-06-13T22:25:08.0404774+03:00",
        "Scope": {
            "ClientCardSave": true,
            "ThreeDSession": false
        }
    }
}

Last updated