https://docs.dlocal.com/docs/india-recurring-payments
- Payment_method_id for this will be 'IR' (India recurring)
- initial recurring setup will be a new API call to 'create a subscription', where we specify the schedule
{ "amount": 0, "currency": "INR", "country": "IN", "payment_method_id": "IR", "payment_method_flow": "REDIRECT", "payer": { "name": "Ram Devi", "email": "ramdevi@example.com", "phone": "+919000123456", "document": "HSECT4378A" }, "wallet": { "save": true, "verify": true, "recurring_info": { "subscription_frequency_unit": "ONDEMAND", "subscription_frequency": 1, "subscription_start_at": "20210101", # note: needs to be current day in India Standard Time (GMT+5:30) "subscription_end_at": "20220101" # mandatory field, but you can set it to very far in the future. It will be shown to the donor. }, "capture": false }, "order_id": "5346523564", "notification_url": "http://merchant.com/notifications", "callback_url": "http://merchant.com/callback" }
- recurring installments will look like the createPayment call, but with a prenotify flag set to true. Indian recurring payment regulations require us to send a charge pre-notification one day ahead of time. We then wait one day for the notification from DLocal telling us the payment came through to record the payment.
{ "amount": 750, "currency": "INR", "country": "IN", "payment_method_id": "IR", "payment_method_flow": "DIRECT", "payer": { "name": "Ram Devi", "email": "ramdevi@example.com", "phone": "+919000123456", "document": "HSECT4378A" }, "wallet": { "token": "W-yu23y4ibnyiu23y4", "recurring_info": { "prenotify": TRUE } }, "order_id": "5346523565", "notification_url": "http://merchant.com/notifications" }
General notes on UPI recurring (move these to another place?)
- limit of 5000 rupees
- Dlocal will send donors to PayTM (Indian payment processor) to make these charges
- Donor can choose in the PayTM site whether to pay with their PayTM wallet (like paying with PayPal balance) or UPI, but both of those will appear the same to us. Note that we can decide whether to offer that choice to donors or to only offer one (UPI is preferred) to streamline the process. Setting up this option has to be coodinated with DLocal and PayTM, so it's not a really quick switch.