Indian Recurring Payments

This is in regard to Important updates to RBI regulations on recurring card payments in India

It only applies to customers located in India. Two changes need to be made for customers in India. One is to set all new subscriptions created to "Send Invoice" instead of "Charge Automatically" and to set the days until due option. The second change is to update existing subscriptions for Indian customers.

Options for new subscribers

Set the "Days Until Due" option in the Checkout Form settings in the Billflow Dashboard. Billflow will automatically set the subscription payment to be via send invoice instead of charge automatically for customers located in India.

Script for existing subscribers

You will need to update existing subscriptions for Indian customers. You can do this from the dashboard by changing the payment option from automatically charge to send invoice. If you have many customers, you can run the script we have provided below. You can set 'days_until_due' to a value you need.

async function main() {
    const stripe = require("stripe")("your_stripe_secret_key")
    for await (let subscription of stripe.subscriptions.list({ expand: ["data.default_source", "data.default_payment_method", "data.customer.default_source"] })) {
        if ((subscription.default_source && subscription.default_source.country == "IN")
            || (subscription.default_payment_method && subscription.default_payment_method.card && subscription.default_payment_method.card.country == "IN")
            || (subscription.customer.default_source && subscription.customer.default_source.country == "IN")) {
            console.log("FOUND AN INDIAN CUSTOMER, moving to send_invoice instead of charge_automatically", subscription.customer.id);
            stripe.subscriptions.update(subscription.id, {
                collection_method: "send_invoice",
                days_until_due: 20
            })
        }
    }
}
main()

Last updated