Accept or pay an order
Accept (approve without payment), pay by gateway, or pay from balance an existing service order on behalf of the authenticated main (LBA) account. Mirrors the website order flow.
The acting customer is taken from the access token. A main account may act on its own order or on an aggregated sub-account's order awaiting its approval; a sub-account caller is rejected for any type.
Action types (type):
-
accept — approve the order without payment. Allowed only when the order cannot be paid (the payment gateway is disabled or the order is free, or there are no payment entry points and the balance does not cover the total). Otherwise responds with INVALID_INPUT_DATA asking to pay.
-
order_with_payment — requires entry_point_id. Returns payment_url (opened in the WebView); the embedded callback_data carries the result_url the gateway redirects to on completion. Does not change the order.
-
order_with_account_balance — pays from the account balance; if the balance does not cover the total, responds with INVALID_INPUT_DATA. On success returns result, order_id and price.
Possible errors
-
INVALID_INPUT_DATA (422) — validation failed, sub-account caller, order cannot be processed in its current status, accept not allowed because the order is payable, or insufficient balance.
-
BAD_REQUEST (400) — entry_point_id is unknown or not available to the customer.
-
NOT_FOUND (404) — order does not exist, or does not belong to the caller (returned the same as not-found to prevent id enumeration).
-
FORBIDDEN (403) — the caller is not a customer.
Request
- Base URL: https://demo.splynx.com/api/2.0
- URL: https://demo.splynx.com/api/2.0/portal/services/accept-order
- Auth: HTTP basic
Request body
Response
Changes
No recorded changes to this operation across all 1 revision of this API.