Hygglig Checkout
Management API
Send, cancel, credit, and retrieve existing Hygglig orders after the checkout has been created.
with order_number
with order_number
with article rows
by order_number
Send order to buyer
Use PATCH /api/orders/send to send or activate an existing order for the authorized merchant. Invoice and instalment flows may publish downstream invoice or instalment events before the request succeeds.
const res = await fetch('https://sb-checkout.hygglig.com/api/orders/send?shardKey=SE&order_number=123456789012', { method: 'PATCH', headers: { 'Authorization': `Basic ${creds}` } });
Cancel order
Use PATCH /api/orders/cancel to cancel or fully credit an existing order. Depending on payment method, the API may enqueue invoice-event, AML, and refund messages.
Credit order articles
Use PATCH /api/orders/credit to partially credit selected articles on an existing order. The API validates that the requested credit amount does not exceed the current remaining order amount.
await fetch('https://sb-checkout.hygglig.com/api/orders/credit?shardKey=SE&order_number=123456789012', { method: 'PATCH', headers: { 'Authorization': `Basic ${creds}`, 'Content-Type': 'application/json' }, body: JSON.stringify([{ article_name, article_number, price, quantity, vat, description }]) });
Retrieve order by order number
Use GET /api/orders with shardKey and order_number query parameters to retrieve a single merchant order. Orders in Created, Rejected, or Unknown state are returned as not found.
Important data rules
The Order Management API uses shardKey and order_number query parameters. Article values use the documented scaled string contract, for example price, quantity, and vat values such as 19900, 100, and 2500.
Need schemas and status codes?
Open the full Order Management API documentation for request parameters, article credit request fields, responses, and error cases.