v1

latestOpenAPI 3.0.22026-07-26123510445.2 KB
Payment Attempts

Retrieve a PaymentAttempt

Retrieve details of a specific payment attempt by ID

get/v2/payment/payment_attempts/{id}

Path parameters

idstring required
Example:PA1234567890123456789

The ID of the payment attempt to retrieve

Headers

x-client-idstring required

The API client id generated by UQPAY

Response

Payment attempt details retrieved successfully

attempt_idstring required

Unique identifier for the attempt.

amountstring required
currencystring required

Three-letter currency code

captured_amountstring
refunded_amountstring
create_timestring date/time
update_timestring date/time
complete_timestring date/time
cancellation_reasonstring

Reason for canceling this PaymentIntent.

auth_codestring

Authorization code returned by the issuer upon successful authorization.

arnstring

Acquirer Reference Number (ARN). A 23-digit identifier used for cross-institution reconciliation and chargeback tracking.

rrnstring

Retrieval Reference Number (RRN). A 12-digit identifier used for transaction lookup and customer service queries.

advice_code'01' | '02' | '03' | '21' | '85'

Issuer advice code indicating the recommended action after a decline. Helps merchants implement intelligent retry strategies.

  • 01: New attempt may succeed. Retry recommended.
  • 02: Do not retry. Try a different payment method.
  • 03: Do not retry. Cardholder should contact their issuer.
  • 21: Cancel all pending authorizations. Card may be compromised.
  • 85: Do not retry. Issuer will not approve this transaction type.
failure_codestring

PaymentAttempt failure code. Possible values are defined in Error Code Reference.payment_error section.

attempt_status'INITIATED' | 'AUTHENTICATION_REDIRECTED' | 'PENDING_AUTHORIZATION' | 'AUTHORIZED' | 'CAPTURE_REQUESTED' | 'SETTLED' | 'SUCCEEDED' | 'CANCELLED' | 'EXPIRED' | 'FAILED'

The status of the attempt.

  • INITIATED: The payment attempt has been created based on the initial request.
  • AUTHENTICATION_REDIRECTED: Waiting for the customer to complete identity verification, such as 3D Secure or QR code scanning.
  • PENDING_AUTHORIZATION: The authorization request has been received and is pending a final decision from the payment provider.
  • AUTHORIZED: The authorization has been successfully completed. Payment will be captured automatically or manually depending on configuration.
  • CAPTURE_REQUESTED: The capture request has been submitted successfully, and the payment is considered complete.
  • SETTLED: Funds have been settled from the payment provider and received by UQPAY.
  • SUCCEEDED: UQPAY has settled funds to your wallet.
  • CANCELLED: The payment attempt has been cancelled. Any authorized funds, if applicable, will be returned to the customer.
  • EXPIRED: The payment attempt was not completed within the allowed time window and has expired.
  • FAILED: The payment attempt has failed. Please create a new PaymentAttempt to retry.

Example response

{
  "attempt_id": "24fc62b4-90d1-42e3-96ab-dd54ccc648b3",
  "create_time": "2024-03-01T00:00:00+08:00",
  "update_time": "2024-03-01T00:00:00+08:00",
  "complete_time": "2024-03-01T00:00:00+08:00",
  "cancellation_reason": "Order cancelled",
  "auth_code": "A12B3C",
  "arn": "74537604221222132710572",
  "rrn": "123456789012",
  "advice_code": "01",
  "authentication_data": {
    "avs_result": "Y",
    "three_ds": {
      "three_ds_version": "2.2.0",
      "eci": "05",
      "cavv": "AAABCZIhcQAAAABZlyFxAAAAAAA=",
      "three_ds_authentication_status": "Y",
      "three_ds_cancellation_reason": "01"
    }
  },
  "payment_method": {
    "card": {
      "card_name": "john doe",
      "card_number": "541333******4047",
      "brand": "visa",
      "bin": "541333",
      "last4": "4047",
      "expiry_month": "12",
      "expiry_year": "2027",
      "billing": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@example.com",
        "phone_number": "12025550123",
        "address": {
          "country_code": "SG",
          "city": "Singapore",
          "street": "444 Orchard Rd, Midpoint Orchard, Singapore ",
          "postcode": "924011"
        }
      }
    }
  },
  "attempt_status": "INITIATED"
}