🔐1. Authorization

For the operations you will perform on the client side, you need to obtain a temporary token from the server. You can retrieve this token from your server using the following endpoint and parameters.

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

boolean

Yes

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

boolean

Yes

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

boolean

Yes

Is the token going to be used for Paywall’s client-side library?

boolean

Yes

You should use the Scope parameter when you want to define the token’s permissions.

int

Yes/No

Token Permissions

0 = None 1 = ClientCardSave 2 = ThreeDSession 3 = ClientSdk

int

Yes

How long will the token be valid?

A value can be defined between 0 and 1440 minutes.

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.

Last updated