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_27V90VC9K2X06V7GD5NYYWYHKHT3AZ/start HTTP/1.1
Host: connect-testing.secupay-ag.de
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Accept: application/json

At this time, the card will be created. If the card is loaded or already used the needed Loyalty Transactions will be created too.

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

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "smart.transactions",
"id": "STX_27V90VC9K2X06V7GD5NYYWYHKHT3AZ",
// ...
"updated": "2021-01-19T16:25:22+01:00",
"status": "ok",
// ...
"receipt": [{
"type": "separator",
"value": {
"caption": "Kundenkarte"
}
}, {
"type": "name-value",
"value": {
"name": "Kartennummer: ",
"value": "9276004429776746",
"decoration": []
}
}, {
"type": "name-value",
"value": {
"name": "TA Code: ",
"value": "32051450",
"decoration": []
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Umsatz erfasst:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "59,00 EUR",
"decoration": ["important"]
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Aktuelle Punkte:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "0",
"decoration": ["important"]
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Bonus:",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "5,90 EUR",
"decoration": ["important"]
}
}, {
"type": "space"
}, {
"type": "textline",
"value": {
"text": "Aktuelles Guthaben",
"decoration": []
}
}, {
"type": "textline",
"value": {
"text": "5,90 EUR",
"decoration": ["important"]
}
}],
// ...
"idents": [{
"object": "smart.idents",
"id": "smi_3",
"prefix": "CRG_",
"name": "secucard Kundenkarte erstellen",
"type": "create_card",
"value": "CRG_442AC7B8XCVU3XG2NX9E5XHJWH4CRK",
"valid": true,
"merchantcard": {
"id": "MCD_3ZYHHRFP62X06V7ZFHXXF3S07S0FAZ",
"cardgroup": {
"id": "CRG_442AC7B8XCVU3XG2NX9E5XHJWH4CRK",
"object": "loyalty.cardgroups",
"display_name": "Entwickler Card",
"display_name_raw": "Entwickler Card",
"stock_warn_limit": 0,
"picture": "https://connect.secucard.com\/ds_g\/8e79737df1e2513db48908b342c3cc436edf501a"
},
"merchant": {
"id": "MRC_WVHJQFQ4JNVYNG5B55TYK748ZCHQP8",
"object": "general.merchants"
},
"contract": {
"id": "GCR_2H69XY35227V2VKP9WRA3SJ0W95RP0"
},
"lock_status": "unlocked",
"object": "loyalty.merchantcards",
"created_for_merchant": {
"object": "general.merchants",
"id": "MRC_WVHJQFQ4JNVYNG5B55TYK748ZCHQP8"
},
"card": {
"object": "loyalty.cards",
"id": "CRD_25493S2R9NNNCTR0VW74KQTRP2KXPX",
"cardnumber": "9276004429776746",
"created": "2021-01-19T16:25:24+01:00"
},
"created_for_store": {
"object": "general.stores",
"id": "STO_2ZCZRU9V6U8QA7B49K94667UP6C4PJ"
},
"is_base_card": true,
"points": 0,
"cash_balance": 0,
"bonus_balance": 590,
"balance": 590,
"last_usage": "2021-01-19T16:25:25+01:00",
"last_charge": "2021-01-19T16:25:25+01:00",
"stock_status": "stored",
"passcode": 1,
"expiry_date": null
}
}],
// ...
}

Now you see the actual card (line 164-207). The first revenues are tracked, and a bonus balance of €5.90 was already granted.

We recommend to save the card number to the login account of your customer. If there is no such account, or if you have created and loaded a gift card, you would send the card number to the buyer.