Documentation
Test environmentLive environmentStatusContact us
  • Overview
    • Get started
    • Resource guides
      • For business users
      • For finance teams
      • For integration teams
    • Stripe onboarding
    • Live use cases
      • Usage overview
  • Start using the dashboard
    • Access
    • Payment services
    • Collaborators and access control
    • One-time payment links
      • Single link creation
      • Bulk link creation
      • Send payment links
      • Payment link page
      • Payment receipt email
    • Subscriptions
      • Set-up
      • View subscriptions
      • Manage subscriptions
    • Payments and refunds
      • Payment methods
      • Dashboard
      • Refunds
    • Payouts
    • Reports
    • Payment workflows with Plumber
      • Set-up
      • Testing
    • Payment forms
      • Set-up
      • Testing
      • Resources
  • Start an API integration
    • Get started
    • Endpoints
    • Integrating with your e-services
    • Errors
    • Idempotency
    • Pagination
    • Go-live checklist
  • API RESOURCES
    • Events
      • The event object
      • Types of events
    • Payments
      • Create a payment
      • Retrieve payments
      • Send email for payment
      • Cancel a payment
      • Refund a payment
      • Get all payments from payment service
  • WEBHOOKS
    • Introduction
    • Set-up
      • Events
      • Best practices
  • FAQ
    • Access
    • Costs
    • Timeline
    • API keys
    • API integration
    • Payments
    • Payment methods
    • Payouts and transaction fees
    • Refunds
    • Security and compliance
    • Downtime and maintenance
  • Policies
    • Privacy Policy
    • Terms of Use
Powered by GitBook
On this page

Was this helpful?

  1. Start an API integration

Integrating with your e-services

The following describes what you can expect when integrating your e-service with PaySG.

PreviousEndpointsNextErrors

Last updated 1 year ago

Was this helpful?

Expected inputs and sample responses for each endpoint can be found .

Integration FAQs can be found .

Integrated payment flow

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.

Creating a payment

  1. The payer accesses your e-service.

  2. 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.

  3. The PaySG server returns a payment object to your e-service.

  4. 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.

  5. 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.

(Optional) Redirecting payers back after successful payment

  1. 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.

  2. The PaySG server responds by returning the payment status.

  3. 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.

Checking Payment Status

  • Send a GET request using the id and payment_service_id.

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. are also available.

Alternatively, set up a to receive updates of successful payments.

Webhooks
webhook
here
here
Sample integrated payment flow