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
import * as Inttegro from '@inttegro/inttegro-sdk'
const inttegro = new Inttegro.InttegroClient({
apiKey: process.env.INTTEGRO_API_KEY!,
})
const result = await inttegro.orders.create({
requestMeta: {
idempotencyKey: "checkout-order-123",
},
customerData: {
name: "Akua Mensah",
phoneNumber: "+233544998605",
},
finalize: true,
lineItems: [
{
product: {
name: "Monthly Subscription",
price: {
currency: "ghs",
value: 5000,
},
quantity: 1,
type: Inttegro.ProductTypes.Service,
},
type: Inttegro.LineItemTypes.Product,
},
],
})
Open the invoice URL in the customer's browser. Treat a missing invoice as an incomplete finalization rather than guessing a checkout URL.
Related resources
- Create an order - Complete request and response contract
- Finalize an order - Seal a draft order later
- Accept payment with Inttegro Checkout - Complete hosted checkout workflow