Use an Existing Payment Container

If you want to authorise with an existing Payment Container, you make nearly the same call, but you pass the Payment Container ID instead of the container details:

Request
POST /api/v2/Smart/Transactions/STX_33PXAW2YN2NJTPM5KPGMK7QF5PBVA2/prepare/creditcard HTTP/1.1
Host: https://connect-testing.secupay-ag.de/api/v2/Payment
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"container": {
"id": "PCT_CFKVVAPGW2NSQMSSCTVTT8U4525CAZ"
},
"callback_urls": {
"success_url": "https://www.example.org/3DS-success",
"failure_url": "https://www.example.org/3DS-failure"
}
}

The outcome is exactly the same. We illustrate only the case with no 3-D Secure check required:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "smart.transactions",
"id": "STX_33PXAW2YN2NJTPM5KPGMK7QF5PBVA2",
// ...
"customer": {
"object": "payment.customers",
"id": "PCU_WZ3HENRNE2NSQMSQHRD58CPH7GHCA2",
"contact": {
"forename": "Mike",
"surname": "Mustermann",
"name": "Mike Mustermann",
"address": {
"street": "Musterstr.",
"street_number": "42",
"additional_address_data": "App. 97",
"postal_code": "09999",
"city": "Dorianburgh",
"country": "DE"
},
"email": "Eunice.Spencer89@example.net",
"mobile": "+491775555555",
"phone": "+495555555555",
"dob": "1965-12-31T00:00:00+01:00"
}
},
"container": {
"object": "payment.containers",
"id": "PCT_CFKVVAPGW2NSQMSSCTVTT8U4525CAZ"
},
// ... // ...
"transactions": [{
"object": "payment.transactions",
"id": "PCI_4YN04HZ4Z705GMRSJ5EW4J4X0ZDPNW"
}],
"created": "2020-10-29T14:13:41+01:00",
"updated": "2020-10-29T14:13:50+01:00",
"status": "approved",
// ...
"payment_method": "creditcard",
"trans_id": "30093721",
// ...
}

This is particularly helpful for providing an express checkout experience. If needed, you can also create the Payment Container without utilizing the Smart Transaction.