> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Order-Payment Relationship

> Understand the order and payment state machine, and fulfil only when the order is paid.

Available in
🇮🇳 India

An order is the purchase; a payment is one attempt to pay for it. Create one order per purchase. Fulfil only when the order is `paid`. With partial payments, fulfil on `order.paid`, not on each `payment.captured`.

| Entity | State | What it means |
| - | - | - |
| Order | `created` | No payment attempted yet. |
| Order | `attempted` | At least one payment attempted; none captured. It can still be paid. |
| Order | `paid` | A payment on it is captured. Fulfil now. |
| Payment | `created` | Attempt started; the customer is authenticating. |
| Payment | `authorized` | The bank approved it. Capture within your window, or it is refunded automatically. |
| Payment | `captured` | Payment complete; settles on your schedule. |
| Payment | `failed` | This attempt failed. If the bank confirms late, it moves to `authorized` (late authorisation). |
| Payment | `refunded` | Fully or partly returned to the customer. |

### Related Information

* [Best Practices](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/test-s2s/best-practices)
* [Payment States and Late Authorisation](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/test-s2s/best-practices/payment-states-and-late-authorisation.md)
* [Orders](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/test-s2s/orders.md)
