Create a Smart Transaction
To place an order for Click & Collect, you need to create a Smart Transaction with the needed details. You can use the same endpoint as for all Smart Transactions, POST /api/v2/Smart/Transactions.
Request
POST /api/v2/Smart/Transactions HTTP/1.1
Host: testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
{
"is_demo"
:
true
,
"intent"
:
"order"
,
"basket"
: {
"products"
: [
{
"id"
: 0,
"articleNumber"
:
"10002"
,
"desc"
:
"Kaiserbrötchen 0,30 €"
,
"quantity"
: 1,
"priceOne"
: 30,
"tax"
: 7
},
{
"id"
: 1,
"articleNumber"
:
"10013"
,
"desc"
:
"Brotaufstrich 0,30 €"
,
"quantity"
: 1,
"priceOne"
: 30,
"tax"
: 7
},
{
"id"
: 2,
"articleNumber"
:
"10030"
,
"desc"
:
"Waldfruchtschorle Flasche 0,80 €"
,
"quantity"
: 1,
"priceOne"
: 80,
"tax"
: 19
}
]
},
"basket_info"
: {
"sum"
: 140,
"currency"
:
"EUR"
},
"delivery_options"
: {
"type"
:
"collection"
,
"scheduled_slot"
: {
"start_date"
:
"2020-07-06T12:45:00+02:00"
,
"end_date"
:
"2020-07-06T14:45:00+02:00"
},
"store_id"
:
"STO_F3TP10N3AOEDCDI4LIGKIV6KR78BWY"
}
}
When the secuconnect API responds with HTTP status 200 OK, everything is fine.
Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent). For example, the basket total is €1.40.
You can also add the collection details during the checkout process. It is allowed before you call POST /api/v2/Smart/Transactions/{id}/prepare/{method} or POST /api/v2/Smart/Transactions/{id}/start/{method}. When you update the Smart Transaction after prepare/{method} but before start, you need to prepare it again.