---
title: "Order lifecycle"
description: "Understand order and payment status transitions at every stage from creation to completion."
canonical: "https://studio.inttegro.com/guides/order-lifecycle"
format: inttegro-machine-docs/v1
language: "Go"
sdk_version: "v11.0.1"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/go/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 648
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: ["get_integration_guide","check_integration_readiness","get_order"]
estimated_tokens: 1915
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Understand order and payment status transitions at every stage from creation to completion. This Go representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Order lifecycle?

Use this guide when implementing the complete business outcome rather than an isolated request.

#### Q2. What is authoritative on this page?

The guide owns the business sequence and verification logic. Its linked API references own the exact request, response, state, and error contracts.

#### Q3. What page-specific constraint matters most?

Keep the documented ordering, trust boundary, idempotency behavior, and authoritative read-after-write verification intact.

#### Q4. Can Inttegro MCP materially help with this task?

Yes, when the reader has an authenticated MCP connection and the task needs live context, guided planning, or a supported operation. The strongest matches are `get_integration_guide`, `check_integration_readiness`, `get_order`; their exact roles and boundaries are listed below.

#### Q5. How should the reader verify the answer and continue?

Use the guide’s explicit completion condition and verify the final resource through the documented lookup or lifecycle state; a successful redirect or accepted request may be intermediate. Continue with [Product: Orders](https://studio.inttegro.com/machine/go/products/orders.md) and [Accept a payment](https://studio.inttegro.com/machine/go/guides/accept-a-payment.md) when those concerns enter scope.

### Recommended MCP assistance

Use these through an authenticated Inttegro MCP connection. This document remains the contract source.

- [`get_integration_guide`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_integration_guide) — read-only integration guidance. Returns a focused implementation sequence and canonical Studio links for authentication, checkout, orders, catalog, messaging, idempotency, or testing.
- [`check_integration_readiness`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#check_integration_readiness) — read-only integration guidance. Audits platform secret storage, server-runtime compatibility, idempotency, errors, state verification, checkout returns, and messaging consent without receiving source code or credentials.
- [`get_order`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#get_order) — read; no mutation confirmation. Gets one order by ID with a minimized, contact-free projection of order, payment, and timing state.

## Document content

# Order lifecycle

Every order moves through a predictable sequence of statuses as it progresses from creation to payment completion. Understanding these transitions helps you build accurate UI states and debug payment flows with confidence.

> Mcp Guide Callout is interactive content. Use the canonical page to view it.

## Status transitions

Orders and payments have separate state. Read both after every operation; do not
infer one from the other.

| Stage              | Order                                                     | Payment                                                          | Next action                                                                  |
| ------------------ | --------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| Draft or finalized | `"preparing"`        | `"requires_action"` | `"execute"`           |
| Payment started    | `"requires_payment"` | `"requires_action"` | `"confirm_payment"`   |
| OTP confirmed      | `"requires_payment"` | `"requires_action"` | `"authorize_payment"` |
| Payment successful | `"paid"`             | `"paid"`            | `nil`                   |
| Fulfilled          | `"completed"`        | `"paid"`            | `nil`                   |

## Move the order forward

### Create and finalize

Call [Create an order](https://studio.inttegro.com/machine/go/api/orders.md#create-an-order). A draft order has no hosted
invoice. Set [`Finalize`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#CreateParams.Finalize)
to `true` to seal it and generate
the invoice, or finalize it later. Before payment starts, use [Update an
order](https://studio.inttegro.com/machine/go/api/orders.md#update-an-order) to replace mutable details.

### Start payment

Call [Pay for an order](https://studio.inttegro.com/machine/go/api/orders.md#pay-for-an-order), or set

[`ExecutePayment`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#CreateParams.ExecutePayment) to `true` during creation. When confirmation is required, collect the OTP and call
[Confirm a payment](https://studio.inttegro.com/machine/go/api/orders.md#confirm-a-payment).

- Read [`Order.Payment.NextAction.Type`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) to decide what the customer must do next.
- Use [`Order.Payment.NextAction.ConfirmPayment.ExpiresAt`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) for the OTP countdown.
- After confirmation, wait for provider authorization and continue polling [Look up an order](https://studio.inttegro.com/machine/go/api/orders.md#lookup-an-order).
- Fulfill only when [`Order.Status`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) is `"paid"`.

### Complete fulfillment

After delivering the goods or service, call [Complete an
order](https://studio.inttegro.com/machine/go/api/orders.md#complete-an-order). The order moves from `"paid"` to `"completed"`

. Completion is terminal.

## Handle other outcomes

- If [`Order.Payment.Status`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) is `"failed"`, show the failure and let the customer retry. The order normally remains `"requires_payment"`.
- A canceled order has [`Order.Status`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) set to `"canceled"` and cannot restart payment.
- An expired order has [`Order.Status`](https://pkg.go.dev/github.com/inttegro/inttegro-sdk-go/v11@v11.0.1/order#Order) set to `"expired"`. Create a new order instead of reviving stale prices or inventory decisions.

## Related resources

- [Orders API](https://studio.inttegro.com/machine/go/api/orders.md) - Complete order endpoint documentation
- [Accept a payment](https://studio.inttegro.com/machine/go/guides/accept-a-payment.md) - Step-by-step payment guide
  with code examples
- [Product: Orders](https://studio.inttegro.com/machine/go/products/orders.md) - High-level overview of the
  Orders API
