v1

latestOpenAPI 3.0.1MIT2026-07-26336777.7 KB

You can use this API to get the status of the transaction that corresponds to a particular intent. This API also returns the masked card info of the payer (if it's a card transaction) and the transaction lifecycle, which includes multiple attempts, failures, and other checkpoints during a transaction.

get/payments/v2/get-intent/{xIntentId}

Path parameters

xIntentIdstring required
Example:in_fooBOwYsaK50AEfK

Unique identifier of the intent

Query parameters

expandstring[]

List of fields to expand in the response. Available options:

  • charge_attempts : includes all charge attempts
  • succeeded_charge : includes the successful charge details

Response

Successful response with transaction status and related details

amountinteger

The amount in lowest count unit (e.g., cents for USD)

currencystring

Three-letter currency code

presentmentCurrencystring

The currency that the customer paid in

receiptIdstring

Your identifier for the order

customerReferenceIdstring

Your unique identifier for the customer. This can be used to associate the payment with a specific customer in your system.

descriptionstring

Description of the order, if any

callbackUrlstring

Callback URL to notify order status

cancelUrlstring

The URL to redirect the customer to when they cancel the payment.

createdAtstring date-time

Timestamp of when the intent was created

statusstring

Current status of the intent. Refer payment statuses

xIntentIdstring

Unique identifier of the intent

succeededAtinteger

Epoch timestamp in milliseconds of when the payment was successfully completed

metadataobject

A collection of key-value pairs that were provided when the object was created. These metadata values are echoed back in the response, allowing you to store and retrieve custom information such as context-specific attributes, references, or tags. This can be useful for correlating records in your system or attaching meaningful context to transactions.

paymentMethod'CARD' | 'GOOGLE_PAY' | 'APPLE_PAY' | 'PAYPAL' | 'AMAZON_PAY' | 'CASH_APP' | 'KLARNA' | 'AFTERPAY' | 'AFFIRM' | 'VENMO' | 'CARD_INSTALLMENT'

The payment method associated with a successful intent. See Payment Methods for the full list of supported payment methods and their availability.

Example response

{
  "amount": 100,
  "currency": "USD",
  "presentmentCurrency": "USD",
  "receiptId": "order123",
  "customerDetails": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "contactNumber": "+919123456789",
    "customerAddress": {
      "addressLine1": "123 Main St",
      "addressLine2": "Apt 1",
      "city": "New York",
      "state": "NY",
      "country": "US",
      "postalCode": "2424"
    }
  },
  "customerReferenceId": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
  "description": "Order for 2 items",
  "callbackUrl": "https://example.com/callback",
  "cancelUrl": "https://example.com/cancel",
  "createdAt": "2024-09-26T10:41:50.472+00:00",
  "status": "CREATED",
  "xIntentId": "in_fooBOwYsaK50AEfK",
  "succeededAt": 1727340330123,
  "metadata": {
    "orderId": "12345",
    "customerNote": "Deliver after 5 PM"
  },
  "chargeAttempts": [
    {
      "status": "FAILED",
      "paymentMetadata": {
        "paymentMethod": "CARD",
        "cardMetadata": {
          "brand": "visa",
          "country": "US",
          "lastFourDigit": "4242",
          "expiryMonth": 12,
          "expiryYear": 2025,
          "cardType": "CREDIT"
        }
      },
      "chargeTime": 1727340330123,
      "errorCode": "card_declined"
    },
    {
      "status": "SUCCESS",
      "paymentMetadata": {
        "paymentMethod": "CARD",
        "cardMetadata": {
          "brand": "visa",
          "country": "US",
          "lastFourDigit": "4242",
          "expiryMonth": 12,
          "expiryYear": 2025,
          "cardType": "CREDIT"
        }
      },
      "chargeTime": 1727340331123,
      "errorCode": null
    }
  ],
  "succeededCharge": {
    "status": "SUCCESS",
    "paymentMetadata": {
      "paymentMethod": "CARD",
      "cardMetadata": {
        "brand": "visa",
        "country": "US",
        "lastFourDigit": "4242",
        "expiryMonth": 12,
        "expiryYear": 2028,
        "cardType": "CREDIT"
      },
      "cardInstallmentMetadata": {
        "cardInstallmentTenure": "three"
      }
    },
    "chargeTime": 1727340330123,
    "errorCode": "card_declined"
  },
  "paymentMethod": "CARD"
}