Create a Payment Container

The Payment Container is created using POST /Payment/Containers. It must belong to the customer you are using.

Request
POST /api/v2/Payment/Containers HTTP/1.1
Host: connect-testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"type": "bank_account",
"private": {
"owner": "John Doe",
"iban": "DE12500105170648489890",
"bic": "ABCDDE12XXX"
},
"customer": {
"id": "PCU_WGRRF2BU82N9ES6670ZAV6KXJ0KNAH"
}
}

If everything is fine, the API responds with 200 OK and the representation of the Payment Container:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"id": "PCT_J0KNRWG67AV66AHKXRF2BU82N90ZES",
"object": "payment.containers",
"type": "bank_account",
"private": {
"owner": "Max Mustermann",
"iban": "DE12500105170648489890",
"bic": "ABCDDE12XXX"
},
"customer": {
"object": "payment.customers",
"id": "PCU_2YK9WTXAS2NK46QAD3H58BAEZQCWA2"
}
}

You need to remember the container id in order to pass it later.