Subscriptions with authorized payment
Subscriptions with authorized payment allow an installment to be generated and billed based on a defined recurrence, causing the subscription engine to automatically schedule and create payments based on the payment method defined at the time of the subscription creation.
To offer subscriptions without an associated plan and with authorized payment, send a POST with the necessary attributes to the /preapproval endpoint and pay attention to the status
parameter, which must be filled in with the value authorized
. If you prefer, use the curl below.
curl -X POST \
'https://api.mercadopago.com/preapproval'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TEST-2151****' \
-H 'X-scope: stage' \
--data-raw '{
"back_url": "https://www.google.com",
"reason": "Test Subscription",
"auto_recurring": {
"frequency": 1,
"frequency_type": "months",
"start_date": "2020-06-02T13:07:14.260Z",
"end_date": "2022-07-20T15:59:52.581Z",
"transaction_amount": 10,
"currency_id": "ARS"
},
"payer_email": "test_user+1020927396@testuser.com",
"card_token_id": "{{CARD_TOKEN}}",
"status": "authorized"
}'
Collection reattempt logic
By automating the recurrence of your collections, authorized payments that will have a debit date configured based on the periodicity that was defined in the subscription are created. The first installment is charged after approximately one hour since the subscription.
Payment statuses
In the case that the installment cannot be collected on the fourth reattempt, it will automatically remain in processed
status, associated with a declined payment.
After 3 installments with rejected payments, the subscription is automatically canceled and the seller account will be notified of the cancellation of the subscription by e-mail.