Email Customization Endpoint

For agencies set to the external email template, Tulus calls your endpoint just before sending each payment receipt email. Your endpoint can change the email's text, subject and sender, and attach files such as a PDF receipt.

A working sample lives at /customemail/endpoint.php (add ?attach=1 for a generated PDF). When your endpoint passes the test below, ask Tulus support to set it as your agency's email customization URL.

Test an endpoint

Test from the command line

curl -s https://developers.tulus.my/customemail/endpoint.php \
  --data-urlencode 'data={"Subject":"Payment Notification"}' \
  --data-urlencode 'fpx={"agency":"SNAPNPAY","fpx_debit_auth_code":"00"}'

Tulus staff can run the real Go code path against any endpoint, without a database:

snapnpay-server2 testemail --customize-url 'https://developers.tulus.my/customemail/endpoint.php?attach=1'