Integrating with your e-services
The following describes what you can expect when integrating your e-service with PaySG.
Last updated
The following describes what you can expect when integrating your e-service with PaySG.
Last updated
Expected inputs and sample responses for each endpoint can be found here.
Integration FAQs can be found here.
The following describes the overall flow of how a successful payment integration would work when a payer enters your e-service to make a payment.
The payer accesses your e-service.
Your e-service initiates a payment on PaySG through a POST API call to the relevant endpoint to create a new payment. If necessary, your team can include a return_url
which will be used to redirect users after successful payment. Please note that the return_url
must be a valid HTTPS URL, otherwise, the payment creation will be blocked by PaySG.
The PaySG server returns a payment object to your e-service.
Your e-service then needs to redirect the payer to the payment_url
, found in the payment object, which leads to PaySG's payment page.
The payer completes the payment on the PaySG payment page. Payment links will remain valid until cancelled on the dashboard/via API or when payment succeeds.
Upon successful payment, the PaySG payment page redirects the payer back to the return_url
provided by your team. Please note that the return_url
must be a valid HTTPS URL, otherwise, the payment creation will be blocked by PaySG.
Your e-service receives the paysg_payment_id
and paysg_payment_service_id
and makes a GET API call to PaySG to verify the payment status. Webhooks are also available.
The PaySG server responds by returning the payment status.
If the payment status is confirmed as paid, your e-service marks the payment as paid and allows the payer to continue with their e-service flow.
Send a GET request using the id
and payment_service_id.
Alternatively, set up a webhook to receive updates of successful payments.