Skip to navigation

Pay device order

View as MarkdownOpen in Claude

Pays a PayNow order by card. First, load the embedded component with your own public token and temporaryToken: true to collect the card. Then send the temporary token ID it returns as storedMethodId. This endpoint accepts cards only.

A temporary token can be used only once, even when the card is declined. If the card is declined, this endpoint returns 402 and the order isn’t affected. Tokenize the card again and call this endpoint with the new ID. Don’t place the order again.

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.

Path parameters

orderNumberstringRequired
The order number.

Request

This endpoint expects an object.
storedMethodIdstringRequired1-64 characters

The temporary token ID that the embedded component returns in referenceId. A temporary token can be used only once, even when the card is declined. After a decline, tokenize the card again and send the new ID.

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
402
Payment Required Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error