3. 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.
persistTokenbooleanThis is a boolean value. If 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"
}

❗️

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.eyJ12JhYmR1bGVsYWguc2FyYWhAZdsasuY29tIiwiYXV0aCI6IlJPTEVfTUADFDDFDUk9MRV9NRVJDSEFOVF9BQ0NPVU5UIiwiZXhwIjoxNTk2NDQ0MzgwfQ.lNuL-87651-qnzezUaLnheW6ymryn4LlREis4lJO_WVmQtl69HPXCMHjFBuS-B7c5GyDPac_TDKM146fOZlAlA"
}

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 [TOKEN].