Invoice Link
Send the link, get the payment!
Introduction
In this type of integration, we are providing a simple straightforward SendPayment endpoint. It will allow you to generate an invoice link that can be sent by any channel we support.
This will facilitate your collection if you have non-store platforms and would like to introduce a niche to your business. You can decide how are you going to send the payment link either by SMS, email, redirect the customer to the invoice link, or use all of them.
This is so helpful in many business cases, let's explain an example of such cases that can utilize this integration. In a rent collection case, all you need is to give your customers an invoice link to pay the due rent at their convenience. This simply can be achieved with this type of integration, based on the due dates of the collection, and within your application, you can call this endpoint and send all information and the amount you need to collect, then MyFatoorah will send this payment link via the provided channel. The thing here is that you are giving time to your customers to pay once they can.
How it Works
The SendPayment endpoint requires three mandatory parameters: (NotificationOption, CustomerName, InvoiceValue).
You need to set the NotificationOption parameter as described below:
- EML send the invoice link by email only. You should provide the CustomerEmail parameter as well.
- SMS send the invoice link by SMS only. You should provide the CustomerMobile and MobileCountryCode as well.
- LNK returns only the invoice URL through the response.
- ALL send the invoice link by both email and SMS, also the invoice link will be in the response body. You have to provide all the needed parameters.
Payment Status
To update your system automatically instead of manually following up with your customers via your portal account, you can use the Webhook feature or/and set the CallBackURL/ErrorUrl parameter, that MyFatoorah will invoke once the payment is done.
If you choose to set the CallBackURL/ErrorUrl parameter, MyFatoorah initiates a call to this URL once a transaction is done against a certain invoice. In addition, MyFatoorah provides a PaymentId as a query string parameter in the URL. The call is something like:
http://www.domain.com/myurl?paymentId=100201923790872553
Then, you have to call the GetPaymentStatus endpoint and pass the PaymentId to it, this will give you full information about the invoice and the transaction. This is a very important step and a good practice to ensure the payment response is returned from MyFatoorah's end and is verified for more secure connectivity. You will find full details on how to implement the GetPaymentStatus endpoint in the Payment Inquiry section.
Hint
The CallBackURL /ErrorUrl parameters are optional. If you omit them, the customers will be redirected to MyFatoorah invoice page after payment.
Updated 11 months ago