Step 2: Create the Smart Transaction

First we create a Smart Transaction:

Request
POST /api/v2/Smart/Transactions HTTP/1.1
Host: connect-testing.secupay-ag.de
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"intent": "sale",
    "basket": {
"products": [
{
"id": 1,
"item_type": "article",
"desc": "BRÖTCHENANGEBOT 8 Stück",
"articleNumber": "70000",
"quantity": 1,
"priceOne": 1,
"tax": 7
}
],
},
  "basket_info": {
"sum": 1,
"currency": "EUR"
},
"merchantRef": "Kundennr. 101",
"transactionRef": "Belegnr. 55501",
}

This creates a Smart Transaction about €0.01.

Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent).

The parameters are explained in depth in the Reference part.

If everything is fine, the API responds with 200 OK, and the representation of the newly created Smart Transaction:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "smart.transactions",
"id": "STX_3HXQQBSVK2XWNAX7ESCZH9NZY3YZAZ",
"merchant": {
"object": "general.merchants",
"id": "MRC_8GTCKFB97SR4GET4KGAB6Y59K4PGO8",
"companyname": "Musterfirma GmbH"
},
"device_source": {
"object": "smart.devices",
"id": "SDV_2T23JN7KS2NVMPJ76SPZV9HGWXFHA2"
},
"created": "2021-02-25T08:47:25+01:00",
"status": "created",
// ...
"merchantRef": "Kundennr. 101",
"transactionRef": "Belegnr. 55501",
    "basket": {
"products": [
{
"id": 1,
"parent": null,
"item_type": "article",
"desc": "BRÖTCHENANGEBOT 8 Stück",
"articleNumber": "70000",
"ean": null,
"quantity": 1,
"priceOne": 1,
"tax": 7,
"reference_id": null,
}
],
"type": "default",
"texts": []
},
  "basket_info": {
"sum": 1,
"currency": "EUR",
// ...
},
"is_demo": false,
// ...
}

The new Smart Transaction has the initial status created. The API also adds some information about the merchant and the device.