Send a Customer Notification

Our system can send a notification email to the customer. The email is composed of your individual template and data found in the Smart Transaction. This function is available at an additional cost.

In order to send such an email you need to pass a communications object to the Smart Transaction:

Request
POST /api/v2/Smart/Transactions HTTP/1.1
Host: connect-testing.secupay-ag.de
Authenticate: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"is_demo": true,
"contract": {
"id": "GCR_2H69XY35227V2VKP9WRA3SJ0W95RP0"
},
"device_source": {
"id": "SDV_WPX6NU09Q2NDF0KJD3H584EXJR3XA2"
},
"customer": {
"contact": {
"salutation": "Mr.",
"title": "Dr.",
"forename": "Max",
"surname": "Mustermann",
"address": {
"street": "Musterstr.",
"street_number": "25 b",
"postal_code": "99999",
"city": "Musterstadt",
"country": "DE"
},
"email": "max123@example.org"
}
  },
"intent": "sale",
"idents": [
{
"type": "card",
"value": "9276004424644352"
}
],
"basket": {
"products": [
{
"id": 1,
"ean": "4260447149502",
"articleNumber": null,
"desc": "Kartenaufladung 20 EUR",
"quantity": 1,
"priceOne": 2000, // €20
"tax": 0
}
]
},
"basket_info": {
"sum": 2000, // €20
"currency": "EUR"
},
"communications": {
"action_type": "charge",
"template_id": "ETP_6RYLPEWO8O2UPZV83C095P7IQ4GAL1"
  }
}

This would also work if you let our system create the Smart Transaction on-the-fly as described in another section. Then the idents field would look different.

Parameter details:

Field

Type

Meaning

communications

object

Optional control for the email communication.

communications/action_type

string

Must be charge.

communications/template_id

string

Must be the template ID you have received from our project contact.

The email is sent when the Smart Transaction is started. Then the payment is captured, and the card is actually charged (loaded). If you use auto_capture the payment is captured immediately after successful authorisation. It is sent to the email address of the customer in the Smart Transaction (customer/contact/email).

Cross-reference table between Smart Transaction and email template:

Field in Smart Transaction

Placeholder in Email

Example

customer/contact/salutation

{{salutation}}

Herr

customer/contact/title

{{title}}

Dr.

customer/contact/forename

{{forename}}

Max

customer/contact/surname

{{surname}}

Mustermann

idents/#/cardnumber¹

{{cardnumber}}

9276004424644352

basket/products/#/priceOne

{{amount}}

20,00

basket/products/#/desc

{{article_description}}

Kartenaufladung 20 EUR

¹) If you create the card on-the-fly, our system will automatically set this field when the card is created. You can omit it.