v1

latestOpenAPI 3.0.0© Billie GmbH, 20202026-07-24143643.6 KB
Back-end Order Creation

Create Order

Purpose:

Creates an order directly from the backend without buyer interaction.

Preconditions:

  • All the order related data is present

Success:

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

Attention:

This call should be used when the buyer consent is received by another channel.

post/orders

Request body

commentstring
durationinteger required
external_codestring
additional_billing_emailsstring[]

Example request

{
  "amount": {
    "gross": 260.27,
    "net": 200.12,
    "tax": 60.15
  },
  "duration": 30,
  "delivery_address": {
    "country": "DE"
  },
  "debtor": {
    "company_address": {
      "postal_code": "10969",
      "country": "DE"
    },
    "billing_address": {
      "country": "DE"
    },
    "legal_form": "10001"
  },
  "debtor_person": {
    "phone_number": "030 31199251",
    "email": "james.smith@example.com",
    "locale": "de-DE"
  },
  "line_items": [
    {
      "amount": {
        "gross": 260.27,
        "net": 200.12,
        "tax": 60.15
      }
    }
  ]
}

Response

Order successfully created

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"
      }
    }
  ]
}