Skip to content
Sign in
An image of the Stripe logo
/
Create account
Sign in
Home
Payments
Finance automation
Banking as a service
Developer tools
No-code
All products
Home
Payments
Finance automation
Home
Payments
Finance automation
Banking as a service
Developer tools
Overview
Billing
    Overview
    Subscriptions
    Invoicing
      How invoicing works
      No-code quickstart guide
      Payment methods for invoices
      Customers
      Products and prices
      Taxes
      Use the Dashboard
      Integrate with the API
      Customize invoices
      Edit invoices
      Send customer emails
      Hosted Invoice Page
      Invoicing and Connect
      Create Invoice Payment Plans
      Automated collections
      Global invoicing
        Set up invoices in Europe
        Set up invoices in Japan
        Multi-currency customers
        India e-Mandates
        Customize the IBAN country
    Quotes
    Collection methods
    Revenue recovery
    Manage recurring revenue
    Products and prices
    Customer management
    About the Billing APIs
    Test your integration
    Strong Customer Authentication (SCA)
    Invoices API updates
Tax
Reporting
Data
Startup incorporation
HomeFinance automationBillingInvoicingGlobal invoicing

Integrate India e-mandates

Learn how to integrate India e-mandates with Stripe Invoicing.

India recurring payments

For a deeper dive on India recurring payments, see our comprehensive guide.

This guide provides an overview of how to generate and use India e-mandates with Stripe Invoicing for one-time payments. Currently, you can only integrate with India e-mandates through the API.

We use the term off-session to describe payments that occur without the customer’s direct involvement. These types of payments use previously collected customer payment information. In contrast, on-session payments occur when a customer is directly involved in making a payment. This can be either through the user-interface or to complete a two-factor authentication flow like 3D Secure (3DS).

Generate a mandate

To generate a mandate, while your customer is signed in, make a call to create a SetupIntent that includes the payment method ID and mandate details.

Note

When you submit a request to create a SetupIntent, the start date must be a timestamp and within 1 day of today.

Command Line
curl https://api.stripe.com/v1/setup_intents \ -u "
sk_test_4eC39HqLyjWDarjtT1zdp7dc
:"
\ -d customer={{CUSTOMER_ID}} \ -d "payment_method_types[]"=card \ -d "payment_method_options[card][mandate_options][reference]"={{REFRENCE}} \ -d "payment_method_options[card][mandate_options][description]"={{DESCRIPTION}} \ -d "payment_method_options[card][mandate_options][amount]"=2000 \ -d "payment_method_options[card][mandate_options][currency]"=inr \ -d "payment_method_options[card][mandate_options][amount_type]"=fixed \ -d "payment_method_options[card][mandate_options][start_date]"=1672549767 \ -d "payment_method_options[card][mandate_options][end_date]"=1685592567 \ -d "payment_method_options[card][mandate_options][interval]"=month \ -d "payment_method_options[card][mandate_options][interval_count]"=1

After creating the SetupIntent, use the Payment Element to collect the customer’s payment details and set up future payments. Use stripe.confirmSetup to complete the setup using details collected by the Payment Element.

