Event Name: payment_completed
Description: Triggered when payment for an order is successfully completed or captured. Separates payment confirmation from order creation and shipping, and is usable across Shopify, WooCommerce, Shiprocket-connected flows, marketplaces, and custom gateways.
Use Cases:
- Payment success notifications (email/WhatsApp)
- Handling delayed or asynchronous payments
- Tracking partial and multi-instalment payments
- COD marked-as-paid events from logistics systems
- Reconciliation between order and payment systems
Complete Schema
Attributes Field Definitions
| Field | Type | Required | Description |
|---|---|---|---|
| order_id | string | Yes | Unique order identifier, from commerce platform or OMS |
| order_number | string | Yes | Human-readable order number shown to customer |
| order_url | string | No | URL where customer can view order details |
| payment_id | string | Yes | Unique identifier of payment transaction/intent |
| payment_status | string | Yes | Current payment status (e.g., succeeded, captured, pending_capture) |
| payment_method | string | Yes | Customer-facing payment method (card, upi, net_banking, wallet, cod, bank_transfer, emi, paypal, etc.) |
| payment_provider | string | No | Gateway or provider name (stripe, razorpay, shopify_payments, cashfree, paytm, phonepe, etc.) |
| payment_reference | string | No | External reference from gateway/bank (RRN, UTR, acquirer reference) |
| payment_currency | string | Yes | Currency of payment (ISO 4217) |
| payment_amount | number | Yes | Amount successfully paid in payment_currency |
| payment_fee | number | No | Processing fee charged by provider, if available |
| payment_captured | boolean | No | True if payment is fully captured/settled |
| order_total | number | No | Total order amount including taxes and shipping |
| order_currency | string | No | Currency of order_total |
| outstanding_amount | number | No | Remaining amount still unpaid for the order |
| is_partial_payment | boolean | No | True if this payment covers only part of the order_total |
| is_final_payment | boolean | No | True when, after this payment, the order becomes fully paid |
| payment_attempt_count | integer | No | Number of payment attempts made for this order/customer |
| previous_payment_status | string | No | Status immediately before this event (pending, requires_action, failed, etc.) |
| paid_at | string (ISO 8601) | No | Timestamp when gateway marked payment as successful |
| due_date | string (ISO 8601) | No | Due date for payment for pay-later or COD workflows |
| billing_email | string | No | Billing contact email used for payment |
| billing_phone | string | No | Billing contact phone number |
| billing_name | string | No | Full billing name from gateway or billing profile |
| billing_address_line1 | string | No | First line of billing address |
| billing_address_line2 | string | No | Second line of billing address |
| billing_city | string | No | Billing city |
| billing_state | string | No | Billing state or region |
| billing_postal_code | string | No | Billing postal/ZIP code |
| billing_country | string | No | Billing country (ISO 3166‑1 alpha‑2 preferred) |
| payment_channel | string | No | Channel where payment was made (web, mobile_web, mobile_app, pos, marketplace, call_center, etc.) |
| payment_reason | string | No | High-level purpose (initial_payment, retry, top_up, cod_marked_paid, subscription_renewal, etc.) |