INXY payments
Registration
After registering in the service https://auth.inxy.io/ go to the Payment gateway API menu and fill in the following information:
Wallet name and description, icon.
The link to the website is placed at your request.
All accepted types of cryptocurrencies should be ticked and click Save Changes


After saving, a communication data field will open.
Next, generate an API key by clicking Generate(1) and enter the code sent to your email.
The received variable should be stored in a secure location. Also copy the Secret Key there.
The keys, in case of loss, can be regenerated (if this happens, do not forget to change the data in the project).
In the Postback Url (2) field, specify the url for webhooks https://chatter.salebot.pro/inxy_callback/result

Connection settings
Then go to Mavibot → "Acquiring" section → INXY and click connect. Enter the received API and Secret keys into the fields.


Generating a payment link
To generate a payment link, you need to set the value of the payment_sum variable (for example, 1). After that, the inxy_pay_url variable will appear. This variable can be displayed with a link or placed in the "Pay" button.
PAY ATTENTION!!! The system works with dollars! The specified amount in payment_sum will be accepted by INXY payment system as dollars.
The link looks like: https://pay.inxy.io/sessions/umLf9cJWBRiaNwowGCE1
Also, before setting the value of the payment_sum variable, you can set the following optional variables for setting up the payment: inxy_currency - the cryptocurrency in which the payment will be made.
You can specify one of the possible cryptocurrencies that you ticked when creating the API key. If you leave it blank, then the payer will choose the cryptocurrency from those that have been marked..
Available values: 'BTC', 'ETH', 'LTC', 'DOGE', 'USDT', 'USDC', 'DAI'

inxy_description – payment description

Pay attention! First, additional variables are set for settings, then payment_sum.
Variables can be set earlier in the chain, rather than all in one block. And inxy_pay_url variable, which contains the link, should be displayed in the right place. When you click on it, a payment form will open.

Pay attention! The total amount line contains a dollar value equal to payment_sum. Below in total crypto amount - is the value in the selected cryptocurrency. It changes frequently depending on the current exchange rate. This is the value that the client need to pay you from his wallet.

Pay attention!!! The wallet address for payment, within one session, is reserved for the client for only 2 hours. Recommend the client that he/she makes sure that the time has not expired and that the wallet address is current at the time of payment. If the session time is over, then you need to restart the payment process.
Payment result processing (payment callback)
After a successful payment, a callback will be sent to the bot, which will let you know that the payment was successful. You see this callback in the system as a message from the user, so that the user cannot send them. This callback is NOT SEEN by the user himself, it is displayed only to the operator. INXY has several types of callbacks:
Successful callbacks consist of the first 10 characters of the token and the success postscript, for example: uc8zsjNN1x_success

This callback is received if the client has fully paid the sum and there are no problems with the payment. Along with this callback, inxy_payment_completed variable will be added to the project variables, which is set to True. And also inxy_payment_status variable will take the value paid.
The inxy_payment_status variable can change its value throughout the entire payment processing period. After the user opens the form, it will take the waiting_payment status, then during the processing of his payment it will take the waiting_confirmation value, and after successful processing it will have the paid or partially_paid value.
When processing a callback, the comparison type should be "Exact Match".
For example, you can process a successful payment in a conditional block and display the corresponding message to the user:

2. There are cases when the crypto exchange rate has changed or the wallet has withdrawn a commission from the operation, as a result of which an incomplete amount is credited to your account. In this case, the inxy_payment_status variable will take the partially_paid value and a callback will be sent to the system.

In this case, you will need to send a notification to the client requesting an additional payment.
For example, you can set a condition for the callback start and, after getting it, send the already generated url with a payment link to the client again, or set a condition that the block is triggered when the inxy_payment_status variable is equal to partially_paid.

Please note that the payment link is only valid for 2 hours! If the client does not have time to pay for the remaining part, he/she can't no longer open it. Since INXY will already process the first incomplete payment at this stage, the money will not be refunded to the client. To return them, you will need to go to your INXY personal account and perform a refund operation.
Creating Subscription
Subscriptions can be created in the INXY system. To do this, assign any value to the inxy_subscription_payment variable, and then a monthly subscription will be created.
If you want to specify a different period, use the following variables: inxy_subscription_interval equal to ‘day' - sets the interval equal to days (by default, it is a month) inxy_subscription_period - specify a variable from 1 to 30 to set the frequency.
For example, to create a subscription charge once every 15 days, you need to set inxy_subscription_interval =’day’ and inxy_subscription_period=15,and to have the payment charged every six months, you just need to specify inxy_subscription_period=6 (since inxy_subscription_interval is a month by default)

When following the link, the user will see the same payment page, but with a few differences: first, there will be a note on the side indicating that the payment is part of a subscription with the specified frequency; and second, the payment page will offer the customer the option to pay two or three sums in advance.
Features of the INXY payment system: If the customer pays x2 or x3 of the sum, Mavibot will receive a notification about the payment for only one of them. The remaing sum will be sent to the client's balance, from where the sum will be withdrawn in subsequent debits. Since the cryptocurrency exchange rate is constantly changing, as a result, this sum may not be enough for subsequent debit, which will lead to a situation with an incompletely paid subscription. In this case, you will receive “fail” callback and you can set up reminder to the client.
There can be no partial payment according to the schedule. The balance is checked before the payment, and if the balance isn't enough, the money will not be debited from the client's account.

After successful subscription, the inxy_subscription_id variable will appear in the client variables, indicating the subscription number and inxy_subscription_status with its status.

Canceling subscription
To cancel your subscription, use the function inxy_remove_subscription(inxy_subscription_id). Insert the inxy_subscription_id subscription ID into the function, and the subscription will be canceled.

In case of success, you will receive a callback ‘Subscription status inxy_subscription_id - deleted’ and the inxy_subscription_status variable will change to the appropriate value.

Last updated