Email Optin

Prepare an Invoice

Invoice preparation is done through API.

Find out how to create an invoice.

Optin

Use the field emailOptin at invoice creation to trigger the email optin retrieval flow.

After the payment flow, the user will be asked if he wants to receive his next invoices through email. If the user decides to optin, Digiteal will then collect the email and send it through a webhook.

todo: show optin screen

Webhook

You can subscribe to a webhook to be notified when a user chooses to receive his invoices through email.

📘

Webhook type

CUSTOMER_OPTIN

The webhook body will contain the email collected in the email optin retrieval flow as well as the information related to the invoice.

{
  "executionTimestamp":"2024-03-18T23:11:14.060413",
  "creditorIdentificationNumber":"BE:VAT:BE0129306068",
  "customerInternalId":"54e5b890-b08b-4268-a374-5c3f13582c41",
  "channel":"DIGITEAL",
  "changeType":"OPTIN",
  "email":"[email protected]"
}