logo
English
English
API ReferenceSign In

Notification and Callback

Last updated 09/23/2019

Email Notifications

If you choose "send invoice to this email" during the invoice creation, your customer will receive an email when:

  1. Invoice is created
  2. Invoice is paid
  3. Invoice is Expired

Invoice created e-mail notification example

As a merchant, you can also choose to receive an email notification for a paid and expired invoice. If you decided to do so, you can contact us and we will enable it for you.

Callback URL

Currently we can give two type of callbacks, they are:

  1. Paid Callback Callback that is given when your customer pay the created invoice
  2. Expired/Failure Callback Callback that is given when your customer do not pay the invoice until the expired time

Please ensure that the callback URLs for Invoices has been set. You can configure the callback URL in your Dashboard > Settings > Configuration > Invoice. Below is an example of where to set up callback URL for Invoice:

Callback setting on Xendit dashboard

Callback URL needs to be a HTTPS with SSL (Standard Socket Layer), which is our standard security protocol test. Callback will work if the callback URL you put is in the right format. Below is the example how to implement callback from your side:

<?php if ($_SERVER["REQUEST_METHOD"] === "POST") { $data = file_get_contents("php://input"); print_r("\n\$data contains the updated invoice data \n\n"); print_r($data); print_r("\n\nUpdate your database with the invoice status \n\n"); } else { print_r("Cannot ".$_SERVER["REQUEST_METHOD"]." ".$_SERVER["SCRIPT_NAME"]); } ?>
Was this page helpful?
Yes No