Skip to content

Accept payment with Inttegro Checkout

Present secure hosted Checkout from a finalized Order or an existing Purchase Intent.

Present Inttegro-hosted Checkout from the payment reference your application already owns. Inttegro handles amount selection when applicable, payment, confirmation, and receipt generation.

Choose the Checkout reference

What your application has What to pass to Checkout What not to do
An existing fixed-price or customer-selected Purchase Intent Pass its sale_... ID to createCheckout({ purchaseIntentId }). Do not create an Order first. For customer-selected pricing, do not collect the amount yourself.
An application-approved purchase with known customer and line items Create and finalize the Order on your server, then pass its or_... ID to createCheckout({ orderId }). Do not expose the API key or let the browser change commercial details.

For an existing Purchase Intent, the complete browser handoff is deliberately small:

payment.tstypescript
import { loadInttegro } from '@inttegro/js'

const inttegro = await loadInttegro()
if (!inttegro) throw new Error('Checkout requires a browser.')

const checkout = inttegro.createCheckout({ purchaseIntentId })
await checkout.present()

See the JavaScript Checkout guide for embedded presentation, framework adapters, lifecycle events, and server-side reconciliation. The remaining steps on this page cover the new-Order path.

Step 1: create an order

Call /orders/create with customer details and line items, and set finalize to true. Finalization seals the order and generates its hosted invoice URLs. Store the order ID for status tracking.

Send a unique, stable Idempotency-Key header for each order-creation attempt. If a request times out or its result is unclear, retry the same request with the same key so it does not create a second order. Use a new key when the request payload changes. requestMeta.idempotencyKey remains accepted for compatibility, but new integrations should use the header.

Create order

POST/orders/create
cURLbash
curl https://api.inttegro.com/orders/create \
  -H "Authorization: Bearer $INTTEGRO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order_inv_001" \
  -d '{
  "customer_data": {
    "name": "Gloria Kesewaa",
    "email_address": "gloria@example.com",
    "phone_number": "+233544998605"
  },
  "finalize": true,
  "line_items": [
    {
      "type": "product",
      "product": {
        "type": "physical",
        "name": "Utility Sneakers",
        "quantity": 1,
        "price": {
          "currency": "ghs",
          "value": 20000
        }
      }
    }
  ]
}'
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_inv_001",
  },
  customerData: {
    name: "Gloria Kesewaa",
    emailAddress: "gloria@example.com",
    phoneNumber: "+233544998605",
  },
  finalize: true,
  lineItems: [
    {
      type: LineItemTypes.Product,
      product: {
        type: ProductTypes.Physical,
        name: "Utility Sneakers",
        quantity: 1,
        price: {
          currency: "ghs",
          value: 20000,
        },
      },
    },
  ],
})
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_inv_001",
    },
    CustomerData: &customer.Data{
      Name: "Gloria Kesewaa",
      Email: "gloria@example.com",
      PhoneNumber: "+233544998605",
    },
    Finalize: inttegro.Bool(true),
    LineItems: []order.LineItemParams{
      {
        Type: order.LineItemTypeProduct,
        Product: &order.ProductLineItemParams{
          Type: product.TypePhysical,
          Name: "Utility Sneakers",
          Quantity: 1,
          Price: price.InlineParams{
            AmountParams: money.AmountParams{
              Currency: money.GHS,
              Value: 20000,
            },
          },
        },
      },
    },
  }
  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_inv_001",
  ),
  customer_data=inttegro.customer.DataInput(
    name="Gloria Kesewaa",
    email_address="gloria@example.com",
    phone_number="+233544998605",
  ),
  finalize=True,
  line_items=[
    inttegro.product.LineItemInput(
      type=inttegro.order.LineItemType.PRODUCT,
      product=inttegro.product.InlineDetailsInput(
        type=inttegro.product.Type.PHYSICAL,
        name="Utility Sneakers",
        quantity=1,
        price=inttegro.price.InlineParams(
          currency=inttegro.money.Currency.GHS,
          value=20000,
        ),
      ),
    ),
  ],
))
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->orders->create([
  'request_meta' => new \Inttegro\Request\Meta(
    idempotencyKey: 'order_inv_001',
  ),
  'customer_data' => [
    'name' => 'Gloria Kesewaa',
    'email_address' => 'gloria@example.com',
    'phone_number' => '+233544998605',
  ],
  'finalize' => true,
  'line_items' => [
    [
      'type' => \Inttegro\LineItemType::Product,
      'product' => [
        'type' => \Inttegro\ProductType::Physical,
        'name' => 'Utility Sneakers',
        'quantity' => 1,
        'price' => [
          'currency' => 'ghs',
          'value' => 20000,
        ],
      ],
    ],
  ],
]);
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_inv_001",
  ),
  customer_data: {
    name: "Gloria Kesewaa",
    email_address: "gloria@example.com",
    phone_number: "+233544998605",
  },
  finalize: true,
  line_items: [
    {
      type: Inttegro::LineItemType::PRODUCT,
      product: {
        type: Inttegro::ProductType::PHYSICAL,
        name: "Utility Sneakers",
        quantity: 1,
        price: {
          currency: "ghs",
          value: 20000,
        },
      },
    },
  ]
)
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_inv_001")
          .build())
      .customerData(CustomerData.builder()
          .name("Gloria Kesewaa")
          .email("gloria@example.com")
          .phoneNumber("+233544998605")
          .build())
      .finalizeOrder(true)
      .lineItem(OrderLineItemParams.product(ProductLineItemParams.builder()
            .type(ProductType.PHYSICAL)
            .name("Utility Sneakers")
            .quantity(1L)
            .price(PriceParams.of(Currency.GHS, 20000))
            .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_inv_001",
  },
  CustomerData = new CustomerData {
    Name = "Gloria Kesewaa",
    EmailAddress = "gloria@example.com",
    PhoneNumber = "+233544998605",
  },
  Finalize = true,
  LineItems = new List<LineItemParams> {
    new LineItemParams {
      Type = Inttegro.LineItemType.Product,
      Product = new ProductDetailsParams {
        Type = Inttegro.ProductType.Physical,
        Name = "Utility Sneakers",
        Quantity = 1,
        Price = new Inttegro.PriceParams {
          Currency = Inttegro.Money.Currency.GHS,
          Value = 20000,
        },
      },
    },
  },
});

