order.payment.debited
order.payment.debited
Section titled “order.payment.debited”Overview
Section titled “Overview”The order.payment.debited webhook event is triggered when a successful payment is made for the order.
Payload
Section titled “Payload”| Attribute | Type | Description |
|---|---|---|
event_id | String | A unique identifier for the webhook event. |
event | String | The event type; in this case, “order.payment.debited” |
version | String | The version of the webhook payload format (here, “1.0”). |
timestamp | Integer | The Unix timestamp when the event was originated. |
payload | Object | Detailed information about the event. |
payload.order_id | String | The unique order id in JODO system. |
payload.order | Object | The information about the order. |
payload.order.name | String | The name of the parent. |
payload.order.phone | String | The phone number of the parent. |
payload.order.identifier | String | The identifier of the order. |
payload.order.email | String | The email of the parent. |
payload.order.paid_at | String | The datetime str indicating at what time the payment was done. |
payload.order.status | String | The current status of the payment order. |
payload.order.details | Array | The fee component breakdown of the order. |
payload.order.details[].component_type | String | The type of fee component (e.g., TUITION_FEE, TRANSPORT_FEE). |
payload.order.details[].amount | Number | The amount corresponding to the fee component. |
payload.order.notes | Array | List of key value pairs passed during the creation of order. |
Example
Section titled “Example”{ "event_id": "45bb1387-2a83-4fdb-a149-e7dec81043f0", "event": "order.payment.debited", "version": "1.0", "timestamp": 1691143279, "payload": { "order_id": "order_12343532424", "order": { "name": "Ron Rivest", "phone": "9876543210", "identifier": "STUDENT_IDENTIFIER", "email": "customer@example.com", "paid_at": "2023-04-05T07:07:20Z", "status": "paid", "details": [{ "component_type": "Admission Fee", "amount": 10000.0 }], "notes": [ { "key": "erp_reference_id", "value": "REF123" } ] } }}Handling the Event
Section titled “Handling the Event”Upon receiving the order.payment.debited event, you can mark the given order as paid.