Skip to main content

Pay Payment Link

Initiate payment for a payment link. Creates a payment intent that the customer can use to complete the payment.

note

This is a public endpoint — no authentication headers are required.

POSThttps://api.zenpayz.com/merchant/api/v1/payment-links/:linkId/pay
Bearer · API key

Request

Path Parameters

ParameterTypeDescription
linkId
REQUIRED
stringThe payment link ID (e.g. pl_a1b2c3d4e5f6g7h8)

Body Parameters

ParameterTypeDescription
customerEmail
OPTIONAL
stringCustomer email address

Response

Success (200 OK)

{
"success": true,
"data": {
"linkId": "pl_a1b2c3d4e5f6g7h8",
"paymentIntentId": "pi_x1y2z3w4v5u6t7s8",
"amount": 4999,
"currency": "INR",
"checkoutUrl": "https://checkout.zenpayz.com/pay/pi_x1y2z3w4v5u6t7s8"
},
"message": "Payment initiated successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-01-15T10:30:00.000Z",
"processing_time_ms": 130,
"api_version": "v1",
"endpoint": "POST /payment-links/:linkId/pay",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
PAYMENT_LINK_NOT_FOUND404Payment link does not exist
PAYMENT_LINK_EXPIRED410Payment link has expired
PAYMENT_LINK_INACTIVE410Payment link is inactive
PAYMENT_LINK_MAX_USES_REACHED409Payment link has reached its maximum number of uses

Examples

curl -X POST https://api.zenpayz.com/merchant/api/v1/payment-links/pl_a1b2c3d4e5f6g7h8/pay \
-H "Content-Type: application/json" \
-d '{
"customerEmail": "john@example.com"
}'