> ## Documentation Index
> Fetch the complete documentation index at: https://developers.uqpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Accept your first card payment in the UQPAY sandbox in under 5 minutes.

This guide walks you through accepting a card payment in the sandbox environment using the direct API integration.

<Info>
  **Prerequisites**

  * A UQPAY sandbox account with Global Acquiring enabled
  * An API token from the [Access Token](/account-center/v1.6/api-reference/access-token) endpoint
</Info>

<Steps>
  <Step title="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.

    ```bash theme={null}
    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": "acq@uqpay.com",
              "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"
      }'
    ```
  </Step>

  <Step title="Check the response">
    A successful payment returns `intent_status: "SUCCEEDED"` immediately:

    ```json theme={null}
    {
      "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](/global-acquiring/v1.6/guide/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`
  </Step>

  <Step title="Verify via the Retrieve API (optional)">
    You can query the payment status at any time:

    ```bash theme={null}
    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}"
    ```
  </Step>
</Steps>

## What's next

<CardGroup cols={2}>
  <Card title="Core concepts" href="/global-acquiring/v1.6/guide/core-concepts" icon="fa-book">
    Learn about Payment Intent and Payment Attempt lifecycle and status transitions.
  </Card>

  <Card title="Direct API integration" href="/global-acquiring/v1.6/guide/direct-api-integration" icon="fa-code">
    Build a complete checkout flow with payment method handling and 3DS authentication.
  </Card>

  <Card title="Testing in sandbox" href="/global-acquiring/v1.6/guide/testing-in-sandbox" icon="fa-flask-vial">
    Full list of test cards, e-wallet sandbox setup, and go-live checklist.
  </Card>

  <Card title="Webhooks" href="/global-acquiring/v1.6/webhooks/paymentintent-result" icon="fa-bell">
    Set up webhook notifications to receive real-time payment status updates.
  </Card>
</CardGroup>
