The API endpoint to create a Payment Customer is POST
https://connect.secucard.com/api/v2/Payment/Customers
.
Request
POST /api/v2/Payment/Customers HTTP/1.1
Host: connect-testing.secuconnect.com
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
{
"contact"
: {
"salutation"
:
"Mr."
,
"forename"
:
"Max"
,
"surname"
:
"Mustermann"
,
"address"
: {
"street"
:
"Max-Muster-Str."
,
"street_number"
:
"25a"
,
"postal_code"
:
"09555"
,
"city"
:
"Musterstadt"
,
"country"
:
"DE"
,
"additional_address_data"
:
"Whg. 202"
},
"email"
:
"mmustermann@example.net"
,
"mobile"
:
"+49 177 5555555"
,
"phone"
:
"+49 555 5555555"
}
}
If everything 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"
:
"payment.customers"
,
"id"
:
"PCU_38RG7MHRE2NJTPFMXRYQP3NKW6GVAZ"
,
"merchant"
: {
"object"
:
"general.merchants"
,
"id"
:
"MRC_WVHJQFQ4JNVYNG5B55TYK748ZCHQP8"
},
"contact"
: {
"salutation"
:
"Mr."
,
"forename"
:
"Max"
,
"surname"
:
"Mustermann"
,
"address"
: {
"street"
:
"Max-Muster-Str."
,
"street_number"
:
"25a"
,
"postal_code"
:
"09555"
,
"city"
:
"Musterstadt"
,
"country"
:
"DE"
,
"additional_address_data"
:
"Whg. 202"
},
"email"
:
"mmustermann@example.net"
,
"mobile"
:
"+49 177 5555555"
,
"phone"
:
"+49 555 5555555"
}
}
The most important field is id
, the ID of the Payment Customer object. You need to pass it to the Smart Transaction in order to set the customer or shipping address.