Skip to main content

Get Payment Intent

Retrieve details of a payment intent by its ID.

GEThttps://api.zenpayz.com/api/v1/payment-intents/{intentId}
Bearer · API key

Request

Path Parameters

ParameterTypeDescription
intentId
REQUIRED
stringPayment intent ID (e.g., pi_xxxxx)

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation
note

For GET requests, use an empty object {} when calculating the signature.

Response

Success (200 OK)

{
"success": true,
"data": {
"intentId": "pi_1771910100598_prckpcg01",
"status": "succeeded",
"amount": 100,
"currency": "INR",
"transactionId": "txn_abc123",
"externalTransactionId": "ext_xyz789",
"createdAt": "2026-02-24T05:15:00.599Z",
"completedAt": "2026-02-24T05:16:30.000Z",
"metadata": {},
"events": [
{
"event": "payment_intent.created",
"timestamp": "2026-02-24T05:15:00.599Z"
},
{
"event": "payment_intent.confirmed",
"timestamp": "2026-02-24T05:15:05.000Z"
},
{
"event": "payment_intent.succeeded",
"timestamp": "2026-02-24T05:16:30.000Z"
}
]
},
"message": "Payment intent retrieved successfully",
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-24T05:17:00.000Z",
"processing_time_ms": 45,
"api_version": "v1",
"endpoint": "GET /payment-intent/:intentId"
}
}

Error Responses

CodeHTTPMessage
UNAUTHORIZED401Invalid API key
PAYMENT_INTENT_NOT_FOUND404Payment intent doesn't exist

Examples

curl -X GET "https://api.zenpayz.com/api/v1/payment-intents/pi_1234567890abcdef" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"

Payment Intent Status

StatusDescription
requires_payment_methodAwaiting payment method selection
processingPayment is being processed
succeededPayment completed successfully
failedPayment failed
cancelledPayment was cancelled
expiredPayment intent expired