Hygglig Checkout

Management API

Send, cancel, credit, and retrieve existing Hygglig orders after the checkout has been created.

Send orderPATCH /api/orders/send
with order_number
Cancel orderPATCH /api/orders/cancel
with order_number
Credit articlesPATCH /api/orders/credit
with article rows
Get orderGET /api/orders
by order_number
1

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}` } });
2

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.

3

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 }]) });
4

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.

5

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.

View API documentation