Callbacks

A callback is an optional POST HTTP request that amwal.exchange makes against your project's callback URL each time a payment was confirmed.


As soon as we secure the funds, we will mark the invoice as PAID on our end. If allowed in your project's settings, we will make a POST request against the provided URL with the following:


interface IAmwalExchangeCallBack { invoiceId: string; // amwal.exchange invoice ID paymentSessionId: string; // amwal.exchange payment session ID secret: string; // amwal.exchange unique private code } 


Callback payload example:


{ invoiceId: '65448ddef4924a5dd1b241a9', paymentSessionId: '6545360496c8b48eeab3837e', secret: '0927f7cc-98a7-4b67-a8b5-254fe46227dd', } 


Callbacks are highly recommended to automate the delivery process on your end. You can enable/disable the callbacks in your project's settings page as well.


Your endpoint should return HTTP code 200

It is your responsibility to provide us with a fully working callback URL.

All callback attempts (SUCCESS and FAILS) are logged in your accounts corresponding page.


We retry failed requests up to 30 times

over 3 day before we give up on a given payment confirmation.


All failed attempt will be followed by an E-mail

about the incident so you can track down the invoice in the system and do it right for your customer. You can enable/disable this per project.


Logs

All paid invoices are listed in your account's corresponding section.

All callbacks are logged as well.


Keep the secret

secret is used to link amwal.exchange invoices to your project invoices.

it is your duty to capture this code on the invoice creation stage and assign it to your customer's shopping card or the delivery session.