Skip to main content

Success Hooks

Success hooks allows you to perform automatic custom Actions once a Transaction reaches the success state. The setting is configured per Connector, but can also be configured as a Global Settings.

The following hooks are currently available:

  • Send Sendgrid Mail
  • Send Success Mail to customer / merchant
  • Create Mandate
note

Not all options may be applicable to you.

Configuring hooks

To configure hooks follow this steps:

  1. Go to the Connector Detail Overview of the desired Connector
  2. Click Edit on the Settings section (see Connector Detail Overview)
  3. Select the Connector Setting Hooks: Transaction Success and click Add (see Connector Settings)
  4. Configure the mandatory parameters and click Save (see Hook Type: Send Sendgrid Mail)

Send Sendgrid Mail

This hook triggers a send-email request to a configured SendGrid Account.

Hook Type: Send Sendgrid Mail

Mandatory Parameters (see Hook Type: Send Sendgrid Mail):

  • apiKey - API Key of your SendGrid Account
  • templateID - template ID of the desired mail template (configured in SendGrid)
  • from - Sender email address

Optional Parameters:

  • to - Email of recipient. This parameter should only be used if all emails should be sent to the email specified here. Without a "to" parameter, emails will per default be sent to the customer email
  • subject - Subject of email. When specifying a subject, make sure to add the placeholder in the SendGrid template (see SendGrid Template Configuration)
  • cc - CC recipients of email
  • bcc - BCC recipients of email
  • from_name - Sender name (usually appears in mail clients alongside with the mail address, e.g. Alex Smith <[email protected]>)

There are additional dynamic fields available to be used in these templates (see table below) (e.g. {{transaction.amount}}).

Dynamic FieldDescription
transaction.uuidTransaction UUID
transaction.createdAtin format YYYY-MM-DD hh:mm (in UTC)
transaction.createdAtMerchantTzin format YYYY-MM-DD hh:mm (for the configured merchant timezone)
transaction.amountTransaction amount
transaction.currencyTransaction currency
transaction.descriptionTransaction description
transaction.descriptorPayment descriptor (see API Documentation)
transaction.statusTransaction status
transaction.MerchantTxIdMerchant transaction ID
transaction.adapterTxIdAdapter transaction ID
transaction.methodPayment Method (see API Documentation)
transaction.typeTransaction type
transaction.testModeBoolean value if transaction was processed in test mode
transaction.additionalId1Transaction Additional ID 1
transaction.additionalId2Transaction Additional ID 2
transaction.MerchantMetaDataTransaction Merchant Meta Data
customer.identificationCustomer identification
customer.firstNameCustomer's first name
customer.lastNameCustomer's last name
customer.birthDateCustomer's birth date
customer.billingAddress1Customer's billing address 1
customer.billingAddress2Customer's billing address 2
customer.billingCityCustomer's billing city
customer.billingPostcodeCustomer's billing postcode
customer.billingStateCustomer's billing state
customer.billingCountryCustomer's billing country
customer.billingPhoneCustomer's billing phone number
customer.shippingFirstnameCustomer's shipping first name
customer.shippingLastnameCustomer's shipping last name
customer.shippingCompanyCustomer's shipping company
customer.shippingAddress1Customer's shipping address 1
customer.shippingAddress2Customer's shipping address 2
customer.shippingCityCustomer's shipping city
customer.shippingPostcodeCustomer's shipping postcode
customer.shippingStateCustomer's shipping state
customer.shippingCountryCustomer's shipping country
customer.shippingPhoneCustomer's shipping phone number
customer.companyCustomer's company
customer.emailCustomer's email
customer.ipAddressCustomer's IP address
customer.nationalIdCustomer's national Identification
customer.ibanif used: customer IBAN number
customer.bicif used: customer BIC number
customer.genderCustomer's Gender
customer.extraDataCustomer Extra Data
customer.mandateIdif used: customer mandate ID
customer.mandateDateif used: customer mandate date
card.typeif used: creditcard type
card.cardHolderif used: creditcard holder name
card.expiryMonthif used: creditcard expiry month
card.expiryYearif used: creditcard expiry year
card.firstSixDigitsif used: creditcard's first six digits
card.lastFourDigitsif used: creditcard's last four digits

This hook triggers an email to be sent to the customer email address.

Hook Type: Send Success Mail to customer (PayByLink)

There are no mandatory Parameters to be added.

Email templates to be used, need to be configured in the Pay-By-Link Tab for this connector.

note

Emails are only sent for transaction types debit, pre-auth, register and payout and only if additionally the Connector Setting Virtual Terminal: Send a confirmation email after a successful transaction is enabled.

This hook triggers an email to be sent to the specified merchant email address.

Hook Type: Send Success Mail to merchant (PayByLink)

Mandatory Parameters (see Connector Setting Send Success Mail to merchant (PayByLink)):

  • email - Merchant email address the email should be sent to

Email templates to be used, need to be configured in the Pay-By-Link Tab for this connector.

note

Emails are only sent for transaction types debit, pre-auth, register and payaut and only if additionally the Connector Setting Virtual Terminal: Send a confirmation email after a successful transaction is enabled

Create Mandate

This hook triggers a Mandate ID to be created and added in the Payment Data section of the Transaction Details for Transaction Type Register.

Hook Type: Create Mandate

Mandatory Parameters (see Connector Setting Create Mandate):

  • connector - GUID of the Sepa Connector to be used for the Transaction Processing
tip

This Hock Type should only be used for the combination of Adapters Fintec (for transactions of type register) and SepaExpressV1 (for recurring transactions of type debit).

In any other case we recommend to use the mandate flow of Adapter SepaExpressV2 as described in the Adapter-specific Guides Sepa.