Cashfree One-Time Payments Integration Docs
Use this docs as a friendly reference for creating payment orders, payment links, webhooks, and payment lookup endpoints.
What we supports
We supports two common one-time payment entry points:
- Direct one-time orders using
create-orderwithtype: one_time. - Shareable payment links using
create-payment-link.
It also supports:
- Cancelling payment links.
- Listing payment records.
- Handling payment webhooks.
Base Contract
All routes are tenant-scoped:
/tenant/:tenantId/customer/...
Most endpoints require a bearer token in theAuthorizationheader.
Authorization: Bearer <token>
Content-Type: application/json
1) Create a One-Time Order
Usecreate-orderwhen you want to collect a direct one-time payment.
Endpoint
POST /tenant/:tenantId/customer/create-order
Check Here
Example request
curl -X POST "https://your-api/tenant/123/customer/create-order" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"type": "one_time",
"amount": 500,
"currency": "INR",
"leadId": "lead_001",
"customerId": "cust_001",
"name": "John Doe",
"email": "john@example.com",
"contact": "9876543210",
"notes": {
"purpose": "Monthly fee"
},
"notify": true,
"returnUrl": "https://your-app.com/payments/success",
"notifyUrl": "https://your-api/tenant/123/customer/webhook"
}'
Notes
typemust beone_time.amountis required and must be greater than0.contactis required.emailis optional for one-time payments.
2) Create a Payment Link
Usecreate-payment-linkwhen you want Cashfree to generate a reusable payment link for collecting a one-time payment.
Endpoint
POST /tenant/:tenantId/customer/create-payment-link
Check Here
Example request
curl -X POST "https://your-api/tenant/123/customer/create-payment-link" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"leadId": "lead_001",
"amount": 500,
"currency": "INR",
"customerName": "John Doe",
"customerEmail": "john@example.com",
"customerPhone": "9876543210",
"purpose": "Monthly fee",
"returnUrl": "https://your-app.com/payments/success",
"notifyUrl": "https://your-api/tenant/123/customer/webhook"
}'
Notes
- Use this when you want to send a link instead of opening checkout immediately.
- The response contains the Cashfree payment link data and the stored payment record.
3) Webhooks
Use your tenant webhook endpoint to receive payment status updates from Cashfree.
Endpoint
POST /tenant/:tenantId/customer/webhook
Check Here
Payment webhook events
PAYMENT_LINK_EVENTPAYMENT_SUCCESS_WEBHOOKPAYMENT_FAILED_WEBHOOK
Important
- Keep the raw request body available for signature verification.
- Persist webhook results so you can reconcile payment state.
4) Read and Manage Payments
List payments
GET /tenant/:tenantId/customer/get-payments
Check Here
Useful query params:
leadIdtype(one_time,payment_link,subscription_auth,subscription_link,subscription-charged,transfer)pagelimitstatussubscriptionIdplanIdbeneficiaryIdallfromtofilter
Cancel a payment link
POST /tenant/:tenantId/customer/cancel-payment-link/:id
Check Here
Use this to cancel an unpaid payment link by database ID.
Integration Checklist
- Choose direct order or payment link.
- Create the one-time payment.
- Send the customer to the returned checkout or payment link.
- Handle payment webhooks.
- Query payment records with
get-payments. - Cancel unpaid links when needed.