2
Creating a Checkout Session

Once authenticated, you can create a checkout session for your customer. This generates a unique payment URL that you can redirect your customer to.

Checkout Session Endpoint

EndpointMethodDescriptionAuthentication
/api/checkout/sessionsPOSTCreate a checkout session and return a hosted payment URL.Bearer access token

Checkout Session Request

The checkout session request requires details about the payment, customer, and callback URLs:

RequestPOST /api/checkout/sessions
curl -X POST "https://api.saligpay.com/api/checkout/sessions" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 125000,
    "currency": "PHP",
    "reference_id": "ORD-10293",
    "success_url": "https://merchant.example/success",
    "cancel_url": "https://merchant.example/cancel",
    "customer_email": "buyer@example.com"
  }'

Request Parameters Explained

Required Fields

ParameterTypeRequiredDescription
amountnumberYesAmount in centavos.
currencystringYesISO currency code. Use PHP for Philippine Peso.
reference_idstringYesYour unique internal order identifier.
success_urlstringYesReturn URL when checkout succeeds.
cancel_urlstringYesReturn URL when checkout is cancelled.

Optional Fields

ParameterTypeRequiredDescription
customer_emailstringNoPrefills payer email in checkout.
metadataobjectNoArbitrary data returned to webhooks and lookup APIs.