Skip to content

Email and receipts

FlowPayra Lite sends email through the sending service the merchant picks: a sending provider such as Resend, Cloudflare, Amazon SES, SendGrid, Postmark, Mailgun, Brevo, Alibaba Cloud DirectMail or Tencent Cloud SES, a company mailbox such as Tencent Exmail, Alibaba Mail or Google Workspace, or any SMTP server. When payers leave an email address on the checkout, the system sends them payment receipts and subscription receipts. Ticket emails, admin notices and alert emails go out through the same sending service.

All settings are under Collection → Receipts & email. The page has four tabs:

Tab Content Roles
Receipts Receipt type switches, the checkout email field, merchant details on receipts, and the receipt preview Admin
Mail server The sending provider and its credentials, the sender domain’s DNS records (written for you if you like), bounce notifications, test emails and the bounce limit Admin
Delivery log Every email sent or waiting to be sent, with resend Admin, operator
Bounces and suppressed addresses Addresses that have bounced and addresses no longer mailed, with the action to lift a suppression Admin, operator

A badge next to the page title shows the sending state: Sending set up or No mail server.

Email Recipient When
Payment receipt, Refund receipt Payer See Receipt types
Subscription receipts: Subscription started, Charge successful, Charge failed, Trial ending soon, Subscription cancelled / completed Payer See Receipt types
Subscription sign-in link Payer When the payer signs in to their subscriptions page by email
Ticket confirmation The payer who submitted the ticket After the payment help form is submitted
Merchant notice The ticket notification email, or the support email when that is not set When a new ticket arrives
Ticket reply The payer who submitted the ticket When an admin or operator replies on the ticket
Admin notice The notification email of the other admins When an admin carries out a sensitive operation
System alert The email channels of the alert center When an alert opens or resolves

Admin notices and alert channels are described in Admins and passkeys.

The Sending service card on the Mail server tab lists four steps in order: provider and credentials, domain and DNS, bounce notifications, test email. The next step to do opens by itself; finished steps fold into one line, and Edit opens them again. Once all are done, the card is the sending status page. Each step is saved on its own, so you can leave and come back.

The Mail server tab once set up

Provider Sends over Sender domain Bounce notifications
Resend HTTP API or SMTP Added at the provider Callback registered for you
Cloudflare (beta) HTTP API or SMTP Added at the provider; the domain must use Cloudflare DNS Pulled from a Cloudflare queue every 30 seconds
Amazon SES HTTP API or SMTP Added at the provider (Easy DKIM and a custom MAIL FROM) Pushed through SNS, registered for you
SendGrid HTTP API or SMTP Added at the provider Signed Event Webhook, registered for you
Postmark HTTP API or SMTP Added at the provider Callback registered for you
Mailgun HTTP API or SMTP Added at the provider Callback registered for you
Brevo HTTP API or SMTP Added at the provider Callback registered for you
Alibaba Cloud DirectMail HTTP API or SMTP Added at the provider Pushed through EventBridge, registered for you
Tencent Cloud SES SMTP Added at the provider A callback URL you paste into Tencent Cloud’s console
Tencent Exmail, Alibaba Mail, Google Workspace SMTP SPF and DKIM guidance Not available
Custom SMTP SMTP The sender domain check Not available
  • The HTTP API is not affected by blocked SMTP ports on the server, and returns the provider’s message id.
  • Tencent Cloud SES sends over SMTP only: its API sends reviewed templates only. Individual-verified accounts opened after 2026-03-02 cannot use SMTP; upgrade to enterprise verification or pick another provider.
  • Google Workspace connects with an app password (the account needs 2-Step Verification, and some organizations disable it) or through the SMTP relay smtp-relay.gmail.com (an admin allows this server’s outgoing IP under Admin console › Gmail › Routing).
  • Company mailboxes and custom SMTP servers send no bounce notifications; only rejections at send time are recognized.
  1. Select Edit next to Provider and credentials (it opens by itself the first time).
  2. Pick the provider. The form shows the credentials it needs, with a link to where you get them.
  3. For providers with both, choose HTTP API or SMTP; for providers with regions, choose the region.
  4. Enter the credentials, the sender name and the sender address.
  5. Select Save and complete step-up verification.

Resend picked, with its API key and the sender address

  • Credentials are stored encrypted and not shown again; leave a field empty to keep the saved value.
  • The SMTP server, port, encryption and username come from the provider’s preset; the Amazon SES SMTP password is derived from the secret key for the region. Only a custom SMTP server is typed in: encryption STARTTLS, TLS or None (internal relays only), with the port defaulting to 587, 465 or 25.
  • Send from a subdomain (for example mail.example.com) to keep its reputation apart from your everyday mail.
  • Switching providers clears the previous provider’s domain and notification set-up; the later steps have to be done again.

