In this article, you will learn in detail about webhooks.
- Register your webhook URLs to get notified of certain events.
- Add customer, beneficiary any remitter details using the endpoint and use those ids while creating an order.
- Upload documents using Upload bulk doc endpoint and note down the bulk_doc_id and use that id to link those documents with the order.
- In the Create Order response, you will get a payment link to complete the payment using that URL.
- Once the order is created if any doc is missing use the Upload Documents endpoint to upload that document for the order.
- Once your payment and doc upload is completed you can hit process order to start remittance.
- You can get updated on order_url related to orders for approved and rejected docs.
Request Body
curl --location 'https://sandbox.cashfree.com/pg/lrs/webhooks' \
--header 'x-client-id: {client_id_lrs}' \
--header 'x-client-secret: {client_secret_lrs}' \
--header 'x-api-version: 2023-03-01' \
--data '{
"payment_url": "https://webhook.site/da93ae47-4bdf-4b2b-9144-56e57a345592",
"refund_url": "https://webhook.site/da93ae47-4bdf-4b2b-9144-56e57a345592",
"order_url": "https://webhook.site/da93ae47-4bdf-4b2b-9144-56e57a345592"
}'
Event Types
ID | Event Name |
---|---|
1 | PAYMENT_UPDATE |
2 | A2_FORM_GENERATED |
3 | DOCUMENT_SENT_FOR_VERIFICATION |
4 | DOCUMENT_VERIFICATION_UPDATE |
5 | REMITTANCE_DONE |
6 | REFUND_INITIATED |
7 | REFUND_PROCESSED |
8 | REFUND_HOLD |
9 | REFUND_UPDATE |
0 | ORDER_EXPIRED |
1 | PROCESS_UPDATE_MISSING_DOCUMENT |
Order Status
ID | Status Name |
---|---|
1 | ORDER_PAID |
2 | ORDER_DOC_UPLOADED |
3 | ORDER_DOC_UNDER_VERIFY |
4 | ORDER_DOC_REJECTED |
5 | ORDER_DOC_VERIFIED |
6 | ORDER_REMITTANCE_DONE |
7 | ORDER_REFUND_INITIATED |
8 | ORDER_REFUND_DONE |
9 | ORDER_REFUND_HOLD |
0 | ORDER_EXPIRED |
Transaction Status
ID | Transaction Status Name |
---|---|
1 | TXN_SUCCESS |
2 | TXN_FAILED |
3 | TXN_INCOMPLETE |
4 | TXN_PENDING |
5 | TXN_FLAGGED |
6 | TXN_CANCELLED |
7 | TXN_VOID |
8 | TXN_USER_DROPPED |