The ZRU API allows three types of integrations, each one adapts to different needs, allowing you to model any scenario you want to achieve through the API.
You can see an example of each type of integration in the Our solution section of our website.
Through the ZRU Panel, payment links can also be generated to send to the customer and make payments without using the API.
This would be the simplest integration of all, after a few lines we are already receiving payments.
The flow would be the following:
- The user requests to pay for the order
- The
payment orderis created through the ZRU API (using thepublic and private keyobtained from the ZRU Panel) - The ZRU API returns a response, and using the
tokenincluded in the response, you must create theredirect urlusing this format: https://pay.mychoice2pay.com/TOKEN (TOKEN must replaced by the value oftoken). - The user is taken to the
redirect url, which would be the ZRU payment screen - The user is redirected to a different page, depending on the payment status. In case the payment completed correctly, the user is forwarded to
return_url, already sent when the payment order was created. In case the user cancels the payment, it will return to thecancel_urlalready sent when the payment order was created
*. ZRU will send a notification confirming the payment to the notification_url sent when the payment order was created. Likewise, it will send notifications in case of changes related to the payment, or errors, or in case it is a subscription or authorization, it will notify of each payment received.
It is quite similar to Redirect, the only difference is that the user never leaves your domain because an iframe is used to make the payment.
- The user requests to pay for the order
- The
payment orderis created through the ZRU API (using thepublic and private keyobtained from the ZRU Panel) - The ZRU API returns a response, and using the
tokenincluded in the response, you must create theiframe urlusing this format: https://pay.mychoice2pay.com/TOKEN/iframe (TOKEN must replaced by the value oftoken). - An iframe is created in the user interface with the
iframe urlwith the following parameters:<iframe allowpaymentrequest sandbox="allow-forms allow-popups allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation" src="IFRAME_URL" frameBorder="0" style="width: 100%; height: 700px"></iframe> - The user is redirected to a different page, depending on the payment status. In case the payment completed correctly, the user is forwarded to
return_url, already sent when the payment order was created. In case the user cancels the payment, it will return to thecancel_urlalready sent when the payment order was created
*. ZRU will send a notification confirming the payment to the notification_url sent when the payment order was created. Likewise, it will send notifications in case of changes related to the payment, or errors, or in case it is a subscription or authorization, it will notify of each payment received.
This way of integrating ZRU allows everything to be done in your domain and you can customize every detail of the user experience when paying.
- The user requests to pay for the order
- The
payment orderis created through the ZRU API (using thepublic and private keyobtained from the ZRU Panel) - The ZRU API returns a response, among the data it returns will be the
tokenthat we will use in the rest of the steps. - The
tokenis sent to the user interface. - The payment methods available for that payment order are requested through the ZRU API, using the
tokenand thepublic key. - The ZRU API returns the information about the payment methods and their types.
- Based on the type of gateway, two things can happen: a. In the case of
card gateways, the card information will be sent to the ZRU API.
b. In the case of form gateways, the user must be sent to the url https://pay.mychoice2pay.com/<token>/redirect/<gateway_code>. The user will be redirected to the gateway to finalize the payment.
- The answer depends on the way used between
7.aand7.b. a. The ZRU API responds with the confirmation or not of the payment. If it is affirmative, the payment is completed.
b. The user returns to the return_url sent when the payment order was created in case the payment completes correctly, in case the user cancels the payment, it will return to the cancel_url sent when the payment order was created.
*. ZRU will send a notification confirming the payment to the notification_url sent when the payment order was created. Likewise, it will send notifications in case of changes related to the payment, or errors, or in case it is a subscription or authorization, it will notify of each payment received.