POST /checkout/order
This endpoint requires authentication.
Header | Value |
---|---|
Authorization | Set the value to Bearer + + access_token |
Pass the following properties via application/json or form encoding in the body of the request.
A dictionary with fields
Field | Type | Description |
---|---|---|
cart | [CartItem.cart] | Array of CartItem.cart |
checkout | Checkout.Checkout | |
payment_method | String | String enumarion of 'point_of_sale', 'paid_in_shop', 'bank_transfer', 'ideal', 'bancontact', 'sofort', 'giropay', 'creditcard', 'cartes_bancaires', 'paypal', 'eps_uberweisung', 'payconiq', 'monizze', 'edenred', 'webpay', 'credomatic', 'satispay', 'stripe_card_visa_mc', 'stripe_card_amex', 'stripe_apple_pay', 'stripe_google_pay', 'payu_romania_visa', 'payu_romania_mc', 'payu_romania_visa_electron', 'payu_romania_maestro', 'payu_brazil_amex', 'payu_brazil_boleto_bancario', 'payu_brazil_diners', 'payu_brazil_elo', 'payu_brazil_hipercard', 'payu_brazil_mc', 'payu_brazil_visa', 'payu_sp_maestro', 'payu_sp_mc', 'payu_sp_pbl', 'payu_sp_visa', 'pesopay_gcash', 'pesopay_visa', 'pesopay_mc' |
return_url | URL | An URL field starting with http:// or https:// |
POST /checkout/order HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 8f84ba4d2199595c77949b86bcd43c8e3c7ab7f564eb8f8b53c3d641fcad7568b939d867a80d49e94307b8f8b927a3e8291ac58c2fa28c78b793e78e755e60537b05116172a94fd3163f81d47e600a3dcb3f483d3d95a386a0ac1185e5fdd4f140e9220a
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 635
{
"cart": [
{
"product_id": 3623,
"options": [],
"product_price_id": null,
"shop_id": 1352,
"amount": 10,
"persons": 0,
"gram": 0,
"comment": ""
}
],
"checkout": {
"method": "takeout",
"takeout": {
"shops": {
"shop_1352": {
"id": 1352,
"date": "2020-12-21",
"time": "13:00"
}
}
}
},
"payment_method": "point_of_sale",
"return_url": "https://bakeronline.com"
}
POST /checkout/order HTTP/1.1
Host: api.bakeronline.be
Authorization: Bearer 8f84ba4d2199595c77949b86bcd43c8e3c7ab7f564eb8f8b53c3d641fcad7568b939d867a80d49e94307b8f8b927a3e8291ac58c2fa28c78b793e78e755e60537b05116172a94fd3163f81d47e600a3dcb3f483d3d95a386a0ac1185e5fdd4f140e9220a
X-VERSION: 1.5.0
Accept-Language: en-US,en;q=0.5
Content-Type: application/json
Content-Length: 635
{
"cart": [
{
"product_id": 3623,
"options": [],
"product_price_id": null,
"shop_id": 1352,
"amount": 11,
"persons": 0,
"gram": 0,
"comment": ""
}
],
"checkout": {
"method": "takeout",
"takeout": {
"shops": {
"shop_1352": {
"id": 1352,
"date": "2020-12-21",
"time": "13:00"
}
}
}
},
"payment_method": "point_of_sale",
"return_url": "https://bakeronline.com"
}
A dictionary with fields
Field | Type | Description |
---|---|---|
order_group | OrderGroup | |
payment_url | URL? | Nullable. An URL field starting with http:// or https:// |
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 2414
{
"order_group": {
"id": 537,
"orders": [
{
"id": 537,
"status": "APPROVED",
"valid": true,
"order_nr": 1,
"prices": {
"price": {
"value": 85800,
"currency": "EUR"
},
"discount": {
"value": 0,
"currency": "EUR"
},
"warranty": {
"value": 0,
"currency": "EUR"
},
"delivery_cost": {
"value": 0,
"currency": "EUR"
},
"invoice_cost": {
"value": 0,
"currency": "EUR"
},
"sms_cost": {
"value": 0,
"currency": "EUR"
},
"transaction_cost": {
"value": 0,
"currency": "EUR"
},
"price_to_pay": {
"value": 85800,
"currency": "EUR"
}
},
"payment_method": "point_of_sale",
"checkout": {
"method": "takeout",
"date": "2020-12-21",
"time": "13:00"
},
"created_at": 1608038776,
"shop": {
"id": 1352,
"name": "Bread & Butter",
"address": {
"street": "Martensbaan",
"nr": "82",
"zipcode": "6717",
"city": "Doornik",
"country": "BE",
"position": {
"latitude": 51.260197,
"longitude": 4.402771
}
},
"allow_comments": true,
"currency": "EUR"
},
"payment_status": null,
"joyn": null,
"currency": "EUR"
}
]
},
"payment_url": null
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 102
[
{
"code": "corrected_cart",
"message": "2069",
"field": "cart.0"
}
]