Skip to navigation

Order devices with the API

Learn how to order Payabli payment devices for your organizations and paypoints with the Payabli API
View as MarkdownOpen in Claude
Applies to:Developers

Order Payabli payment devices for your organizations and paypoints entirely through the API. You describe the order once, Payabli prices it from the device catalog, and you pay for it by card. Payabli then ships the devices and adds tracking details to the order.

Device ordering requires configuration by the Payabli team. Contact us to get started.

Considerations

  • You never send card data. To pay for an order by card, you collect the card with the embedded component and send Payabli only the temporary token ID it returns.
  • You use your own public token. Load the embedded component with your own public token and entrypoint, the same way you do to save cards today. Payabli moves the temporary token onto the order for you.
  • Your API token needs device ordering permissions. Reading the catalog, recipients, and orders needs deviceorder_read. Placing and paying for an order needs deviceorder_create. Canceling an order needs deviceorder_update.
  • The person placing the order accepts the terms. Show them the terms at the catalog’s termsUrl before you place the order.

You can place, pay for, read, list, and cancel orders. Payabli handles fulfillment: it moves orders through Initiated, Dispatched, and Delivered, and it’s the only one that can cancel a paid order.

Order devices

Every order follows the same steps.

1

Check that device ordering is enabled

Send a GET request to /DeviceOrder/enabled/{entry} with the entrypoint of the organization or paypoint. When enabled is false, hide device ordering from your users. Only Payabli can turn device ordering on or off, so contact Payabli to turn it on for an organization. See the API reference for this endpoint for full documentation.

GET
/api/DeviceOrder/enabled/:entry
curl https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267 \
-H "Authorization: Bearer <token>"
Response
{
"enabled": true
}

This endpoint always returns 200. If you aren’t authorized for the entry, it returns false, so you can’t use it to check whether an entry exists.

2

Get the device catalog

Send a GET request to /DeviceOrder/catalog to get the devices you can order. The response also lists the payment options, the shipping carriers Payabli uses, and the termsUrl of the terms the person placing the order must accept. Show only the payment options where enabled is true. See the API reference for this endpoint for full documentation.

GET
/api/DeviceOrder/catalog
curl https://api-sandbox.payabli.com/api/DeviceOrder/catalog \
-H "Authorization: Bearer <token>"
Response
{
"responseText": "Success",
"responseData": {
"items": [
{
"id": 67,
"profileCode": "ingenico-ingenico-dx6000",
"name": "Ingenico DX6000",
"make": "Ingenico",
"model": "DX6000",
"description": null,
"images": [],
"specifications": {
"Barcode Reader": "No",
"Printer": "Yes",
"RAM": "32 GB",
"Wifi": "Yes"
},
"retailCost": 416,
"shippingRate": 18,
"shippingDays": 3,
"supportsBillToPaypoint": false
}
],
"paymentOptions": [
{
"code": "PayNow",
"enabled": true,
"comingSoon": false
},
{
"code": "BillToPartner",
"enabled": false,
"comingSoon": true
},
{
"code": "BillToPaypoint",
"enabled": false,
"comingSoon": true
}
],
"termsUrl": "https://payabli.com/terms-and-conditions/",
"carriers": [
"UPS",
"FedEx",
"USPS",
"DHL"
]
},
"responseCode": 1,
"pageIdentifier": null,
"roomId": 0,
"isSuccess": true
}

Each device has an id to send as deviceProfileId when you place the order, plus its retailCost, shippingRate, and shippingDays.

3

Choose who the order is for

Send a GET request to /DeviceOrder/recipients to list the organizations and paypoints you can order devices for. Skip this step if you already know the recipient. See the API reference for this endpoint for full documentation.

GET
/api/DeviceOrder/recipients
curl https://api-sandbox.payabli.com/api/DeviceOrder/recipients \
-H "Authorization: Bearer <token>"
Response
{
"responseText": "Success",
"responseData": {
"organizations": [
{
"id": 900123,
"name": "Pilgrim Planner",
"entryName": "pilgrim-planner",
"parentId": 2,
"deviceOrderingEnabled": true
}
],
"paypoints": [
{
"id": 3040,
"name": "Sunshine Gutters",
"entryName": "8cfec329267",
"organizationId": 900123
}
]
},
"responseCode": 1,
"pageIdentifier": null,
"roomId": 0,
"isSuccess": true
}

