Getting started
This guide provides step-by-step instructions for integrating the payment system into your application. Follow these steps to ensure a seamless setup and payment processing experience.
Setup & Authentication
-
Environment Configuration π
- Ensure to setup your environments correctly.
- Each environment requires its own BASE URL, API ID, and Secret Key.
-
Authorization Token π
- To call any endpoint, you must use an authorization token.
- Obtain this token from the authentication endpoint.
Generate Invoice
- Create Invoice π
- Send the invoice details to the
/api/addInvoice
endpoint to generate a new invoice. - The response will include the transaction number of the created invoice, which will be used in subsequent steps.
- Send the invoice details to the
Payment Processing
-
Retrieve Invoice Details π
- Retrieve the invoice details by sending the transaction number to the
/api/getInvoice
endpoint. - Invoice detail will include the payment URL, which will be used to process the payment.
- Retrieve the invoice details by sending the transaction number to the
-
Redirect to Payment π
- Redirect your customer to the provided payment URL.
-
Post-Payment Redirection π
- After the user completes the payment, his browser will be redirected back to the
callBackUrl
specified during the invoice generation process.
- After the user completes the payment, his browser will be redirected back to the
Check Payment Status
-
Verify Payment π
- Use the
/api/getInvoice
endpoint to check the payment status and paid amount. - Process the client's order in your system based on the payment status.
- Use the
-
Handle Payment Errors π
- Check for any payment errors that may have occurred during the payment process using the provided payment error codes.
![about-us-img.html.png Payment Process](https://files.readme.io/7a54e3e-Paylink_Payment_Process.png)
Updated 2 months ago