The credentials each provider needs:

Provider Credentials
Resend An API key. Adding the domain and registering notifications need a Full access key; once set up you can switch to a Sending access key
Cloudflare The account ID and an API token with Email Sending edit; bounce notifications also need Queues edit
Amazon SES An IAM user’s access key ID and secret access key (not temporary credentials) with sending, identity and SNS topic/subscription permissions. New accounts are in the sandbox and can only send to verified addresses until production access is granted in the AWS console
SendGrid An API key with mail send, domain authentication and Event Webhook permissions
Postmark The Server Token (sending and notifications) and the Account Token (adding the domain)
Mailgun An API key; the webhook signing key when it cannot be read through the API; for SMTP, the domain’s SMTP username and password
Brevo An API key; for SMTP, the SMTP login and SMTP key
Alibaba Cloud DirectMail A RAM user’s AccessKey with DirectMail and EventBridge permissions; for SMTP, the sender address’s SMTP password
Tencent Cloud SES The SecretId and SecretKey (adding the domain, setting up the sender address) and the sender address’s SMTP password
Tencent Exmail, Alibaba Mail The mailbox’s client password or third-party client password, with SMTP enabled for the account in the admin console
Google Workspace An app password; none with the SMTP relay

Alibaba Cloud DirectMail and Tencent Cloud SES want the sender address created at the provider first: once the domain passes, the system creates it with these credentials and sets its SMTP password.

Receiving mail servers use the sender domain’s DNS records to tell whether an email really comes from that domain:

  • SPF: which servers may send mail for the domain.
  • DKIM: the provider signs each email with the domain’s private key; receivers check it with the public key in DNS. Someone faking your domain has no private key.
  • DMARC: requires the sender’s domain to match the SPF or DKIM domain, and tells receivers what to do with mail that does not. Only p=quarantine or p=reject stops email that falsely uses your domain; p=none only reports.

For providers that add the domain, select Add {domain} at {provider} and complete step-up verification: the system adds the sender domain through the provider’s API, lists the records it asks for and shows the provider’s verification status. For company mailboxes the SPF and DKIM guidance shows right away, and the DKIM key is copied from the mailbox’s admin console; for Tencent Exmail, first enter the DKIM selector that console shows.

Domain and DNS: the records the provider asks for, checked in public DNS

The table lists each record’s purpose, type, name (fully qualified), value and status, with a copy button:

Status Meaning
In place The record is found in public DNS
Missing The record is not found
Different value A record of that name is published with another value; the current value is shown under the value
Needs a change Published but in need of a change, for example several SPF records at one name, or DMARC at p=none
Lookup failed The DNS query failed

The provider’s own verification result shows under the status.

  • SPF is checked where the provider wants it, not necessarily at the root: Resend uses the send. subdomain, Cloudflare cf-bounce..
  • A name can have one SPF record only. If one exists, merge the provider’s include: into it rather than adding a second record.
  • When the zone holding the sender domain (the organizational domain) has no DMARC record, the console suggests v=DMARC1; p=none, with an rua= report address when the support address belongs to that domain. Subdomains follow the organizational domain’s DMARC. Once the reports look right, move to p=quarantine, then p=reject.
  • Inbound (optional) records (such as Mailgun’s MX) make the provider receive the domain’s incoming mail. Do not add them if the domain already receives mail elsewhere.
  • DNS changes usually take minutes to hours. While the page is open it checks every minute; Check again checks at once.

When the domain’s DNS is at Cloudflare, DNSPod (Tencent Cloud) or Alibaba Cloud DNS, the system can write the records. The host is picked from the domain’s NS records, and you can change it.

  1. Select Write to DNS.
  2. Enter a credential limited to the domain (see the table below). It is used for this read and write only and is not stored.
  3. Select Read current records. The system reads the domain’s current records and lists what it will do with each record.
  4. Select Write {n} records (verify) and complete step-up verification. The write is recorded in the audit log, and the records are checked again.

Write to DNS: what will be added and what is kept

DNS host Credential and least permissions
Cloudflare A custom API token with Zone › Zone › Read and Zone › DNS › Edit, limited to this zone. The Global API Key is not accepted
DNSPod A Tencent Cloud CAM sub-user’s SecretId and SecretKey, with a policy allowing only DescribeDomain, DescribeRecordList, CreateRecord, ModifyRecord and DeleteRecord on this domain
Alibaba Cloud DNS A RAM user’s AccessKey, with a policy allowing only DescribeDomainRecords, DescribeSubDomainRecords, AddDomainRecord, UpdateDomainRecord and DeleteDomainRecord on this domain