When you place the order, send the paypoint’s entryName as entryName. For an organization-level order, send the organization’s id as organizationId instead.

4

Place the order

Send a POST request to /DeviceOrder with the recipient, the devices and quantities, the billing and shipping addresses, a contact, and termsAccepted: true. The request carries no amounts and no card data, because Payabli prices every line from the catalog. See the API reference for this endpoint for full documentation.

  • Name the recipient. For a paypoint, send its entryName. Payabli uses the paypoint’s parent organization, so you don’t need to send organizationId. For an organization-level order, send organizationId and omit entryName. The request doesn’t accept paypointId.
  • Payabli matches the entry name without regard to letter case or leading and trailing spaces. The request returns 400 with the message Recipient not found. when the entry name doesn’t exist or belongs to someone else, matches more than one paypoint, isn’t in the organization you sent in organizationId, or is longer than 255 characters. The message is the same in each case, so it doesn’t reveal which paypoints exist.
  • If you send paypointId, the request returns 400 with the message paypointId is no longer supported. Send the paypoint's entryName instead. If you send neither entryName nor organizationId, it returns 400 with the message Organization is required.
  • List each device once and set its quantity. An order can include up to 100 units in total.
  • In each address, line1, city, state, and zip are required. country is a two-letter ISO 3166-1 alpha-2 code and defaults to US.
  • If you send contactPhone, it must contain 7 to 15 digits, optionally starting with +. Spaces, parentheses, periods, and hyphens are ignored.
  • Send termsAccepted: true only after the person placing the order accepts the terms. Payabli records who placed the order and when.
  • Send a unique Idempotency-Key header, 1 to 100 characters long. If you send the same key again, Payabli returns the original order instead of creating a new one.
  • Set payInline: true if you pay for the order right after you place it. Payabli then sends one order confirmation email after the payment is approved, instead of one when you place the order that says payment is pending.
