Partner Authentication

This API endpoint is designed to authenticate partners of PayLink. By invoking this endpoint with the necessary parameters, you can receive an authentication token, which can be used for subsequent requests to other protected resources.

Endpoint

POST /api/partner/auth

Request Body Parameters

Fields NameTypeDescription
profileNoStringYour unique profile number associated with PayLink.
apiKeyStringYour unique API key assigned by PayLink.
persistTokenbooleanIf set to true, then the returned token is valid for 30 hours.
Otherwise, the returned token will be good for 30 minutes.

An example of the request from the Paylink Auth API is the following:

{
  "profileNo": "19039481",
  "apiKey": "2c1e9a52-a060-3c3a-9237-a623578de582",
  "persistToken": "true"
}

Partner Credentials

Profile Number and API Key can be received from the partner page in My Paylink Portal (https://my.paylink.sa).

❗️

Important Note

Ensure that you use the correct credentials to avoid any issues during the process, depending on whether you are testing or deploying your integration.

Success Response

If the API keys correct and the Authentication request success. The response details are as follows:

Field NameTypeDescription
id_tokenstringThe token value. Its validation period is either 30 minutes or 30 hours.

Example of the response:

{
  "id_token": "eyJhbGciOiJIUzUxMiJ9*******"
}

Use of the token.

When the partner's application receives a token, the request header of any other secured endpoints must contain this token. The header format is:

{
  "Authorization": "Bearer [id_token]"
}