Capture the Payment

You would carry out the payment as described in the integration guide for payment. We assume this is already implemented.

The last step is always a call to /start:

Request
POST /api/v2/Smart/Transactions/STX_W28QKGS8H2X07TF64EDJ8DZEJN9RA2/start HTTP/1.1
Host: connect-testing.secupay-ag.de
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Accept: application/json

If everything is fine, the API responds with 200 OK, and the status of the Smart Transaction is updated once more:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "smart.transactions",
"id": "STX_W28QKGS8H2X07TF64EDJ8DZEJN9RA2",
// ...
"updated": "2021-01-20T09:37:50+01:00",
"status": "ok",
// ...
"receipt": [{
"type": "separator",
"value": {
"caption": "Kundenkarte"
}
}, {
"type": "name-value",
"value": {
"name": "Kartennummer: ",
"value": "9276004424644352",
"decoration": []
}
}, {
"type": "name-value",
"value": {
"name": "TA Code: ",
"value": "32076570",
"decoration": []
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Umsatz erfasst:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "79,00 EUR",
"decoration": ["important"]
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Bonus:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "7,90 EUR",
"decoration": ["important"]
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Aktuelles Guthaben",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "10,10 EUR",
"decoration": ["important"]
}
}, {
"type": "separator",
"value": {
"caption": "Kundenkarte Aufladung"
}
}, {
"type": "name-value",
"value": {
"name": "Kartennummer:",
"value": "9276004424644352",
"decoration": []
}
}, {
"type": "name-value",
"value": {
"name": "TA Code:",
"value": "32076572",
"decoration": []
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Folgender Betrag",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "wurde aufgeladen:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "20,00 EUR",
"decoration": ["important"]
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Aktuelles Guthaben:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "30,10 EUR",
"decoration": ["important"]
}
}],
// ...
"idents": [{
"object": "smart.idents",
// ...
"merchantcard": {
"object": "loyalty.merchantcards",
"id": "MCD_2UXQJ84A62MENH7UWH6QXDYJSBNAA9",
// ...
"cash_balance": 2200,
"bonus_balance": 810,
"balance": 3010,
"last_usage": "2021-01-20T09:37:59+01:00",
"last_charge": "2021-01-20T09:37:59+01:00",
// ...
}
}],
// ...
}

Response status 200 OK, the field "status": "ok" and the receipt show, the payment has been made, and the loyalty card has been loaded.