Skip to content

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/json

Request Body Parameters ​

ParameterTypeRequiredDescription
phonestringYesCustomer phone number (e.g. 01712345678 or +8801712345678)
order_idstringYesYour internal store order ID (e.g. ORD-9841)
customer_namestringNoCustomer full name
amountnumberNoTotal order amount in BDT
currencystringNo3-letter currency code (default: BDT)
languagestringNoAudio prompt language: bn (default) or en
callback_urlstringNoSpecific webhook URL for this call if not using site default
send_smsbooleanNoWhether to send an SMS fallback if the call is missed
sms_messagestringNoCustom text message to send when send_sms is true
metadataobjectNoKey-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"
  }
}

Released under the MIT License.