accept_offer
Idempotent
Accept the offer on behalf of the buyer. Needs credentials. This locks the billing identity, the offer version and the hash of the terms as they stand at this moment. A later change to the website cannot pass for what was agreed. Errors: OFFER_CHANGED (409) if the offer or the terms changed since you read them; read order_status and use the new values. OFFER_EXPIRED (409) 30 days after the order. MANUAL_OFFER_REQUIRED (409) while a person has not priced the service yet.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes | The order id returned by create_order. | |
| secret | No | Required unless you authenticate with the Authorization header (Bearer <clientId>:<secret>, or an OAuth access token issued for this server). The secret returned by register_agent. | |
| billing | Yes | The buyer as it will appear on the invoice and the contract. For type company, company, registration and representative are also required. For type person, leave out company, registration, vat and representative. No other keys are accepted. | |
| clientId | No | Required unless you authenticate with the Authorization header (Bearer <clientId>:<secret>, or an OAuth access token issued for this server). The clientId returned by register_agent. | |
| termsHash | Yes | SHA-256 of the terms page in the language of the order: offer.terms.<language>.hash from the order, copied exactly. Sending it confirms that the buyer accepts those terms. | |
| accessToken | Yes | The accessToken returned by create_order. | |
| offerVersion | Yes | offer.version from the order, copied exactly. | |
| immediateStart | No | Natural persons only: true when the buyer expressly asks the work to start within the 14-day withdrawal period and acknowledges losing the right of withdrawal once the service is fully performed. |