📋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
- Use Testing Environment API keys:
{ "apiId": "APP_ID_1123453311", "secretKey": "0662abb5-13c7-38ab-cd12-236e58f43766", "persistToken": "false" }
- Use the API server base: https://restpilot.paylink.sa for the testing environment.
- Use endpoint
/api/auth
to get the payment Token. Authentication Details - Include the
token
generated from the endpoint/api/auth
in theAuthentication
header asBearer [TOKEN]
. - Use the endpoint
/api/addInvoice
to generate the invoice. Invoice Generation Details - Redirect the user to the payment page using the
url
received from/api/addInvoice
endpoint. - Use bank card information from the Test Cards for testing purposes to proccess the payment.
- After the user pays the order, the browser will be redirected back to the
callBackUrl
specified in/api/addInvoice
with parameterstransactionNo
andorderNumber
. Order Request Details - 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 - Check for any payment errors that may occur during the payment process using the Payment Errors Codes.
B. Production Environment
- Once you have successfully tested the payment in the testing environment, ensure to register on Paylink for production.
- Ensure your current Paylink subscription supports API access.
- Obtain the API keys from my.paylink.sa for production use. Authentication Details
- Important: Use the API keys provided for the
production environment
instead of thetesting environment
keys. - 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.
Updated 3 days ago