Skip to Content
devhelp shopDocs

Storefront — Orders

Look up shopper orders and complete online payment handoffs.

POST
/storefront/v1/orders/{orderId}/confirm

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
token*string

Response Body

OK

application/json
  1. response
confirmed*unknown
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/confirm' \  -H 'Content-Type: application/json' \  -d '{  "token": "string"}'
Example Response
{  "confirmed": true}
GET
/storefront/v1/orders/{orderId}

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Query Parameters

token*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
canRequestReceipt?boolean
receiptTo*string|null
statusToken*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/orders/string?token=string'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "canRequestReceipt": true,  "receiptTo": "string",  "statusToken": "string"}
POST
/storefront/v1/orders/{orderId}/receipt

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
token*string
email*string

Response Body

OK

application/json
  1. response
queued*unknown
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/receipt' \  -H 'Content-Type: application/json' \  -d '{  "token": "string",  "email": "string"}'
Example Response
{  "queued": true}
POST
/storefront/v1/orders/{orderId}/bookings/{bookingId}/cancel

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string
bookingId*string

Request Body

application/json
  1. body
token*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
canRequestReceipt?boolean
receiptTo*string|null
statusToken*string|null
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/bookings/string/cancel' \  -H 'Content-Type: application/json' \  -d '{  "token": "string"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "canRequestReceipt": true,  "receiptTo": "string",  "statusToken": "string"}
POST
/storefront/v1/orders/{orderId}/bookings/{bookingId}/reschedule

The new start must be free online now; the same person is kept when one was asked for.

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string
bookingId*string

Request Body

application/json
  1. body
token*string
startsAt*string
Formatdate-time

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
canRequestReceipt?boolean
receiptTo*string|null
statusToken*string|null
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/bookings/string/reschedule' \  -H 'Content-Type: application/json' \  -d '{  "token": "string",  "startsAt": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "canRequestReceipt": true,  "receiptTo": "string",  "statusToken": "string"}
POST
/storefront/v1/orders/{orderId}/payment/status

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
token*string

Response Body

OK

application/json
  1. response
method*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
state*string
Value in"not_required""awaiting""paid""failed""expired""refunded"
testMode*boolean
dueAt*|null
canRetry*boolean
canSwitchToCod*boolean
codTotalPaisa*number|null
depositPaisa*number
advance*|null
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/payment/status' \  -H 'Content-Type: application/json' \  -d '{  "token": "string"}'
Example Response
{  "method": "cod",  "state": "not_required",  "testMode": true,  "dueAt": "2019-08-24T14:15:22Z",  "canRetry": true,  "canSwitchToCod": true,  "codTotalPaisa": 0,  "depositPaisa": 0,  "advance": {    "dueAt": "2019-08-24T14:15:22Z",    "received": true  }}
POST
/storefront/v1/orders/{orderId}/payment/retry

Requires an Idempotency-Key header. Refused once the order is paid, cancelled or past its payment deadline.

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
token*string

Response Body

OK

application/json
  1. response
kind*unknown
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/payment/retry' \  -H 'Content-Type: application/json' \  -d '{  "token": "string"}'
Example Response
{  "kind": "placed"}
POST
/storefront/v1/orders/{orderId}/payment/switch-to-cod

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
token*string
expectedTotalPaisa*number

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/orders/string/payment/switch-to-cod' \  -H 'Content-Type: application/json' \  -d '{  "token": "string",  "expectedTotalPaisa": 0}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  }}

On this page