Skip to navigation

Place device order

View as MarkdownOpen in Claude

Places a device order. Payabli prices every line from the device catalog, so the request carries no amounts and no card data.

After you place the order, its payment.paymentStatus is Pending. Collect the card with the embedded component and pay for the order with POST /DeviceOrder/{orderNumber}/pay.

This endpoint requires an Idempotency-Key header. If you send the same key again, Payabli returns the original order instead of creating a new one.

This endpoint requires the deviceorder_create permission.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

OR
requestTokenstring

Long-lived API token sent in the requestToken header. See API token authentication.

Headers

Idempotency-KeystringRequired1-100 characters
A unique ID that you generate for each order, 1 to 100 characters long. If you send a request again with the same key, Payabli returns the original order instead of creating a duplicate.

Request

This endpoint expects an object.
lineslist of objectsRequired

The devices and quantities to order. Each device can appear only once, so use quantity to order more than one unit. An order can include up to 100 units in total.

billToobjectRequired
The billing address for the order.
shipToobjectRequired
The address to ship the devices to.
contactEmailstringRequired<=256 characters
The contact email for the order. Payabli sends the order confirmation and the payment receipt to this address.
termsAcceptedtrueRequired

Confirms that the person placing the order accepted the terms at the catalog’s termsUrl. Must be true. Show the terms to that person and send true only after they accept. Payabli records who placed the order and when.

organizationIdlongOptional

The ID of the organization the devices are for. Required for an organization-level order. When you send entryName, you can omit it, and Payabli uses the paypoint’s parent organization.

entryNamestringOptional

The entry name of the paypoint the devices are for. Omit it for an organization-level order. 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.

contactNamestringOptional<=200 characters
The name of the contact person for the order.
contactPhonestringOptional<=32 characters

The contact phone number for the order. When you send a value, it must contain 7 to 15 digits, optionally starting with +. Spaces, parentheses, periods, and hyphens are ignored.

paymentOptionenumOptional

How the order is paid for. Defaults to PayNow.

  • PayNow: The buyer pays by card. After you place the order, collect the card with the embedded component and pay the order with POST /DeviceOrder/{orderNumber}/pay.

Use paymentOptions in the catalog response to see which options are available.

Allowed values:
payInlinebooleanOptional

Set to true when you pay for the order with POST /DeviceOrder/{orderNumber}/pay right after you place it. Payabli then sends the order confirmation email after the payment is approved, instead of when you place the order. When it’s false or omitted, Payabli sends the confirmation email when you place the order.

If you set this to true and the order is paid some other way, Payabli sends only the payment receipt and no confirmation email.

Response

Success
responseTextstring

Success when the request succeeds.

responseDataobject
A device order.
responseCodeintegerOptional

Code for the response. Learn more in API Response Codes.

pageIdentifierstringOptional
Auxiliary validation used internally by payment pages and components.
roomIdlongOptional

Field not in use on this endpoint. It always returns 0.

isSuccessbooleanOptional

Boolean indicating whether the operation was successful. A true value indicates success. A false value indicates failure.

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error