Response

Response excerptjson
{
  "order": {
    "id": "or_XyZ9kL2mQrTfVqYz1wNb",
    "number": "INV-2025-001",
    "status": "requires_payment",
    "invoice": {
      "format": {
        "web": {
          "url": "https://pages.inttegro.com/invoices/or_XyZ9kL2mQrTfVqYz1wNb"
        },
        "pdf": {
          "url": "https://pages.inttegro.com/invoices/or_XyZ9kL2mQrTfVqYz1wNb/pdf"
        }
      }
    }
  }
}

Step 2: direct customer to payment

Choose how to get the customer to the payment page:

Read the web invoice URL from the created order and return it to your client. Check that the invoice is present before redirecting; draft orders do not have one. Your client can then open the returned URL using its normal navigation mechanism.

If immediate redirect doesn’t fit your flow, share the URL asynchronously. Send it through email, SMS, WhatsApp, or your notification system—the URL works in any browser context. Useful for offline orders, delayed billing, or when the customer isn’t in your app.

Step 3: track payment status

Use /orders/lookup to check payment status. Poll periodically or check when the customer returns to your app. When status becomes Inttegro.OrderStatuses.Paid, funds are in your Inttegro balance.

Check status

POST/orders/lookup
cURLbash
curl https://api.inttegro.com/orders/lookup \
  -H "Authorization: Bearer $INTTEGRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "or_XyZ9kL2mQrTfVqYz1wNb"
}'
TypeScripttypescript
import { InttegroClient } from '@inttegro/inttegro-sdk'

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

const result = await inttegro.orders.lookup({
  orderId: "or_XyZ9kL2mQrTfVqYz1wNb",
})
Gogo
package main

