Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dintero.com/llms.txt

Use this file to discover all available pages before exploring further.

The Order Management and Checkout services are built to work together but can also be used independently.

Authorization

Create an API Client with the following scopes:
  • admin:checkout
  • admin:shopping
Note down the client_id and client_secret for use in the examples below.

Steps

1

Create a draft order

Create a draft order with line items. The order is not yet active and can be freely modified.Orders API POST /accounts/{aid}/shopping/draft_ordersExample request body:
{
  "options": {
    "generate_order_id": "ALPHANUMERIC_9"
  },
  "order": {
    "currency": "NOK",
    "items": [
      {
        "id": "175938",
        "line_id": 1,
        "quantity": 2,
        "gross_amount": 39800,
        "tax_lines": [{ "amount": 7960, "percentage": 25 }],
        "description": "Stablestol for utendørsbruk",
        "description_alias": "Stablestol"
      }
    ]
  }
}
2

Complete the draft order

Complete the draft to make the order active and assign it an order_id.Orders API PUT /accounts/{aid}/shopping/draft_orders/{id}/complete
3

Create a checkout session

Create a checkout session, using the order_id as merchant_reference.Checkout API POST /sessions-profileExample request body:
{
  "url": {
    "return_url": "https://example.com/accept",
    "callback_url": "https://example.com/callback"
  },
  "order": {
    "amount": 39800,
    "currency": "NOK",
    "merchant_reference": "order_id",
    "items": [
      {
        "id": "175938",
        "line_id": "1",
        "description": "Stablestol for utendørsbruk",
        "quantity": 2,
        "amount": 39800,
        "vat_amount": 7960,
        "vat": 25
      }
    ]
  },
  "profile_id": "default"
}
profile_id may vary. Check Backoffice for the correct value.
Create the session:
# Get access token
curl 'https://api.dintero.com/v1/accounts/P11223351/auth/token' \
  -H 'Content-Type: application/json' \
  --user client_id:client_secret \
  -d '{"audience": "https://api.dintero.com/v1/accounts/P11223351", "grant_type": "client_credentials"}'

# Create session
curl 'https://checkout.dintero.com/v1/sessions-profile' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer token' \
  -d '<json-body-from-above>'
See Display Checkout for how to present the session to the customer.When payment completes, poll the transaction status and confirm it is AUTHORIZED before proceeding.
4

Mark the order as authorized

Record the authorization on the order to mark funds as reserved.Orders API POST /accounts/{aid}/shopping/orders/{order_id}/authorizationsExample request body:
{
  "items": [{ "amount": 39800, "line_id": 1 }],
  "payment_details": { "payment_id": "transaction_id" },
  "success": true
}
5

Capture the transaction

Once items are ready to ship, capture the payment in the Checkout service. Then record the capture on the order to keep state in sync.Checkout API POST /transactions/{id}/captureOrders API POST /accounts/{aid}/shopping/orders/{order_id}/capturesExample request body for the Orders API call:
{
  "items": [{ "amount": 39800, "line_id": 1 }],
  "payment_details": { "payment_id": "transaction_id" },
  "success": true
}
6

Refund the transaction

If the customer requests a refund, refund the payment in the Checkout service first. Then record the refund on the order.Checkout API POST /transactions/{id}/refundOrders API POST /accounts/{aid}/shopping/orders/{order_id}/refundsExample request body for the Orders API call:
{
  "items": [{ "amount": 39800, "line_id": 1 }],
  "payment_details": { "payment_id": "transaction_id" },
  "success": true
}
Last modified on May 12, 2026