Skip to content

Order now, pay later

Create orders without immediate payment, then collect funds when ready—perfect for pre-orders, approvals, and flexible checkout flows.

Sometimes you need to create an order before collecting payment—maybe you’re confirming inventory, waiting for manager approval, or building a pre-order system. This guide shows you how to decouple order creation from payment execution, giving you complete control over when and how you charge customers.

How it works

The standard payment flow combines order creation and payment into one step, but Inttegro lets you split them apart. First, create an order with executePayment: false (or omit it entirely) to capture the customer’s intent without charging them. Later, when you’re ready, call /orders/pay to initiate the charge, then confirm it with an OTP as usual. This pattern gives you flexibility while maintaining a complete audit trail from order creation through final payment.

Step 1: create the order without payment

Create the order exactly as you would for immediate payment, but set executePayment: false or leave out payment method details entirely. Inttegro creates the order, assigns it an ID, and saves all the details—but doesn’t contact the payment provider yet. The order status starts at Inttegro.OrderStatuses.Preparing, waiting for you to execute payment later.

Create order

POST/orders/create
cURLbash
curl https://api.inttegro.com/orders/create \
  -H "Authorization: Bearer $INTTEGRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "request_meta": {
    "idempotency_key": "order_2025_001"
  },
  "execute_payment": false,
  "customer_data": {
    "name": "Gloria Kesewaa",
    "email_address": "gloria@example.com",
    "phone_number": "+233544998605"
  },
  "line_items": [
    {
      "type": "product",
      "product": {
        "type": "physical",
        "name": "Custom Furniture",
        "quantity": 1,
        "price": {
          "currency": "ghs",
          "value": 150000
        }
      }
    }
  ]
}'
TypeScripttypescript
import { InttegroClient, LineItemTypes, ProductTypes } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.orders.create({
  requestMeta: {
    idempotencyKey: "order_2025_001",
  },
  executePayment: false,
  customerData: {
    name: "Gloria Kesewaa",
    emailAddress: "gloria@example.com",
    phoneNumber: "+233544998605",
  },
  lineItems: [
    {
      type: LineItemTypes.Product,
      product: {
        type: ProductTypes.Physical,
        name: "Custom Furniture",
        quantity: 1,
        price: {
          currency: "ghs",
          value: 150000,
        },
      },
    },
  ],
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/customer"
  "github.com/inttegro/inttegro-sdk-go/v14/money"
  "github.com/inttegro/inttegro-sdk-go/v14/order"
  "github.com/inttegro/inttegro-sdk-go/v14/price"
  "github.com/inttegro/inttegro-sdk-go/v14/product"
  "github.com/inttegro/inttegro-sdk-go/v14/request"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := order.CreateParams{
    RequestMeta: &request.Meta{
      IdempotencyKey: "order_2025_001",
    },
    ExecutePayment: inttegro.Bool(false),
    CustomerData: &customer.Data{
      Name: "Gloria Kesewaa",
      Email: "gloria@example.com",
      PhoneNumber: "+233544998605",
    },
    LineItems: []order.LineItemParams{
      {
        Type: order.LineItemTypeProduct,
        Product: &order.ProductLineItemParams{
          Type: product.TypePhysical,
          Name: "Custom Furniture",
          Quantity: 1,
          Price: price.InlineParams{
            AmountParams: money.AmountParams{
              Currency: money.GHS,
              Value: 150000,
            },
          },
        },
      },
    },
  }
  result, err := client.Orders.Create(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.orders.create(inttegro.order.CreateNewCustomerInput(
  request_meta=inttegro.order.CreateNewCustomerInputRequestMeta(
    idempotency_key="order_2025_001",
  ),
  execute_payment=False,
  customer_data=inttegro.customer.DataInput(
    name="Gloria Kesewaa",
    email_address="gloria@example.com",
    phone_number="+233544998605",
  ),
  line_items=[
    inttegro.product.LineItemInput(
      type=inttegro.order.LineItemType.PRODUCT,
      product=inttegro.product.InlineDetailsInput(
        type=inttegro.product.Type.PHYSICAL,
        name="Custom Furniture",
        quantity=1,
        price=inttegro.price.InlineParams(
          currency=inttegro.money.Currency.GHS,
          value=150000,
        ),
      ),
    ),
  ],
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->orders->create([
  'request_meta' => new \Inttegro\Request\Meta(
    idempotencyKey: 'order_2025_001',
  ),
  'execute_payment' => false,
  'customer_data' => [
    'name' => 'Gloria Kesewaa',
    'email_address' => 'gloria@example.com',
    'phone_number' => '+233544998605',
  ],
  'line_items' => [
    [
      'type' => \Inttegro\LineItemType::Product,
      'product' => [
        'type' => \Inttegro\ProductType::Physical,
        'name' => 'Custom Furniture',
        'quantity' => 1,
        'price' => [
          'currency' => 'ghs',
          'value' => 150000,
        ],
      ],
    ],
  ],
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.orders.create(
  request_meta: Inttegro::Order::CreateNewCustomerRequestMeta.new(
    idempotency_key: "order_2025_001",
  ),
  execute_payment: false,
  customer_data: {
    name: "Gloria Kesewaa",
    email_address: "gloria@example.com",
    phone_number: "+233544998605",
  },
  line_items: [
    {
      type: Inttegro::LineItemType::PRODUCT,
      product: {
        type: Inttegro::ProductType::PHYSICAL,
        name: "Custom Furniture",
        quantity: 1,
        price: {
          currency: "ghs",
          value: 150000,
        },
      },
    },
  ]
)
Javajava
import com.inttegro.Client;
import com.inttegro.orders.OrderCreateParams;
import com.inttegro.RequestMeta;
import com.inttegro.customers.CustomerData;
import com.inttegro.orders.OrderLineItemParams;
import com.inttegro.orders.ProductLineItemParams;
import com.inttegro.products.ProductType;
import com.inttegro.prices.PriceParams;
import com.inttegro.money.Currency;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = OrderCreateParams.builder()
      .requestMeta(RequestMeta.builder()
          .idempotencyKey("order_2025_001")
          .build())
      .executePayment(false)
      .customerData(CustomerData.builder()
          .name("Gloria Kesewaa")
          .email("gloria@example.com")
          .phoneNumber("+233544998605")
          .build())
      .lineItem(OrderLineItemParams.product(ProductLineItemParams.builder()
            .type(ProductType.PHYSICAL)
            .name("Custom Furniture")
            .quantity(1L)
            .price(PriceParams.of(Currency.GHS, 150000))
            .build()))
      .build();
    var result = client.orders().create(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Orders.CreateAsync(new OrderCreateRequest {
  RequestMeta = new RequestMeta {
    IdempotencyKey = "order_2025_001",
  },
  ExecutePayment = false,
  CustomerData = new CustomerData {
    Name = "Gloria Kesewaa",
    EmailAddress = "gloria@example.com",
    PhoneNumber = "+233544998605",
  },
  LineItems = new List<LineItemParams> {
    new LineItemParams {
      Type = Inttegro.LineItemType.Product,
      Product = new ProductDetailsParams {
        Type = Inttegro.ProductType.Physical,
        Name = "Custom Furniture",
        Quantity = 1,
        Price = new Inttegro.PriceParams {
          Currency = Inttegro.Money.Currency.GHS,
          Value = 150000,
        },
      },
    },
  },
});

Response

Response excerptjson
{
  "order": {
    "id": "cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
    "status": "preparing",
    "customer": {
      "id": "cu_abc123",
      "name": "Gloria Kesewaa",
      "email_address": "gloria@example.com"
    },
    "line_item_group": {
      "total": {
        "currency": "ghs",
        "value": 150000
      }
    }
  }
}

Key attributes:

Step 2: execute payment when ready

When you’re ready to collect payment—after confirming inventory, receiving approval, or whenever your business logic dictates—call /orders/pay with the order ID and payment method details. Inttegro contacts the mobile money provider, initiates the charge, and sends an OTP to the customer just like in the standard flow. You can provide new payment method details or reference a saved payment method if the customer has one.

Execute payment

POST/orders/pay
cURLbash
curl https://api.inttegro.com/orders/pay \
  -H "Authorization: Bearer $INTTEGRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
  "payment_method_data": {
    "type": "mobile_money",
    "mobile_money": {
      "network": "mtn",
      "account_number": "0544998605"
    }
  }
}'
TypeScripttypescript
import { InttegroClient, PaymentMethodTypes, MobileMoneyNetworks } from '@inttegro/inttegro-sdk'

const inttegro = new InttegroClient({
  apiKey: process.env.INTTEGRO_API_KEY!,
})

const result = await inttegro.orders.pay({
  orderId: "or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
  paymentMethodData: {
    type: PaymentMethodTypes.MobileMoney,
    mobileMoney: {
      network: MobileMoneyNetworks.MTN,
      accountNumber: "0544998605",
    },
  },
})
Gogo
package main

import (
  "context"
  "log"
  "os"

  inttegro "github.com/inttegro/inttegro-sdk-go/v14"
  "github.com/inttegro/inttegro-sdk-go/v14/order"
  "github.com/inttegro/inttegro-sdk-go/v14/paymentmethod"
)

func main() {
  ctx := context.Background()
  client := inttegro.NewClient(os.Getenv("INTTEGRO_API_KEY"))

  params := order.PayParams{
    OrderID: "or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
    PaymentMethodData: &paymentmethod.Data{
      Type: paymentmethod.TypeMobileMoney,
      MobileMoney: &paymentmethod.MobileMoneyParams{
        Network: paymentmethod.MobileMoneyNetworkMTN,
        AccountNumber: "0544998605",
      },
    },
  }
  result, err := client.Orders.Pay(ctx, params)
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

import inttegro
from inttegro import InttegroClient

client = InttegroClient(api_key=os.environ["INTTEGRO_API_KEY"])

result = client.orders.pay(inttegro.order.PayRequest(
  order_id="or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
  payment_method_data=inttegro.payment_method.DataInput(
    type=inttegro.payment_method.Type.MOBILE_MONEY,
    mobile_money=inttegro.payment_method.DataInputMobileMoney(
      network=inttegro.payment_method.MobileMoneyNetwork.MTN,
      account_number="0544998605",
    ),
  ),
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->orders->pay([
  'order_id' => 'or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p',
  'payment_method_data' => [
    'type' => \Inttegro\PaymentMethodType::MobileMoney,
    'mobile_money' => [
      'network' => \Inttegro\MobileMoneyNetwork::MTN,
      'account_number' => '0544998605',
    ],
  ],
]);
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.orders.pay(
  order_id: "or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
  payment_method_data: {
    type: Inttegro::PaymentMethodType::MOBILE_MONEY,
    mobile_money: {
      network: Inttegro::MobileMoneyNetwork::MTN,
      account_number: "0544998605",
    },
  }
)
Javajava
import com.inttegro.Client;
import com.inttegro.orders.OrderPayParams;
import com.inttegro.paymentmethods.PaymentMethodData;
import com.inttegro.paymentmethods.PaymentMethodType;
import com.inttegro.paymentmethods.MobileMoneyParams;
import com.inttegro.paymentmethods.MobileMoneyNetwork;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var params = OrderPayParams.builder()
      .orderId("or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p")
      .paymentMethodData(PaymentMethodData.builder()
          .type(PaymentMethodType.MOBILE_MONEY)
          .mobileMoney(MobileMoneyParams.builder()
              .network(MobileMoneyNetwork.MTN)
              .accountNumber("0544998605")
              .build())
          .build())
      .build();
    var result = client.orders().pay(params);
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Orders.PayAsync(new OrderPayRequest {
  OrderId = "or_cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
  PaymentMethodData = new PaymentMethodData {
    Type = Inttegro.PaymentMethodType.MobileMoney,
    MobileMoney = new MobileMoney {
      Network = Inttegro.MobileMoneyNetwork.MTN,
      AccountNumber = "0544998605",
    },
  },
});

Response

Response excerptjson
{
  "order": {
    "id": "cPxZ9kL2mQrTfVqYz1wNbMxKs8dGhJ4p",
    "status": "requires_payment",
    "payment": {
      "id": "py_xyz789",
      "status": "requires_action",
      "next_action": {
        "type": "confirm_payment",
        "confirm_payment": {
          "expires_at": "2025-01-13T10:08:00Z",
          "request": {
            "recipient": "0544998605",
            "sent_via": "sms"
          }
        }
      }
    }
  }
}

What changed:

Step 3: confirm payment with OTP

From here, the flow is identical to standard payments. The customer receives an OTP via SMS, enters it in your app, and you submit it to confirm the payment. Inttegro verifies the code, charges the mobile money account, and moves the order to Inttegro.OrderStatuses.Paid status.

Common use cases

The create and pay operations above stay the same across these workflows. What changes is the business condition that decides when your application pays or cancels the order.

Pre-orders with inventory confirmation

Create the unpaid order when the customer places the pre-order and store its ID with your inventory reservation. Pay it after stock is confirmed. If the item is unavailable, cancel the order and tell the customer instead of leaving an open order behind.

Manager approval workflows

Create the unpaid order before sending it through your approval process. Keep the Inttegro order ID with the approval record, then pay only after approval. Cancel declined requests so the order’s state agrees with your internal record.

Subscription setup before first charge

Create the unpaid first order so the customer can review the plan, price, and billing date before money moves. Pay it after they accept. Schedule future renewals only after that first payment succeeds.

Layaway and installment plans

Keep the layaway plan in your own system and create a separate Inttegro order for each installment. Each payment then has its own amount, idempotency key, and lifecycle while still linking back to the same plan in your data.

Handling edge cases

Customer cancels before payment

Cancel the Inttegro order as well as updating your own record. This makes the order terminal and prevents a later payment attempt against an order the customer has abandoned. See Cancel an order.

Payment method changes between creation and payment

The customer can choose a different payment method before payment starts. Pass the newly selected payment-method details when you pay the order; the order does not need to be recreated.

Order expires before payment

Set an expiration policy for unpaid orders. Look up the order before payment; if it is outside your allowed window, cancel it and ask the customer to create a new one rather than reviving stale prices or inventory decisions.

Testing

Use an application configured for the test environment. Create a draft order, call Pay for an order when your test workflow is ready to charge it, then inspect the returned order. If confirmation is required, follow Confirm a payment with orderId, paymentId, confirmationId, and the test token supplied for that environment.

Key tips

Track order state: Since payment is deferred, maintain clear status tracking in your database. Use your own states—such as pending approval, awaiting inventory, or ready for payment—to record why each order is waiting.

Set expiration policies: Decide how long orders can remain unpaid before they expire. Common policies: 24 hours for standard orders, 7 days for pre-orders, 30 days for B2B approvals. Check age before executing payment.

Communicate clearly: Tell customers when they’ll be charged. “You won’t be charged until we confirm availability” or “Payment will be collected after manager approval.” Set expectations upfront.

Handle abandoned orders: Not all created orders will result in payment. Set up automated processes to follow up on unpaid orders, remind customers, or clean up very old orders from your database.

Next steps

You now know how to decouple order creation from payment execution. This pattern gives you the flexibility to build pre-orders, approval workflows, and any scenario where charging happens after order creation.

Type to search…

↑↓ navigate↵ selectEsc close