Common questions and solutions gathered from real integration experiences. If you don’t find your answer here, contact your UQPAY account manager.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.
Authentication and API Keys
How do I get my API key and merchant credentials?
How do I get my API key and merchant credentials?
I get `unauthorized_error: invalid auth token format` when calling the API. What's wrong?
I get `unauthorized_error: invalid auth token format` when calling the API. What's wrong?
My token stops working after I generate a new one. Is that expected?
My token stops working after I generate a new one. Is that expected?
expired_at field in the token response; the default TTL is 30 minutes. See Request Access Token.What is `x-idempotency-key` and when should I send it?
What is `x-idempotency-key` and when should I send it?
I get `Invalid client id` (HTTP 400) when requesting an access token in production. What should I check?
I get `Invalid client id` (HTTP 400) when requesting an access token in production. What should I check?
x-client-id you are using does not exist or does not match the production environment. Verify that you are using the client ID generated from your production account at https://app.uqpay.com, not from the sandbox portal at https://app-sandbox.uqpaytech.com. The two environments use separate credentials.Sandbox Testing
Do I need to go through real KYC in the sandbox?
Do I need to go through real KYC in the sandbox?
https://api-sandbox.uqpaytech.com.Does the sandbox validate card numbers and CVCs?
Does the sandbox validate card numbers and CVCs?
Does `merchant_order_id` need to be unique? Can I reuse it?
Does `merchant_order_id` need to be unique? Can I reuse it?
merchant_order_id is not validated for uniqueness by UQPAY — you can submit the same value and multiple PaymentIntents will be created. Use payment_intent_id (the PI... prefix ID returned by our API) as the authoritative order reference within UQPAY.Recommendation: Assign a unique merchant_order_id to every order on your side. This simplifies reconciliation and avoids issues with upstream channels that enforce uniqueness — for example, Alipay CN requires a unique merchant_order_id, and submitting duplicates will cause Alipay-side errors.Payment Lifecycle and Status
What are the PaymentIntent (PI) and PaymentAttempt (PA) statuses, and which indicate a successful payment?
What are the PaymentIntent (PI) and PaymentAttempt (PA) statuses, and which indicate a successful payment?
How do I determine whether to judge payment success from PI or PA status?
How do I determine whether to judge payment success from PI or PA status?
SUCCEEDED as authoritative for payment success. However, because a failed PA causes the PI to revert to REQUIRES_PAYMENT_METHOD rather than immediately FAILED, you should also monitor PA status to detect failure promptly.Recommended approach: subscribe to both acquiring.payment_attempt.succeeded (or acquiring.payment_intent.succeeded) and acquiring.payment_attempt.failed webhooks, and also use acquiring.cancel.succeeded for explicit cancellations.How long does a PaymentIntent remain open before it auto-closes?
How long does a PaymentIntent remain open before it auto-closes?
What is the difference between cancellation and refund?
What is the difference between cancellation and refund?
- Cancellation applies to payments that have not yet reached a final state — see Cancellation for eligibility rules per payment method.
- Refund applies to completed payments — see Refunds for eligibility, refundable amount, and fee handling.
After successfully capturing a card payment, can I still cancel it?
After successfully capturing a card payment, can I still cancel it?
SUCCEEDED), cancellation is not available. You must use the refund API if the original capture has been completed. See Cancellation for which payment methods support cancellation after success.3D Secure Integration
How do I control whether 3DS is triggered, and what fields do I need to send?
How do I control whether 3DS is triggered, and what fields do I need to send?
three_ds_action, browser_info, ip_address) and response handling (next_action.redirect_iframe vs next_action.redirect_to_url).After 3DS completes, the user is not redirected back to my `return_url`. What happened?
After 3DS completes, the user is not redirected back to my `return_url`. What happened?
- return_url not set: For 3DS, use the
three_ds.return_urlfield (not the top-levelreturn_url). After a successful 3DS authentication and payment, the user will be redirected to this URL. - Query parameters truncated: If your
return_urlcontains query parameters, verify they are URL-encoded correctly and not stripped. This was a known issue that has been fixed — if you still see truncation, contact support. - Both success and failure redirect: Previously, only successful payments redirected to
return_url; failures went to a UQPAY error page. This has been updated — both outcomes now redirect toreturn_url. Your results page should query the order status via API rather than relying on the redirect itself as confirmation of success.
I'm getting `device_id is invalid` errors for web payments. Can I skip the device ID?
I'm getting `device_id is invalid` errors for web payments. Can I skip the device ID?
device_id is often unavailable. The field is not required for web-context requests. You can omit it for browser-based integrations. Passing a fabricated device ID does not help and may increase rejection rates.Webhooks
How do I set up a webhook endpoint?
How do I set up a webhook endpoint?
I configured a webhook URL but I'm not receiving events. What should I check?
I configured a webhook URL but I'm not receiving events. What should I check?
- IP whitelist: If your server restricts inbound connections by IP, allowlist UQPAY’s webhook source IPs — see the IP whitelist section in Webhooks Overview.
- Subscription scope: Confirm that you subscribed to the correct event types in the portal.
- Multiple environments: If both your staging and production systems connect to the UQPAY production environment, you can configure multiple webhook URLs in the same subscription. Be aware that both URLs will receive all events — make sure your systems handle this correctly (e.g., avoid duplicate database writes).
Refunds
I tried to refund an order and got `Insufficient balance`. Why?
I tried to refund an order and got `Insufficient balance`. Why?
- Already-settled orders: Refunds are deducted from your
Available to pay outbalance. - Not-yet-settled orders: Refunds are deducted from your
Available soon(pending) balance.
When can I issue a refund in the sandbox?
When can I issue a refund in the sandbox?
SUCCEEDED status. Sandbox orders do not auto-settle, so you may encounter Invalid order status if you try to refund before the order reaches the correct state. Ask support to manually trigger settlement if you need to test the full refund flow in sandbox.If you get Refund is processing, please try again after, it means another refund request for the same order is already in progress. Wait for it to complete before submitting a new one.See Refunds and Testing in Sandbox.The refund succeeded on my end but was rejected by the issuer. What can I do?
The refund succeeded on my end but was rejected by the issuer. What can I do?
FAILED status on the refund after it was initially PROCESSING or INITIATED. Common reasons include the issuer’s internal fraud or compliance rules — these are not related to your integration parameters.If refunds are failing intermittently rather than consistently, the cause is likely the issuer side rather than a configuration issue. UQPAY will raise a ticket with the card network on your behalf, but final resolution depends on the issuer.Settlement and Reconciliation
Where do I find settlement reports?
Where do I find settlement reports?
POS Integration
Where do I find the POS API documentation?
Where do I find the POS API documentation?

