Order Calls REST API
If you run a custom eCommerce platform, mobile app, or Shopify backend, you can trigger order calls directly via REST API.
Create an Order Call
POST /api/v1/order-calls
Initiates an automated confirmation call to the recipient.
Request Headers
http
Authorization: Bearer YOUR_API_TOKEN_HERE
Content-Type: application/json
Accept: application/jsonRequest Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
phone | string | Yes | Customer phone number (e.g. 01712345678 or +8801712345678) |
order_id | string | Yes | Your internal store order ID (e.g. ORD-9841) |
customer_name | string | No | Customer full name |
amount | number | No | Total order amount in BDT |
currency | string | No | 3-letter currency code (default: BDT) |
language | string | No | Audio prompt language: bn (default) or en |
callback_url | string | No | Specific webhook URL for this call if not using site default |
send_sms | boolean | No | Whether to send an SMS fallback if the call is missed |
sms_message | string | No | Custom text message to send when send_sms is true |
metadata | object | No | Key-value pairs stored and returned in webhooks |
Example Request
bash
curl -X POST "https://pingoline.com/api/v1/order-calls" \
-H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"phone": "01712345678",
"order_id": "ORD-1002",
"customer_name": "Rahim Ahmed",
"amount": 1450.00,
"language": "bn",
"send_sms": true
}'php
use PingoLine\Laravel\Facades\PingoLine;
$call = PingoLine::createOrderCall([
'phone' => '01712345678',
'order_id' => 'ORD-1002',
'customer_name' => 'Rahim Ahmed',
'amount' => 1450.00,
'language' => 'bn',
'send_sms' => true,
]);typescript
import { PingoLine } from 'pingoline';
const pingoline = new PingoLine({ apiKey: process.env.PINGOLINE_API_KEY! });
const call = await pingoline.createOrderCall({
phone: '01712345678',
order_id: 'ORD-1002',
customer_name: 'Rahim Ahmed',
amount: 1450.00,
language: 'bn',
send_sms: true,
});Response (201 Created)
json
{
"data": {
"id": "oc_8f7b2c9e",
"order_id": "ORD-1002",
"phone": "01712345678",
"customer_name": "Rahim Ahmed",
"amount": 1450.00,
"currency": "BDT",
"status": "queued",
"attempts": 0,
"duration_seconds": 0,
"created_at": "2026-11-21T14:30:00Z"
}
}Get Call Status
GET /api/v1/order-calls/{id}
Retrieve the latest progress and user response.
Response
json
{
"data": {
"id": "oc_8f7b2c9e",
"order_id": "ORD-1002",
"phone": "01712345678",
"status": "confirmed",
"dtmf_result": "confirmed",
"attempts": 1,
"duration_seconds": 18,
"created_at": "2026-11-21T14:30:00Z",
"updated_at": "2026-11-21T14:30:25Z"
}
}