What happens to each record:

Action When
Add The name has no such record
Merge One SPF record exists: the provider’s include: is added before its all, not as a second record
Replace The DKIM selector or CNAME already has another value: the old and new values are shown, and the record is replaced once you confirm
Keep The record exists with the same value; an existing DMARC record is always kept
Conflict Several SPF records at the name, or SPF with redirect=; a CNAME clashing with other records at the name; MX records already at the name (its current incoming mail). Nothing is written; fix it by hand
Needs value A company mailbox’s DKIM key: paste the value from the mailbox’s admin console, then plan again
  • Records written at Cloudflare are DNS only, not proxied.
  • The suggested DMARC value can be edited before writing, or left out with Leave DMARC out this time.
  • Inbound (optional) records are not written unless you tick the box for them.
  • If the merged SPF record needs more than 10 DNS lookups, a warning says so: SPF may then fail, so trim the include: terms.

Once connected, the provider’s bounce, complaint and delivery notifications come back to the system, for bounce counting and suppression (see Bounces and suppression).

  1. Open Bounce notifications, select the connect button and complete step-up verification.
  2. The system creates a notification URL with a random secret, https://<public URL>/mail/events/<secret>, and connects it the provider’s way:
    • Registered for you: Resend, Amazon SES (through SNS), SendGrid, Postmark, Mailgun, Brevo, Alibaba Cloud DirectMail (through EventBridge).
    • Pulled from a queue: Cloudflare; the system creates a queue at Cloudflare subscribed to the sending events and pulls it every 30 seconds.
    • Pasted by you: Tencent Cloud SES. Copy the callback URL shown and paste it into the callback setting of Tencent Cloud’s console, with bounce, complaint and delivery events. The URL contains a secret: keep it private.
  3. The card shows the connection, when it was made, the last notification, and the bounces, complaints and provider suppressions of the last 30 days.

Bounce notifications connected

  • Each notification is verified the way its provider signs it (Svix, SNS certificates, ECDSA, HMAC, RSA; for providers that do not sign, the secret in the URL plus HTTP authentication). Requests that do not verify are refused.
  • A notification has an effect only when it is about an email the system sent through that provider: the provider’s test notifications and forged requests suppress nothing.
  • Connect again creates a new URL and replaces the earlier registration at the provider; Disconnect clears the connection settings here.

Select Start next to Test email, enter a Test recipient and select Send test email. The test uses the receipt type currently chosen in the preview on the Receipts tab, which is the payment receipt by default, in the console’s current language. Check that it did not land in spam.

With a custom SMTP server there are no provider records, so the Sender domain check card below the steps looks up the sender domain’s DNS records by general rules and suggests fixes.

  1. Leave Sender domain empty to use the domain of the sender address, or enter another domain.
  2. Under DKIM selector, enter the selector your mail server signs with (for example s1). When empty, the saved selector is used.
  3. Select Check.
Record Looked up at What is checked
SPF TXT records of the sender domain A v=spf1 record is published, there is only one, and it ends with -all or ~all
DKIM <selector>._domainkey.<sender domain> A public key is published and is valid
DMARC _dmarc.<sender domain> A v=DMARC1 record is published, there is only one, and it has a p= policy and an rua= reporting address

The suggestions: publish one SPF record that includes your mail server (include:…) and ends with -all (~all suits testing); publish the DKIM public key at <selector>._domainkey.<sender domain>; start DMARC at p=none with rua=, then move to quarantine or reject once the reports look clean. Save on the card stores the DKIM selector and the bounce limit, and requires step-up verification.

The DNS server used for the checks can be set in the server configuration, under [mail] dns_server in config.toml.

A receipt goes to the email address attached to the order or subscription. The address comes from either source:

  • The business system passes customer_email when creating the order or subscription.
  • The payer enters it in the Email (optional) field on the checkout.

Email (optional) field on the checkout, used for the payment receipt

Checkout email field on the Receipts tab decides whether the checkout shows the field:

Option Description
Shown (optional) The checkout shows the email field; the payer may leave it empty
Hidden The checkout does not show the field; receipts go only to an address the business system passed as customer_email

The field appears only while the matching receipt type is on: Payment receipt for payment pages and Subscription started for subscription pages. When an order or subscription has no email address, no receipt is sent. Order webhook events carry customer_email, so that the business system can match them to its users.

The Receipt types card has a switch for each receipt:

Receipt When it is sent Main content
Payment receipt When the order reaches its confirmations. At most one per order Item, amount, token and network, transaction hash, order number, payment time
Refund receipt When a refund is verified on chain Refund amount, order number, network, refund address, refund transaction hash, original payment transaction hash, refund time
Subscription started When a subscription or trial starts; also when a plan change takes effect Plan, amount per period, period, first charge date, allowance cap, how to cancel
Charge successful When each charge is confirmed Period number, amount, transaction hash, next charge date
Charge failed When a charge fails and the subscription enters its grace period Reason for the failure, retry time, guidance
Trial ending soon A number of days before a trial ends, 3 by default; the current number is shown under the switch First charge date and amount, how to cancel
Subscription cancelled / completed When a subscription is cancelled or all its periods are complete Final state, number of periods charged

When a type is switched off, receipts of that type are no longer sent.

The Merchant details (on receipts) card sets the merchant information and links printed on receipts:

Setting Description
Merchant name The same setting as the merchant name under Merchant & checkout
Support email The same setting as the support email under Merchant & checkout
Website The merchant’s website, shown on receipts
Reply-to address Where a payer’s reply to a receipt is sent; the support email when empty
Order page link template Builds the receipt’s View order button. {merchant_order_no} and {order_id} can be used, for example https://shop.example.com/orders/{merchant_order_no}. An order’s metadata.order_url takes precedence when present
Footer note A note shown in the receipt footer, up to 300 characters

Subscription receipts also carry a link for managing the subscription, which takes the payer to their subscriptions page.

After changing receipt types, the email field or merchant details, select Save and complete step-up verification.

  • A receipt is written in the checkout language in use when the payer entered the email address, or otherwise in the order’s language.
  • Receipts for test orders and test subscriptions have “[Test]” prefixed to the subject (“[测试]” in Chinese).

The right side of the Receipts tab is the preview. Choose the receipt type under Preview and the language (简体中文 or English) to see the subject and body. The preview shows the email exactly as it is sent, and it updates when settings are saved.

Rule Description
Bounce Permanently rejected at send time (SMTP 5xx, or refused by the provider’s API), or reported as a hard bounce by the provider once notifications are connected: the email is marked Bounced, not retried, and counts toward the address’s bounces in a row
Soft bounce, delay Noted on the email only; not counted
Complaint The recipient marked an email as spam: mail to the address stops at once
Provider suppression The provider refused to send because the address is on its own suppression list: mail to the address stops here too
Suppression Once an address reaches the limit of bounces in a row, the system stops mailing it. Later emails to it appear as Suppressed in the delivery log
Reset One successful delivery resets the count: with notifications connected, the provider’s delivery report; otherwise the sending service accepting the email
Alert When an address is suppressed, an “Address suppressed after repeated bounces” alert is raised

Bounces before suppression defaults to 3 and can be set from 1 to 20: on the Bounce limit card with a provider, on the Sender domain check card with a custom SMTP server.

The Bounces and suppressed addresses tab lists the addresses that bounced, complained or were suppressed by the provider:

Column Description
Recipient The email address
Status Suppressed with the reason (bounces, complaint, provider suppression) and the time, or Counting (bounces recorded, limit not reached)
Bounces Number of bounces in a row
Last bounce Time of the latest bounce and its error

The list can be searched by email address. Once an address is known to receive mail again, select Lift to resume mailing it; an address the provider suppressed also has to be removed from the provider’s suppression list. Lifting is written to the audit log.

The Delivery log tab lists every email the system produces.

Delivery log: email type, masked recipient, status, attempts and last result

Column Description
Type The kind of email, for example Payment receipt, Ticket confirmation or Ticket reply
Recipient The recipient address, masked (for example a***@example.com). An address that has been suppressed is labelled Address suppressed
Status See the next table. With notifications connected, the provider’s later report (delivered, soft bounce, complaint …) shows under the status
Attempts Number of send attempts so far
Last result The send time when sent; otherwise the latest error, with the time of the next retry while one is pending
Created When the email was produced
Status Meaning
Pending Waiting to be sent or retried
Sent Accepted by the sending service or the provider
Failed Not sent after all retries
Bounced The recipient address was permanently rejected (at send time, or reported later by the provider)
Suppressed The recipient address is suppressed (or the provider refused it for its suppression list); the email was not delivered
  • Status tabs: All statuses, Pending, Sent, Failed, Bounced, Suppressed.
  • Search: by recipient address, entered in full.
  • Filters: email type and date range.
  • An email that fails to send is retried automatically with backoff, at intervals growing from 1 minute to 12 hours, for about a day. After that it is marked Failed.
  • Any email that is not Pending can be queued again with Resend. Resending is written to the audit log.
  • Email addresses are stored encrypted and shown masked in console lists.
  • The finance role always sees email addresses in masked form.
  • For a payer’s request to export or delete the data tied to their email address, see Personal data requests.