import (
  "context"
  "log"
  "os"

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

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

  result, err := client.Orders.Lookup(ctx, "or_XyZ9kL2mQrTfVqYz1wNb")
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
Pythonpython
import os

from inttegro import InttegroClient

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

result = client.orders.lookup("or_XyZ9kL2mQrTfVqYz1wNb")
PHPphp
<?php

use Inttegro\Client;

$client = new Client($_ENV['INTTEGRO_API_KEY']);
$result = $client->orders->lookup("or_XyZ9kL2mQrTfVqYz1wNb");
Rubyruby
require "inttegro"

client = Inttegro::Client.new(api_key: ENV.fetch("INTTEGRO_API_KEY"))
result = client.orders.lookup(order_id: "or_XyZ9kL2mQrTfVqYz1wNb")
Javajava
import com.inttegro.Client;

public class Example {
  public static void main(String[] args) throws Exception {
    var client = new Client(System.getenv("INTTEGRO_API_KEY"));
    var result = client.orders().lookup("or_XyZ9kL2mQrTfVqYz1wNb");
  }
}
C#csharp
using Inttegro;

using var inttegro = new InttegroClient(
    Environment.GetEnvironmentVariable("INTTEGRO_API_KEY")!
);
var result = await inttegro.Orders.LookupAsync("or_XyZ9kL2mQrTfVqYz1wNb");

Customization

Configure redirect and cancel URLs

new OrderCreateRequest {
  CheckoutSettings = new CheckoutSettings {
    RedirectUrl = "https://yoursite.com/order/complete",
    CancelUrl = "https://yoursite.com/order/cancelled",
  },
}
{
  "checkout_settings": {
    "redirect_url": "https://yoursite.com/order/complete",
    "cancel_url": "https://yoursite.com/order/cancelled"
  }
}
order.CreateParams{
  CheckoutSettings: &checkout.Settings{
    RedirectURL: "https://yoursite.com/order/complete",
    CancelURL: "https://yoursite.com/order/cancelled",
  },
}
import com.inttegro.orders.OrderCreateParams;
import com.inttegro.orders.CheckoutSettings;

var params = OrderCreateParams.builder()
  .checkoutSettings(CheckoutSettings.builder()
      .redirectUrl("https://yoursite.com/order/complete")
      .cancelUrl("https://yoursite.com/order/cancelled")
      .build())
  .build();
[
  'checkout_settings' => [
    'redirect_url' => 'https://yoursite.com/order/complete',
    'cancel_url' => 'https://yoursite.com/order/cancelled',
  ],
]
inttegro.order.CreateNewCustomerInput(
  checkout_settings=inttegro.order.CreateNewCustomerInputCheckoutSettings(
    redirect_url="https://yoursite.com/order/complete",
    cancel_url="https://yoursite.com/order/cancelled",
  ),
)
{
  checkout_settings: {
    redirect_url: "https://yoursite.com/order/complete",
    cancel_url: "https://yoursite.com/order/cancelled",
  },
}
{
  checkoutSettings: {
    redirectUrl: "https://yoursite.com/order/complete",
    cancelUrl: "https://yoursite.com/order/cancelled",
  },
}

Strongly recommended for a delightful customer experience. When payment completes, customers land on your checkoutSettings.redirectUrl where you can show order confirmation and next steps. When customers abandon checkout without paying, they land on your checkoutSettings.cancelUrl where you can show incomplete order details or offer alternative payment methods.

Add line item details

new OrderCreateRequest {
  LineItems = new List<LineItemParams> {
    new LineItemParams {
      Product = new ProductDetailsParams {
        Name = "Utility Sneakers",
        About = "Size: 42 | Color: Black",
      },
    },
  },
}
{
  "line_items": [
    {
      "product": {
        "name": "Utility Sneakers",
        "about": "Size: 42 | Color: Black"
      }
    }
  ]
}
order.CreateParams{
  LineItems: []order.LineItemParams{
    {
      Product: &order.ProductLineItemParams{
        Name: "Utility Sneakers",
        About: "Size: 42 | Color: Black",
      },
    },
  },
}
import com.inttegro.orders.OrderCreateParams;
import com.inttegro.orders.OrderLineItemParams;
import com.inttegro.orders.ProductLineItemParams;

var params = OrderCreateParams.builder()
  .lineItem(OrderLineItemParams.builder()
      .product(ProductLineItemParams.builder()
          .name("Utility Sneakers")
          .about("Size: 42 | Color: Black")
          .build())
      .build())
  .build();
[
  'line_items' => [
    [
      'product' => [
        'name' => 'Utility Sneakers',
        'about' => 'Size: 42 | Color: Black',
      ],
    ],
  ],
]
inttegro.order.CreateNewCustomerInput(
  line_items=[
    inttegro.product.LineItemInput(
      product=inttegro.product.InlineDetailsInput(
        name="Utility Sneakers",
        about="Size: 42 | Color: Black",
      ),
    ),
  ],
)
{
  line_items: [
    {
      product: {
        name: "Utility Sneakers",
        about: "Size: 42 | Color: Black",
      },
    },
  ],
}
{
  lineItems: [
    {
      product: {
        name: "Utility Sneakers",
        about: "Size: 42 | Color: Black",
      },
    },
  ],
}

Appears below product name on invoice.

Update branding

Change logo, business name, and colors in the Inttegro dashboard under Settings → Branding. Applies to all new invoices instantly.

See Checkout customization for more options.

Common patterns

Subscriptions: Create new order each cycle, send new invoice URL.

Deposits: Create separate orders for deposit and balance. Link them with a shared value in customData.

Multi-currency: Create one order per currency.

Order limits: Each order can contain up to 64 line items. Order totals are capped at 100,000 for "ghs" and 50,000 for all other supported currencies, measured in the currency's smallest unit. Contact support if you need these limits increased.

See Common patterns for implementation details.

Next steps

Type to search…

↑↓ navigate↵ selectEsc close