stripe.confirmSetup({ elements, confirmParams: { // Return URL where the customer should be redirected after the SetupIntent is confirmed. return_url: 'https://example.com', }, }) .then(function(result) { if (result.error) { // Inform the customer that there was an error. } });

Confirming the SetupIntent transitions it to requires_action state, along with the next_action property describing what action needs to be taken for completing the payment.

{ "payment_method_options": { "card" : { "mandate_options" : { "reference" : "{{REFRENCE}}", "description" : "{{DESCRIPTION}}", "amount" : "{{AMOUNT}}", "currency" : "inr", "type" : "{{AMOUNT_TYPE}}", "start_date" : "{{START_DATE}}", "end_date" : "{{END_DATE}}", "interval" : "{{INTERVAL}}", "interval_count" : "{{INTERVAL_COUNT}}" } } }, "status": "requires_action", "next_action": { "type": "use_stripe_sdk", "use_stripe_sdk": { "type": "three_d_secure_redirect", "stripe_js": "https://hooks.stripe.com/redirect/authenticate/src_xxxxxxxxxxx", "source": "src_xxxxxxxx" } }, // Other existing SetupIntent params }

Upon successful completion of AFA (3DS) by the cardholder, the SetupIntent transitions to a succeeded state and Stripe creates a mandate. The mandate is available on the SetupIntent object.

{ "mandate": "{{MANDATE_ID}}", "payment_method_options": { "card" : { "mandate_options" : { "reference" : "{{REFRENCE}}", "description" : "{{DESCRIPTION}}", "amount" : "{{AMOUNT}}", "currency" : "inr", "type" : "{{AMOUNT_TYPE}}", "start_date" : "{{START_DATE}}", "end_date" : "{{END_DATE}}", "interval" : "{{INTERVAL}}", "interval_count" : "{{INTERVAL_COUNT}}" } } }, status: "succeeded", // Other existing SetupIntent params }

Note

You can pass the payment_method_options[card][mandate_options] parameter for all subscription registrations requests. Stripe ignores these parameters if your customer is using a non-Indian card for their subscription as the regulation doesn’t apply to them.

Use a mandate to create an invoice

When you create an invoice, you can set the default mandate for any of the invoice’s off-session payments. When you use default mandates, we recommend that you set the corresponding payment method and the default_payment_method:

Command Line
# Request to create an Invoice with a default mandate curl https://api.stripe.com/v1/invoices \ -u sk_test_123: \ -d customer=cus_xyz \ -d default_payment_method=pm_xxx \ -d payment_settings[default_mandate]=mandate_xyz

Eventually, this invoice might attempt an off-session charge of the payment method. This is because you’ve either configured the invoice to automatically advance, have manually advanced it using the Invoice Pay endpoint, or confirmed the invoice’s payment intent. If the invoice attempts to charge your customer, the default_mandate and default_payment_method parameters work together to pay the invoice off-session.

As long as the mandate remains active—and the charge falls within the mandate’s initial parameters in terms of the amount and frequency—the charge is successfully processed. It’s also possible to set the default_mandate and default_payment_method parameters on the invoice using the Invoice Update endpoint.

Use a mandate to charge an invoice

If you don’t want to set the mandate on the invoice during creation (for example, you haven’t collected the mandate), you can provide it at two later points during the mandate life cycle. The route you take depends on how you set up your existing invoicing integration.

Alternatively, if you’re using the Invoice Pay endpoint, you can provide the mandate as a top-level mandate parameter. As with setting the default mandate, explicitly provide the payment method you want to use with the mandate:

Command Line
# Request to attempt payment on an open invoice with a mandate curl https://api.stripe.com/v1/invoices/in_aaa/pay \ -u sk_test_123: \ -d payment_method=pm_xxx \ -d mandate=mandate_xyz

Similarly, you can use the mandate to confirm the payment intent associated with the invoice:

Command Line
# Request to retrieve the invoice's PaymentIntent ID curl https://api.stripe.com/v1/invoices/in_aaa \ -u sk_test_123: # Response to GET /v1/invoices/in_aaa { "id": "in_abc789", "status": "open", "payment_intent": "pi_zyx", # ... more fields } # Request to attempt invoice payment with a mandate by confirming the payment intent curl https://api.stripe.com/v1/payment_intents/pi_zyc012/confirm \ -u sk_test_123: \ -d mandate=mandate_xyz

Notification and waiting period

Before the charge finally goes through, customers receive a notification that informs them of the charge. Customers are also given the chance to modify or cancel the mandate. After 26 hours pass, the amount is charged to the customer’s card and the invoice is moved into a paid state.

See also

  • India recurring payments
  • Invoicing API
  • How Invoicing works
Was this page helpful?
Need help? Contact Support.
Watch our developer tutorials.
Check out our product changelog.
Questions? Contact Sales.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Generate a mandate
Use a mandate to create an invoice
Use a mandate to charge an invoice
Notification and waiting period
See also
Products Used
Invoicing
Payments
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$