Checkout Sessions
Ikawaari Checkout provides a hosted payment page that handles payment method selection, validation, and confirmation.
Create a Checkout Session
curl -X POST https://api.ikawaari.com/v1/checkout/sessions \
-H "Authorization: Bearer ik_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"line_items": [
{
"name": "Premium Plan",
"amount": 50000,
"currency": "XOF",
"quantity": 1
}
],
"mode": "payment",
"success_url": "https://yoursite.com/success?session_id={CHECKOUT_SESSION_ID}",
"cancel_url": "https://yoursite.com/cancel"
}'
Response
{
"id": "cs_abc123",
"url": "https://checkout.ikawaari.com/cs_abc123",
"status": "open",
"payment_intent": "pi_xyz789",
"expires_at": 1708387200
}
Redirect the customer to url to complete the payment.
Checkout Modes
| Mode | Description |
|---|---|
payment | One-time payment |
subscription | Recurring subscription |
Customization
Customize the checkout appearance in Settings → Checkout in the dashboard:
- Logo and brand colors
- Custom fields (phone, address, etc.)
- Refund policy display
- Legal policies