Integration question

Good evening,
I was integrating atlos payments in the websites and I need to have recurring payments.
In the documentation the only step about subscriptions does not show the options that the “recurrence” tag can have.

How can I specify a monthly and yearly recurrence (in two different payment buttons).

Thanks
:slight_smile:

Hi enricop,

Please see below:

atlos.RECURRENCE_NONE - one-time payment, no recurrence
atlos.RECURRENCE_DAY - day
atlos.RECURRENCE_WEEK - week
atlos.RECURRENCE_MONTH - month
atlos.RECURRENCE_YEAR - year

The documentation is here:

You can have two payment buttons on the same page with two different
recurrence parameters. Or, you can have only one payment button and a
selector for the recurrence as a separate HTML input element, then use
JavaScript to change the parameter passed to Atlos.

Thank you very much!

Another quick question:
Is there the possibility to add Metadata to a purchase?
For example:
If I’d like to link the user wallet with his email, is there the possibility of doing so directly in the purchase step?

You can pass the user’s email to the widget, and we’ll save it with the transaction data.

For all other metadata, we recommend to store it on your end in a database. Then, generate a unique order number for each purchase and pass it to us in the orderId filed. You will receive the order id in the postback (and can also get it with the Transaction/List API call). Then, you can fetch all metadata from your database with that order number.