In our example we create a Smart Transaction with nothing than the card charge in the basket. But you would also be able to buy other articles along with the card charge.
Request
POST /api/v2/Smart/Transactions HTTP/1.1Host: connect-testing.secuconnect.comAuthenticate: Bearer qb56tjj1bcvo9n2nj4u38k84loContent-Type: application/jsonAccept: application/json{ "is_demo": true, "idents": [ { "type": "card", "value": "9276004429942845" } ], "basket": { "products": [ { "id": 1, "ean": "4260447149502", "articleNumber": null, "desc": "Kartenaufladung 15 EUR", "quantity": 1, "priceOne": 1500, "tax": 7 } ] }, "basket_info": { "sum": 1500, "currency": "EUR" }}This creates a Smart Transaction with an amount to pay of €15.00, and one article having the very same gross unit price. The special article carries the special EAN to load a card.
Monetary amounts are expressed in the smallest currency unit (e. g. Euro Cent).
If everything is fine, the API responds 200 OK and the representation of the Smart Transaction:
Response
HTTP/1.1 200 OKContent-Type: application/json...{ "object": "smart.transactions", "id": "STX_PVEGYP82M2NRDMKPE3BCT5ZH0QJKA2", "merchant": { "object": "general.merchants", "id": "MRC_35SZ3R5GGQQP4T0U2T5GFAN9P6C4PG", "companyname": "John's Bakery" }, "transactions": [], "created": "2020-09-25T11:15:30+02:00", "status": "created", "transactionRef": null, "merchantRef": null, "intent": "sale", "basket": { "products": [ { "id": 1, "parent": null, "articleNumber": "", "ean": "4260447149502", "desc": "Kartenaufladung 15 EUR", "quantity": 1, "priceOne": 1500, "tax": 0, "group": [], "serialNumber": null, "item_type": "article", "reference_id": null, "contract_id": null, "sum": null } ], "texts": [], "type": "default" }, "basket_info": { "sum": 1500, "gratuity": null, "currency": "EUR" }, "idents": [ { "object": "smart.idents", "id": "smi_1", "prefix": "9276", "name": "secucard Kundenkarte", "type": "card", "value": "9276004429942845", "valid": true, "merchantcard": { "object": "loyalty.merchantcards", "id": "MCD_2RXTNXPRM2YG9922UMBHHAEWEGN6AJ", "merchant": { "object": "general.merchants", "id": "MRC_35SZ3R5GGQQP4T0U2T5GFAN9P6C4PG" }, "created_for_merchant": { "object": "general.merchants", "id": "MRC_35SZ3R5GGQQP4T0U2T5GFAN9P6C4PG" }, "card": { "object": "loyalty.cards", "id": "CRD_2U7MTNAMM3PMBPAB50C9G2AEHA9GPJ", "cardnumber": "9276004429942845", "created": "2015-09-28T16:01:20+02:00" }, "cardgroup": { "object": "loyalty.cardgroups", "id": "CRG_2BESGJNETJJRZVVYS8R7JWGVWK4PRZ", "display_name": "Geschenkgutschein", "display_name_raw": "Geschenkgutschein", "stock_warn_limit": 0, "picture": "https://connect.secucard.com/ds_g/8e79737df1e2513db48908b342c3cc436edf501a" }, "created_for_store": { "object": "general.stores", "id": "STO_2ZCZRU9V6U8QA7B49K94667UP6C4PJ" }, "customer": null, "is_base_card": true, "points": 0, "cash_balance": 0, "bonus_balance": 0, "balance": 0, "last_usage": null, "last_charge": null, "stock_status": "active", "lock_status": "unlocked", "passcode": 0, "expiry_date": null }, "customer": null } ], "is_demo": true, "application_context": { "locks": { "customer": false }, "return_urls": null, "iframe_opts": null }, "checkout_links": null, "payment_links": null}The card has not been charged because the payment has not yet been made.