Skip to main content

Quickstart

Create a finalized order, read the hosted invoice URL from the response, and send your customer into the Inttegro checkout flow. This guide uses the official SDKs so your integration goes through the same typed resource methods used throughout Studio.

Prerequisites

  • An Inttegro application

Install an SDK

Install the SDK for your server-side runtime before creating requests:

SDK installation

npm install @inttegro/inttegro-sdk

Create a finalized order

Send finalize: true to create and seal the order in one request. A finalized order includes an invoice object whose web URL opens the hosted checkout. The raw HTTP response uses an { "order": { ... } } envelope; the official SDKs unwrap that envelope and return the order domain object directly.

Create an order

POST/orders/create
response=$(curl https://api.inttegro.com/orders/create \
-H "Authorization: Bearer $INTTEGRO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: checkout-order-123" \
-d '{
"customer_data": {
"name": "Akua Mensah",
"email_address": "[email protected]",
"phone_number": "+233544998605"
},
"finalize": true,
"line_items": [{
"product": {
"name": "Monthly Subscription",
"price": { "currency": "ghs", "value": 5000 },
"quantity": 1,
"type": "service"
},
"type": "product"
}]
}')

invoice_url=$(jq -er '.order.invoice.format.web.url' <<< "$response")
printf '%s\n' "$invoice_url"

Open the invoice URL in the customer's browser. Treat a missing invoice as an incomplete finalization rather than guessing a checkout URL.