Skip to main content

Confirm Payment

Confirm a payment intent with customer and payment method details. This initiates the actual payment processing.

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

Request

Path Parameters

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

Headers

HeaderDescription
Content-Type
REQUIRED
application/json
X-Request-Id
OPTIONAL
Unique request identifier (auto-generated if not provided)
note

This endpoint is public — no API key or signature required. It is called from the checkout page on behalf of the customer.

Body

{
"customerDetails": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+911234567890",
"address": {
"country": "IN"
}
},
"paymentMethodDetails": {
"paymentMethod": "FIAT",
"paymentType": "UPI",
"upiId": "john@upi"
},
"deviceInfo": {
"userAgent": "Mozilla/5.0 ...",
"browserInfo": "Mozilla/5.0 ...",
"screenWidth": 1512,
"screenHeight": 982,
"deviceFingerprint": "a1b2c3d4e5f6",
"metadata": {
"selectedPaymentMethod": "fiat",
"selectedMethod": "upi",
"specificPaymentMethod": "UPI",
"customerCurrency": "INR"
}
}
}

Field Reference

customerDetails (required)

ParameterTypeDescription
name
REQUIRED
stringCustomer full name (max 100 chars)
email
REQUIRED
stringCustomer email
phone
OPTIONAL
stringCustomer phone (max 15 chars)
address.country
OPTIONAL
stringISO 3166-1 alpha-2 country code

paymentMethodDetails (optional)

ParameterTypeDescription
paymentMethod
REQUIRED
stringFIAT or CRYPTO
paymentType
REQUIRED
stringPayment type within the method (see below)

Fiat payment types (paymentMethod: "FIAT"):

paymentTypeAdditional FieldsDescription
UPIupiId (string) — UPI VPA e.g. user@upiUPI payment
CARDcardNumber, expiryMonth, expiryYear, cvv, cardHolderNameCard payment
NETBANKINGbankCode (string) — bank codeNet banking
BANK_TRANSFERBank transfer
PIXPIX (Brazil)
WALLETWallet payment

Crypto payment types (paymentMethod: "CRYPTO"):

paymentTypeAdditional FieldsDescription
DIRECT_CRYPTOchain (string) — blockchain e.g. ethereum, tronDirect crypto payment
BUY_WITH_WALLETchain (string) — blockchainCrypto purchase via wallet

deviceInfo (optional)

ParameterTypeDescription
userAgent
OPTIONAL
stringBrowser user agent
browserInfo
OPTIONAL
stringBrowser info string
screenWidth
OPTIONAL
numberScreen width in pixels
screenHeight
OPTIONAL
numberScreen height in pixels
deviceFingerprint
OPTIONAL
stringDevice fingerprint hash
metadata
OPTIONAL
objectAdditional context (selected method, customer currency, etc.)

Response

Success (200 OK)

{
"success": true,
"data": {
"intentId": "pi_1771910100598_prckpcg01",
"status": "processing",
"redirectUrl": "https://checkout.zenpayz.io/pay/xxxxx",
"externalTransactionId": "txn_abc123"
},
"message": "Payment confirmed successfully",
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-24T05:15:00.599Z",
"processing_time_ms": 1250,
"api_version": "v1",
"endpoint": "POST /payment-intent/:intentId/confirm"
}
}

Error Responses

CodeHTTPMessage
INVALID_REQUEST400Missing required fields
UNAUTHORIZED401Invalid API key
PAYMENT_INTENT_NOT_FOUND404Intent doesn't exist
STATE_CONFLICT409Intent not in valid state
PAYMENT_FAILED422Payment processing failed
CHANNEL_LIMIT_MIN_EXCEEDED422Amount below minimum for payment method
CHANNEL_LIMIT_MAX_EXCEEDED422Amount exceeds maximum for payment method

Examples

# No authentication required — this is a public endpoint
curl -X POST "https://api.zenpayz.com/api/v1/payment-intents/pi_1771910100598_prckpcg01/confirm" \
-H "Content-Type: application/json" \
-d '{
"customerDetails": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+911234567890",
"address": { "country": "IN" }
},
"paymentMethodDetails": {
"paymentMethod": "FIAT",
"paymentType": "UPI",
"upiId": "john@upi"
},
"deviceInfo": {
"userAgent": "Mozilla/5.0...",
"deviceFingerprint": "a1b2c3d4e5f6"
}
}'

Handling Payment Actions

The response may require additional actions:

Action TypeDescriptionNext Step
redirectRedirect to payment pageNavigate to redirectUrl
3ds_authentication3D Secure requiredShow 3DS popup/iframe
otp_verificationOTP requiredDisplay OTP input
noneNo action neededPayment complete