📋Payment Checklist

This checklist outlines the steps necessary to complete payments using the Paylink API system.

Before proceeding, ensure you have set up the necessary configurations for your environment, including App ID, Secret Key, and API server base.

A. Testing Environment

  1. Use Testing Environment API keys:
    {
        "apiId": "APP_ID_1123453311",
        "secretKey": "0662abb5-13c7-38ab-cd12-236e58f43766",
        "persistToken": "false"
    }
    
  2. Use the API server base: https://restpilot.paylink.sa for the testing environment.
  3. Use endpoint /api/auth to get the payment Token. Authentication Details
  4. Include the token generated from the endpoint /api/auth in the Authentication header as Bearer [TOKEN].
  5. Use the endpoint /api/addInvoice to generate the invoice. Invoice Generation Details
  6. Redirect the user to the payment page using the url received from /api/addInvoice endpoint.
  7. Use bank card information from the Test Cards for testing purposes to proccess the payment.
  8. After the user pays the order, the browser will be redirected back to the callBackUrl specified in /api/addInvoice with parameters transactionNo and orderNumber. Order Request Details
  9. In the merchant backend system, use the /api/getInvoice endpoint to check the payment status and amount paid and process the client's order. Order Request Details
  10. Check for any payment errors that may occur during the payment process using the Payment Errors Codes.

B. Production Environment

  1. Once you have successfully tested the payment in the testing environment, ensure to register on Paylink for production.
  2. Ensure your current Paylink subscription supports API access.
  3. Obtain the API keys from my.paylink.sa for production use. Authentication Details
  4. Important: Use the API keys provided for the production environment instead of the testing environment keys.
  5. Important: Use the API server base: https://restapi.paylink.sa for the production environment.

📘

Ensure to follow these steps carefully to integrate Paylink API seamlessly into your payment process.