Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers-sandbox.uqpaytech.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through accepting a card payment in the sandbox environment using the direct API integration.
Prerequisites
  • A UQPAY sandbox account with Global Acquiring enabled
  • An API token from the Access Token endpoint
1

Create a Payment Intent with a card payment method

Send a request to the Create Payment Intent API with a test card number. This creates the payment intent and processes the payment in a single call.
curl -X POST https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create \
  -H "Content-Type: application/json" \
  -H "x-auth-token: Bearer {your_access_token}" \
  -H "x-client-id: {your_client_id}" \
  -H "x-idempotency-key: $(uuidgen)" \
  -d '{
    "amount": "8.98",
    "currency": "SGD",
    "payment_method": {
      "type": "card",
      "card": {
        "card_name": "UQPAY",
        "card_number": "5346930100108117",
        "expiry_month": "12",
        "expiry_year": "2026",
        "cvc": "811",
        "network": "mastercard",
        "billing": {
          "first_name": "UQPAY",
          "last_name": "ACQ",
          "email": "[email protected]",
          "phone_number": "0524-91353515",
          "address": {
            "country_code": "SG",
            "state": "Singapore",
            "city": "Singapore",
            "street": "444 Orchard Rd, Midpoint Orchard, Singapore",
            "postcode": "924011"
          }
        },
        "auto_capture": true,
        "authorization_type": "authorization",
        "three_ds_action": "skip_3ds"
      }
    },
    "merchant_order_id": "my-first-order-001",
    "description": "Quickstart test payment",
    "metadata": {},
    "return_url": "https://example.com/callback"
  }'
2

Check the response

A successful payment returns intent_status: "SUCCEEDED" immediately:
{
  "amount": 8.98,
  "currency": "SGD",
  "intent_status": "SUCCEEDED",
  "payment_intent_id": "PI1933438751883661312",
  "latest_payment_attempt": {
    "attempt_id": "PA1933438751988518912",
    "attempt_status": "CAPTURE_REQUESTED",
    "amount": 8.98,
    "captured_amount": 8.98,
    "currency": "SGD",
    "complete_time": "2025-06-13T16:18:14+08:00",
    "create_time": "2025-06-13T16:18:14+08:00"
  },
  "merchant_order_id": "my-first-order-001",
  "complete_time": "2025-06-13T16:18:14+08:00",
  "create_time": "2025-06-13T16:18:14+08:00"
}
Key fields to note:
  • intent_status — the overall payment result. See Core concepts for the full status reference.
  • payment_intent_id — unique identifier for this payment, prefixed with PI
  • latest_payment_attempt.attempt_id — the specific attempt, prefixed with PA
3

Verify via the Retrieve API (optional)

You can query the payment status at any time:
curl https://api-sandbox.uqpaytech.com/api/v2/payment_intents/{payment_intent_id} \
  -H "x-auth-token: Bearer {your_access_token}" \
  -H "x-client-id: {your_client_id}"

What’s next

Core concepts

Learn about Payment Intent and Payment Attempt lifecycle and status transitions.

Direct API integration

Build a complete checkout flow with payment method handling and 3DS authentication.

Testing in sandbox

Full list of test cards, e-wallet sandbox setup, and go-live checklist.

Webhooks

Set up webhook notifications to receive real-time payment status updates.