curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"amount": "1.00",
"currency": "SGD",
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"return_url": "https://example.com/return",
"description": "Sandbox contract test"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create"
payload = {
"amount": "1.00",
"currency": "SGD",
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"return_url": "https://example.com/return",
"description": "Sandbox contract test"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-client-id": "<x-client-id>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-client-id': '<x-client-id>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '1.00',
currency: 'SGD',
merchant_order_id: 'ce37d547-53c7-4648-988b-691a352b5446',
return_url: 'https://example.com/return',
description: 'Sandbox contract test'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1.00',
'currency' => 'SGD',
'merchant_order_id' => 'ce37d547-53c7-4648-988b-691a352b5446',
'return_url' => 'https://example.com/return',
'description' => 'Sandbox contract test'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-client-id: <x-client-id>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create"
payload := strings.NewReader("{\n \"amount\": \"1.00\",\n \"currency\": \"SGD\",\n \"merchant_order_id\": \"ce37d547-53c7-4648-988b-691a352b5446\",\n \"return_url\": \"https://example.com/return\",\n \"description\": \"Sandbox contract test\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1.00\",\n \"currency\": \"SGD\",\n \"merchant_order_id\": \"ce37d547-53c7-4648-988b-691a352b5446\",\n \"return_url\": \"https://example.com/return\",\n \"description\": \"Sandbox contract test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1.00\",\n \"currency\": \"SGD\",\n \"merchant_order_id\": \"ce37d547-53c7-4648-988b-691a352b5446\",\n \"return_url\": \"https://example.com/return\",\n \"description\": \"Sandbox contract test\"\n}"
response = http.request(request)
puts response.read_body{
"amount": "1",
"available_payment_method_types": [
"gcash",
"dana",
"alipayplus",
"googlepay",
"boost",
"hipay",
"alipaycn",
"grabpay",
"tng",
"tosspay",
"card",
"wechatpay",
"kakaopay",
"naverpay",
"kplus",
"kaspi",
"unionpay",
"paynow",
"alipayhk",
"truemoney",
"crypto",
"applepay",
"mpay",
"rabbitlinepay"
],
"cancel_time": "",
"cancellation_reason": "",
"captured_amount": "0",
"client_secret": "<client-secret>",
"complete_time": "",
"create_time": "2026-09-14T17:03:35+08:00",
"currency": "SGD",
"customer_id": "",
"description": "Sandbox contract test",
"intent_status": "REQUIRES_PAYMENT_METHOD",
"latest_payment_attempt": null,
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"metadata": null,
"next_action": null,
"payment_intent_id": "PI2099423807759454208",
"payment_method_flows": {
"crypto": [
"redirect",
"qrcode"
],
"unionpay": [
"qrcode",
"securepay"
]
},
"return_url": "https://example.com/return",
"update_time": "2026-09-14T17:03:35+08:00"
}Create a PaymentIntent
Create a payment intent for a customer order to initiate payment collection and track its processing status.
If you have already collected the payment method, include payment_method to start payment processing in this call. Otherwise, create the payment intent first, then call Confirm a PaymentIntent after collecting the payment method.
Use the returned intent_status and next_action to determine the payment’s progress and whether the customer needs to take further action. See Direct API integration for the complete flow.
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"amount": "1.00",
"currency": "SGD",
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"return_url": "https://example.com/return",
"description": "Sandbox contract test"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create"
payload = {
"amount": "1.00",
"currency": "SGD",
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"return_url": "https://example.com/return",
"description": "Sandbox contract test"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-client-id": "<x-client-id>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-client-id': '<x-client-id>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '1.00',
currency: 'SGD',
merchant_order_id: 'ce37d547-53c7-4648-988b-691a352b5446',
return_url: 'https://example.com/return',
description: 'Sandbox contract test'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1.00',
'currency' => 'SGD',
'merchant_order_id' => 'ce37d547-53c7-4648-988b-691a352b5446',
'return_url' => 'https://example.com/return',
'description' => 'Sandbox contract test'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-client-id: <x-client-id>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create"
payload := strings.NewReader("{\n \"amount\": \"1.00\",\n \"currency\": \"SGD\",\n \"merchant_order_id\": \"ce37d547-53c7-4648-988b-691a352b5446\",\n \"return_url\": \"https://example.com/return\",\n \"description\": \"Sandbox contract test\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-auth-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-client-id", "<x-client-id>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1.00\",\n \"currency\": \"SGD\",\n \"merchant_order_id\": \"ce37d547-53c7-4648-988b-691a352b5446\",\n \"return_url\": \"https://example.com/return\",\n \"description\": \"Sandbox contract test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment_intents/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-client-id"] = '<x-client-id>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1.00\",\n \"currency\": \"SGD\",\n \"merchant_order_id\": \"ce37d547-53c7-4648-988b-691a352b5446\",\n \"return_url\": \"https://example.com/return\",\n \"description\": \"Sandbox contract test\"\n}"
response = http.request(request)
puts response.read_body{
"amount": "1",
"available_payment_method_types": [
"gcash",
"dana",
"alipayplus",
"googlepay",
"boost",
"hipay",
"alipaycn",
"grabpay",
"tng",
"tosspay",
"card",
"wechatpay",
"kakaopay",
"naverpay",
"kplus",
"kaspi",
"unionpay",
"paynow",
"alipayhk",
"truemoney",
"crypto",
"applepay",
"mpay",
"rabbitlinepay"
],
"cancel_time": "",
"cancellation_reason": "",
"captured_amount": "0",
"client_secret": "<client-secret>",
"complete_time": "",
"create_time": "2026-09-14T17:03:35+08:00",
"currency": "SGD",
"customer_id": "",
"description": "Sandbox contract test",
"intent_status": "REQUIRES_PAYMENT_METHOD",
"latest_payment_attempt": null,
"merchant_order_id": "ce37d547-53c7-4648-988b-691a352b5446",
"metadata": null,
"next_action": null,
"payment_intent_id": "PI2099423807759454208",
"payment_method_flows": {
"crypto": [
"redirect",
"qrcode"
],
"unionpay": [
"qrcode",
"securepay"
]
},
"return_url": "https://example.com/return",
"update_time": "2026-09-14T17:03:35+08:00"
}Authorizations
The API token for login provided by UQPAY.
Headers
Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts. If omitted or empty, the request is executed using the master account.
More information at Connected Accounts.
A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.
The API client id generated by UQPAY
Body
Amount intended to be collected by this PaymentIntent.
"10.12"
Three-letter currency code
"SGD"
The merchant reference id created in merchant's system that corresponds to this PaymentIntent
36Descriptor that will display to the customer. Maximum length is 32.
32"Sandbox contract test"
The web page URL or application scheme URI to redirect the customer after payment authentication.
1024Authorization mode. Pre-authorization requires account and channel support, card or card_present, and auto_capture=false. If supplied both here and inside payment_method, the values must match. When omitted, the payment method value is used, otherwise ordinary authorization applies.
authorization, pre_authorization The payment method details to confirm the PaymentIntent. The PaymentIntent will be confirmed automatically when payment_method is set.
- card
- card_present
- applepay
- googlepay
- alipaycn
- alipayhk
- unionpay
- wechatpay
- grabpay
- crypto
- paynow
- truemoney
- tng
- gcash
- dana
- kakaopay
- toss
- naverpay
Show child attributes
Show child attributes
IPv4 or IPv6 address of the device.
Required when payment_method.card.three_ds_action=enforce_3ds.
Optional otherwise.
45"212.121.222.123"
Inline customer details. Supply this on the first PaymentIntent for a shopper to enable Card on File on the hosted payment page. UQPAY creates a customer record using these details and returns the resulting customer_id in the response.
Ignored when customer_id is also supplied — see customer_id for precedence rules.
Show child attributes
Show child attributes
ID of an existing UQPAY customer returned by a previous Create PaymentIntent call. Pass this on subsequent payments for the same shopper so the hosted payment page can offer their saved cards.
When both customer_id and customer are supplied, customer_id takes precedence.
Leave empty for guest checkout (the PaymentIntent will not participate in Card on File).
36"cus_asyknf3wlfxhs1s6plamk80i8v"
Purchase order related to this PaymentIntent
Show child attributes
Show child attributes
Browser information collected for risk and fraud prevention.
Required when three_ds_action=enforce_3ds
Show child attributes
Show child attributes
Any key-value object. Max length = 512 bytes. This must be valid JSON data.
Show child attributes
Show child attributes
{ "key1": "value1", "key2": "value2" }
Response
Payment intent created successfully
Unique identifier for the PaymentIntent
36"b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6"
Payment amount. This is the order amount you would like to charge your customer.
"10.12"
Three-letter currency code
"SGD"
Status of this PaymentIntent.
REQUIRES_PAYMENT_METHOD: The PaymentIntent is waiting for the confirm request.REQUIRES_CUSTOMER_ACTION: The PaymentIntent is waiting for further customer action of authentication, e.g. 3DS verification and QR code scan. Please check thenext_action.REQUIRES_CAPTURE: The PaymentIntent is waiting for your capture to complete the payment.PENDING: The PaymentIntent is pending the final result from the provider. No further action is required.SUCCEEDED: The PaymentIntent has succeeded. The payment is complete.CANCELLED: The PaymentIntent has been canceled by your request. The payment is closed.FAILED: The PaymentIntent has failed.PARTIALLY_CAPTURED: A partially captured authorization has an outstanding balance; do not submit another capture.EXPIRED: The pre-authorization expired and was released.
PARTIALLY_CAPTURED, EXPIRED, REQUIRES_PAYMENT_METHOD, REQUIRES_CUSTOMER_ACTION, REQUIRES_CAPTURE, PENDING, SUCCEEDED, CANCELLED, FAILED "SUCCEEDED"
Refund or authorization-release details, when available in Retrieve or List PaymentIntents.
Capture records returned by Retrieve and List PaymentIntents.
Show child attributes
Show child attributes
Authorization mode for this payment.
authorization, pre_authorization Pre-authorization expiry. Null when no expiry is recorded. Use the returned time rather than a fixed holding period.
Remaining pre-authorized amount available for capture. A final capture consumes the available authorization; inspect capture_records for channel processing results.
Remaining pre-authorized amount, equal to available_to_capture. A positive value alone does not mean cancellation is permitted.
Descriptor while creating a PaymentIntent.
255Available payment method types for this PaymentIntent.
Aggregate capture amount recorded on the PaymentIntent. Capture acceptance can update this value before channel completion; check capture_records for processing results.
"10.12"
Snapshot of the customer associated with this PaymentIntent. Returned when customer or customer_id was supplied at creation time. The customer's unique identifier is exposed at the top level as customer_id; the id field is not included inside this object.
Show child attributes
Show child attributes
ID of the customer associated with this PaymentIntent. Empty for guest checkout.
36"cus_asyknf3wlfxhs1s6plamk80i8v"
Cancellation timestamp; an empty string when no cancellation time is recorded.
Reason for canceling this PaymentIntent.
"Order cancelled"
PaymentIntent's client secret for browser or app. Returned by PaymentIntent create API or PaymentIntent retrieve API. The provided client_secret is valid for 60 minutes.
"eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI"
The merchant reference id created in merchant's system that corresponds to this PaymentIntent
36"1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee"
Metadata associated with the payment. Returns null when no metadata is set.
Show child attributes
Show child attributes
Null when no next action is available; otherwise follow the returned action instructions.
Show child attributes
Show child attributes
The web page URL or application scheme URI to redirect the customer after payment authentication.
"https://127.0.0.1:8080/api/v1/callback"
Time at which this PaymentIntent was created.
"2024-03-01T00:00:00+08:00"
Completion timestamp; an empty string when no completion time is recorded.
Last time at which this PaymentIntent was updated or operated on.
"2024-03-01T00:00:00+08:00"
Latest PaymentAttempt; null when no payment attempt is available.
- Latest payment attempt
- No payment attempt
Show child attributes
Show child attributes