POST
/api/DeviceOrder
curl -X POST https://api-sandbox.payabli.com/api/DeviceOrder \
-H "Idempotency-Key: a3f1c9e2-order-2026-10-16" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"lines": [
{
"deviceProfileId": 67,
"quantity": 1
}
],
"billTo": {
"line1": "123 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"shipTo": {
"line1": "123 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"contactEmail": "jordan.smith@example.com",
"termsAccepted": true,
"entryName": "8cfec329267",
"contactName": "Jordan Smith",
"contactPhone": "5555550100",
"paymentOption": "PayNow",
"payInline": true
}'
Response
{
"responseText": "Success",
"responseData": {
"id": 35,
"orderNumber": "DO-000035",
"status": "Placed",
"createdAt": "2026-10-16T15:28:47.4758249Z",
"createdBy": "900123",
"updatedAt": "2026-10-16T15:28:47.4758249Z",
"updatedBy": "900123",
"organizationId": 900123,
"organizationName": "Pilgrim Planner",
"paypointId": 3040,
"paypointName": "Sunshine Gutters",
"entryName": "8cfec329267",
"deviceSubtotal": 416,
"shippingTotal": 18,
"total": 434,
"currency": "USD",
"billTo": {
"name": null,
"company": null,
"line1": "123 Main St",
"line2": null,
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"shipTo": {
"name": null,
"company": null,
"line1": "123 Main St",
"line2": null,
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"contactName": "Jordan Smith",
"contactEmail": "jordan.smith@example.com",
"contactPhone": "5555550100",
"payment": {
"paymentOption": "PayNow",
"paymentStatus": "Pending",
"invoiceId": 3674,
"invoiceNumber": "INV-2345",
"paidAt": null,
"method": null,
"lastFour": null,
"transactionId": null
},
"shipment": {
"trackingCarrier": null,
"trackingNumber": null,
"expectedShipAt": null,
"dispatchedAt": null,
"deliveredAt": null,
"canceledAt": null,
"cancelReason": null,
"trackingUrl": null,
"events": []
},
"lines": [
{
"id": 35,
"deviceProfileId": 67,
"profileCode": "ingenico-ingenico-dx6000",
"name": "Ingenico DX6000",
"make": "Ingenico",
"model": "DX6000",
"quantity": 1,
"unitPrice": 416,
"unitShipping": 18,
"shippingDays": 3,
"lineTotal": 434,
"serials": []
}
],
"history": [
{
"at": "2026-10-16T15:28:47.761144+00:00",
"event": "DeviceOrderPlaced",
"fromStatus": null,
"toStatus": "Placed",
"actingUser": "900123",
"note": null
}
],
"allowedNextStates": [
"Canceled"
],
"termsAcceptedAt": "2026-10-16T15:28:47.4758249Z"
},
"responseCode": 1,
"pageIdentifier": null,
"roomId": 0,
"isSuccess": true
}

The new order’s status is Placed and its payment.paymentStatus is Pending. Pay for it in the next step.

5

Pay for the order

To pay for the order by card:

  1. Load the embedded component with your own public token, your entrypoint, and temporaryToken: true. When the person placing the order enters their card, the component returns a temporary token ID in referenceId.
  2. Send a POST request to /DeviceOrder/{orderNumber}/pay with the temporary token ID as storedMethodId. This endpoint accepts cards only, and it doesn’t need an Idempotency-Key header.

See the API reference for this endpoint for full documentation.

POST
/api/DeviceOrder/:orderNumber/pay
curl -X POST https://api-sandbox.payabli.com/api/DeviceOrder/DO-000035/pay \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"storedMethodId": "5084e643-a817-438c-adce-aed156326aae-854468"
}'
Response
{
"responseText": "Success",
"responseData": {
"id": 35,
"orderNumber": "DO-000035",
"status": "Paid",
"createdAt": "2026-10-16T15:28:47.475824+00:00",
"createdBy": "900123",
"updatedAt": "2026-10-16T15:30:12.347011+00:00",
"updatedBy": "system",
"organizationId": 900123,
"organizationName": "Pilgrim Planner",
"paypointId": 3040,
"paypointName": "Sunshine Gutters",
"entryName": "8cfec329267",
"deviceSubtotal": 416,
"shippingTotal": 18,
"total": 434,
"currency": "USD",
"billTo": {
"name": null,
"company": null,
"line1": "123 Main St",
"line2": null,
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"shipTo": {
"name": null,
"company": null,
"line1": "123 Main St",
"line2": null,
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"contactName": "Jordan Smith",
"contactEmail": "jordan.smith@example.com",
"contactPhone": "5555550100",
"payment": {
"paymentOption": "PayNow",
"paymentStatus": "Paid",
"invoiceId": 3674,
"invoiceNumber": "INV-2345",
"paidAt": "2026-10-16T15:30:12.347011+00:00",
"method": "card",
"lastFour": "1111",
"transactionId": "3040-477b678cf236404fb37ac868503dddf2"
},
"shipment": {
"trackingCarrier": null,
"trackingNumber": null,
"expectedShipAt": null,
"dispatchedAt": null,
"deliveredAt": null,
"canceledAt": null,
"cancelReason": null,
"trackingUrl": null,
"events": []
},
"lines": [
{
"id": 35,
"deviceProfileId": 67,
"profileCode": "ingenico-ingenico-dx6000",
"name": "Ingenico DX6000",
"make": "Ingenico",
"model": "DX6000",
"quantity": 1,
"unitPrice": 416,
"unitShipping": 18,
"shippingDays": 3,
"lineTotal": 434,
"serials": []
}
],
"history": [
{
"at": "2026-10-16T15:28:47.761144+00:00",
"event": "DeviceOrderPlaced",
"fromStatus": null,
"toStatus": "Placed",
"actingUser": "900123",
"note": null
},
{
"at": "2026-10-16T15:30:12.412870+00:00",
"event": "DeviceOrderPaid",
"fromStatus": "Placed",
"toStatus": "Paid",
"actingUser": "system",
"note": "via hook"
}
],
"allowedNextStates": [],
"termsAcceptedAt": "2026-10-16T15:28:47.475824+00:00"
},
"responseCode": 1,
"pageIdentifier": null,
"roomId": 0,
"isSuccess": true
}

After a successful payment, the order’s status and payment.paymentStatus are both Paid.

A temporary token can be used only once, even when the card is declined. If the card is declined, the endpoint returns 402 and the order isn’t affected. Collect a card again, get a new temporary token from the component, and call /pay with the new ID. If you send the old ID, the endpoint returns 400. Don’t place the order again.

After a successful payment, Payabli emails a payment receipt to the order’s contactEmail.

6

Track the order

Send a GET request to /DeviceOrder/{orderNumber} to get the order’s status, payment details, and tracking. This endpoint also confirms the payment status when you read it, so use it as the source of truth for the order. See the API reference for this endpoint for full documentation.

GET
/api/DeviceOrder/:orderNumber
curl https://api-sandbox.payabli.com/api/DeviceOrder/DO-000035 \
-H "Authorization: Bearer <token>"
Response
{
"responseText": "Success",
"responseData": {
"id": 35,
"orderNumber": "DO-000035",
"status": "Placed",
"createdAt": "2026-10-16T15:28:47.475824+00:00",
"createdBy": "900123",
"updatedAt": "2026-10-16T15:28:47.475824+00:00",
"updatedBy": "900123",
"organizationId": 900123,
"organizationName": "Pilgrim Planner",
"paypointId": 3040,
"paypointName": "Sunshine Gutters",
"entryName": "8cfec329267",
"deviceSubtotal": 416,
"shippingTotal": 18,
"total": 434,
"currency": "USD",
"billTo": {
"name": null,
"company": null,
"line1": "123 Main St",
"line2": null,
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"shipTo": {
"name": null,
"company": null,
"line1": "123 Main St",
"line2": null,
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
},
"contactName": "Jordan Smith",
"contactEmail": "jordan.smith@example.com",
"contactPhone": "5555550100",
"payment": {
"paymentOption": "PayNow",
"paymentStatus": "Pending",
"invoiceId": 3674,
"invoiceNumber": "INV-2345",
"paidAt": null,
"method": null,
"lastFour": null,
"transactionId": null
},
"shipment": {
"trackingCarrier": null,
"trackingNumber": null,
"expectedShipAt": null,
"dispatchedAt": null,
"deliveredAt": null,
"canceledAt": null,
"cancelReason": null,
"trackingUrl": null,
"events": []
},
"lines": [
{
"id": 35,
"deviceProfileId": 67,
"profileCode": "ingenico-ingenico-dx6000",
"name": "Ingenico DX6000",
"make": "Ingenico",
"model": "DX6000",
"quantity": 1,
"unitPrice": 416,
"unitShipping": 18,
"shippingDays": 3,
"lineTotal": 434,
"serials": []
}
],
"history": [
{
"at": "2026-10-16T15:28:47.761144+00:00",
"event": "DeviceOrderPlaced",
"fromStatus": null,
"toStatus": "Placed",
"actingUser": "900123",
"note": null
}
],
"allowedNextStates": [
"Canceled"
],
"termsAcceptedAt": "2026-10-16T15:28:47.475824+00:00"
},
"responseCode": 1,
"pageIdentifier": null,
"roomId": 0,
"isSuccess": true
}

After Payabli ships the order, its shipment object holds the trackingCarrier, the trackingNumber, and a trackingUrl for the carrier’s tracking page. shipment.events lists the carrier’s scans, newest first, and can be empty before the carrier’s first scan.

Every order response includes allowedNextStates, the statuses you can move the order to from its current status. Use it to decide what to show your users, instead of building the order lifecycle into your code. Paying for an order isn’t listed in allowedNextStates. Show the pay step only when the order’s status is Placed and its payment.paymentStatus is Pending. A canceled order that was never paid still has a Pending payment status, so check both.

Order statuses

An order’s status moves through these values:

StatusMeaning
PlacedThe order was placed. It stays Placed until it’s paid.
PaidThe order was paid.
InitiatedPayabli started fulfilling the order. Nobody can cancel an Initiated order.
DispatchedPayabli shipped the order and added the carrier and tracking number.
DeliveredThe order was delivered.
CanceledThe order was canceled. This status is final.

This diagram shows how an order moves between statuses, and the notification each move sends.

Device order status lifecycle from Placed through Paid, Initiated, and Dispatched to Delivered, with a Canceled end state, labeled with the notification each move sends

Diagram: Device order status lifecycle

The diagram shows how a device order moves between statuses, and the notification each move sends:

  1. You place the order, and it becomes Placed. Payabli sends DeviceOrderPlaced.
  2. You pay the order, and it becomes Paid. Payabli sends DeviceOrderPaid.
  3. Payabli starts fulfillment, and the order becomes Initiated. Payabli sends DeviceOrderStatusChanged.
  4. Payabli ships the order, and it becomes Dispatched. Payabli sends DeviceOrderStatusChanged.
  5. The order is delivered, and it becomes Delivered. Payabli sends DeviceOrderStatusChanged.

A Placed order can be canceled by you or Payabli. A Paid order can be canceled only by Payabli, which reverses the charge. Either way, the order becomes Canceled and Payabli sends DeviceOrderStatusChanged. An order can’t be canceled after it’s Initiated.

Payment statuses

An order’s payment.paymentStatus shows where its payment stands:

Payment statusMeaning
PendingThe order isn’t paid yet.
PaidThe order was charged. transactionId, method, and lastFour hold the payment details.
VoidedThe paid order was canceled before the payment settled. The charge never appears on the cardholder’s statement.
RefundedThe paid order was canceled after the payment settled. The refund appears on the cardholder’s statement as a separate credit.
When a customer asks where their money is after a canceled order, check the payment status. A Voided payment never appears on their statement, and a Refunded payment appears as a separate credit.

Cancel an order

Send a POST request to /DeviceOrder/{orderNumber}/cancel, optionally with a reason. You can cancel an order only while it’s Placed, meaning before it’s paid. For any other status, the endpoint returns 409. See the API reference for this endpoint for full documentation.

To cancel an order that’s already paid, contact Payabli. Payabli reverses the charge before it cancels the order, so a canceled paid order always means the charge was voided or refunded. A voided charge never reaches the customer’s account. A refund can take several business days to reach it, depending on the customer’s bank. If Payabli can’t reverse the charge, the order stays Paid.

Get notified about order changes

Payabli sends three webhook notifications for device orders. Subscribe to them the same way you subscribe to other notifications. A device order notification also reaches subscriptions on the organizations above the ordering organization or paypoint.

EventSubscription event keySent when
DeviceOrderPlaceddeviceorderplacedAn order is placed, and its status becomes Placed.
DeviceOrderPaiddeviceorderpaidAn order is paid, and its status moves from Placed to Paid.
DeviceOrderStatusChangeddeviceorderstatuschangedPayabli moves an order from Paid to Initiated, Initiated to Dispatched, or Dispatched to Delivered, or a Placed or Paid order is canceled.

The webhook body uses PascalCase field names and leaves out any field that has no value:

FieldDescription
EventThe event name, such as DeviceOrderPlaced.
OrderNumberThe order number, such as DO-000035.
StatusThe order’s status when the event was sent.
PreviousStatusThe order’s status before the change. Set only on DeviceOrderStatusChanged.
PaymentStatusThe order’s payment status when the event was sent.
PaymentOptionHow the order is paid for, such as PayNow.
OrganizationIdThe ID of the organization that placed the order.
OrganizationNameThe name of the organization that placed the order.
PaypointIdThe ID of the paypoint the order is for. Not sent for an organization-level order.
PaypointNameThe name of the paypoint the order is for.
EntryNameThe paypoint’s entry name. Not sent for an organization-level order.
TotalThe order total, including shipping.
CurrencyThe three-letter ISO 4217 currency code.
ContactEmailThe contact email for the order.
TrackingCarrierThe shipping carrier, after Payabli dispatches the order.
TrackingNumberThe carrier’s tracking number, after Payabli dispatches the order.
TrackingUrlThe carrier’s tracking page for the shipment.

List and export orders

To list device orders, send a GET request to /Query/deviceOrders/{entry} for a paypoint, or to /Query/deviceOrders/org/{orgId} for an organization. Results include only the orders you’re authorized to see, and they’re sorted newest first by default. Filter the results with query parameters, for example status(in)=Paid|Dispatched or orderDate(ge)=2026-10-01. To export the results as a file, add exportFormat=csv or exportFormat=xlsx.

For the full list of filters, see List device orders by paypoint. For operator syntax and paging, see the Filters and conditions reference.

Handle errors

StatusCodeMeaningWhat to do
400The request failed validation. responseData lists each field error as field and message. A missing Idempotency-Key header returns responseData.explanation instead. A missing required property, such as termsAccepted, returns a validation error with an errors object.Fix the request and send it again.
4019001You aren’t authorized for the organization or paypoint.Check the recipient and your API token’s permissions.
4029020The card was declined on /pay. The order isn’t affected.Collect a card again, get a new temporary token, and call /pay with the new ID.
400Device ordering isn’t turned on for the organization. responseData returns organizationId with the message Device ordering is not enabled for this organization.Check that device ordering is enabled before you show it to users. Contact Payabli to turn it on.
4049009The order doesn’t exist, or you aren’t authorized to see it.Check the order number.
409The action isn’t allowed from the order’s current status. responseData.allowedNextStates lists the statuses that are.Read the order again. To cancel, use allowedNextStates. To pay, check that status is Placed and payment.paymentStatus is Pending.