Front-end Order Creation

Checkout Session Confirm

Changed on

Purpose

Confirms the creation of an authorization where the buyer gave consent to the purchase and was accepted by Billie.

Preconditions:

  • Session id of the Session Create Call
  • Request body created with the response values received in the widget.

Success

  • Response Code: HTTP 202
  • response body: state -> created
  • response body: uuid -> ID of the created order

Attention

  • The duration and the objects delivery_address and amount you can copy from the widget response to the new request object.
  • The amount must be the same as submitted via the widget.
  • The debtor_company object from the widget response needs to be rebuilt to an object hierarchy debtor with company_address
put/checkout-sessions/{sessionId}/confirm

Request

Path parameters

sessionIdstring uuid required
Example:12345667-890a-bcde-f123-34567890abcd

Request body

durationinteger

Order Duration

external_codestring

Order external code

Example request

{
  "amount": {
    "gross": 260.27,
    "tax": 60.15,
    "net": 200.12
  },
  "debtor": {
    "name": "Billie GmbH",
    "company_address": {
      "street": "Charlottenstr. 4",
      "house_number": "4",
      "city": "Berlin",
      "postal_code": "10969",
      "country": "DE"
    }
  },
  "delivery_address": {
    "street": "Charlottenstr. 4",
    "house_number": "4",
    "city": "Berlin",
    "postal_code": "10969",
    "country": "DE"
  },
  "external_code": "DE123456-1"
}

Response

Order data successfully confirmed

external_codestring nullable
uuidstring uuid
state'pre_waiting' | 'authorized' | 'waiting' | 'created' | 'declined' | 'shipped' | 'partially_shipped' | 'complete' | 'canceled'
decline_reason'risk_policy' | 'risk_scoring_failed' | 'debtor_not_identified' | 'debtor_address' | 'risk_scoring_failed' | 'debtor_limit_exceeded'
durationinteger
created_atstring date-time
selected_payment_method'bank_transfer' | 'direct_debit' nullable

Example response

{
  "external_code": "C-10123456789-0001",
  "uuid": "12345667-890a-bcde-f123-34567890abcd",
  "state": "created",
  "decline_reason": "debtor_not_identified",
  "amount": {
    "gross": 260.27,
    "net": 200.12,
    "tax": 60.15
  },
  "unshipped_amount": {
    "gross": 260.27,
    "net": 200.12,
    "tax": 60.15
  },
  "duration": 30,
  "created_at": "2019-01-20 14:00:00",
  "delivery_address": {
    "country": "DE"
  },
  "debtor": {
    "name": "C-10123456789-0001",
    "company_address": {
      "country": "DE"
    },
    "billing_address": {
      "country": "DE"
    },
    "external_data": {
      "address": {
        "country": "DE"
      }
    }
  },
  "invoices": [
    {
      "uuid": "12345667-890a-bcde-f123-34567890abcd",
      "due_date": "2019-03-20",
      "created_at": "2019-03-20"
    }
  ],
  "selected_payment_method": "bank_transfer",
  "payment_methods": [
    {
      "type": "bank_transfer",
      "data": {
        "mandate_execution_date": "2019-01-20 14:00:00"
      }
    }
  ]
}

Changes