Skip to main content

The PaymentIntent object

Represents a payment intent - the core object for initiating payments. A payment intent tracks the lifecycle of a payment from creation through completion or failure. It holds all the information needed to process the payment and is updated as the payment progresses.

Fields

FieldTypeDescription
id
REQUIRED
stringUnique identifier for the payment intent
merchantId
REQUIRED
stringID of the merchant receiving the payment
merchantName
OPTIONAL
stringDisplay name of the merchant
merchantLogo
OPTIONAL
stringURL to the merchant's logo for display on payment pages
description
OPTIONAL
stringDescription of what the payment is for
amount
REQUIRED
numberPayment amount in the smallest currency unit (e.g., cents for USD)
currency
REQUIRED
stringThree-letter ISO currency code
status
REQUIRED
PaymentStatusCurrent status of the payment intent PaymentStatus
customerName
OPTIONAL
stringName of the customer making the payment
customerEmail
OPTIONAL
stringEmail of the customer making the payment
customerPhone
OPTIONAL
stringPhone number of the customer making the payment
processingFee
OPTIONAL
numberProcessing fee charged for this payment
expiresAt
OPTIONAL
stringISO 8601 timestamp when the payment intent expires
metadata
OPTIONAL
Record<string, unknown>Custom key-value data attached to the payment
supportedPaymentMethods
OPTIONAL
string[]Payment methods available for this intent (e.g. 'UPI', 'UPIQR-H5', 'CARD')
supportedCountries
OPTIONAL
string[]Supported countries for this intent (ISO 2-letter codes)
channelLimits
OPTIONAL
Record<string, Record<string, { min: number, max: number }>>Per-currency, per-method min/max transaction limits
selectedTsp
OPTIONAL
stringTSP selected for processing this payment
createdAt
OPTIONAL
stringISO 8601 timestamp when the payment intent was created
updatedAt
OPTIONAL
stringISO 8601 timestamp when the payment intent was last updated

Example

{
"id": "obj_1a2b3c",
"merchantId": "merchant_1a2b3c",
"merchantName": "string",
"merchantLogo": "string",
"description": "string",
"amount": 5000,
"currency": "USD",
"status": "pending"
}

Usage

const intent = await client.payments.create({
amount: 5000, // $50.00
currency: 'USD',
description: 'Order #12345'
});
console.log(`Payment URL: ${intent.paymentUrl}`);