1
votes

I am using a testing card 4242424242424242. I do not have its setting enabled - "Enable 3D Secure"

EDIT

Subcription Request Object

AddInvoiceItems: null
ApplicationFeePercent: null
BackdateStartDate: null
BillingCycleAnchor: null
BillingThresholds: null
CancelAt: null
CancelAtPeriodEnd: null
CollectionMethod: null
Coupon: null
Customer: "cus_IBn......."
DaysUntilDue: null
DefaultPaymentMethod: null
DefaultSource: null
DefaultTaxRates: null
Expand: null
ExtraParams: Count = 0
Items: Count = 1
Metadata: null
OffSession: null
PaymentBehavior: null
PendingInvoiceItemInterval: null
Plan: null
Prorate: false
ProrationBehavior: null
Quantity: null
TaxPercent: null
TransferData: null
TrialEnd: null
TrialFromPlan: null
TrialPeriodDays: null

Below is subscription object which I get as response after create subscription. if this helps

{ "id": "sub_absc....", "object": "subscription", "application_fee_percent": null, "billing_cycle_anchor": 1602504785, "billing_thresholds": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "collection_method": "charge_automatically", "created": 1602504785, "current_period_end": 1605183185, "current_period_start": 1602504785, "customer": "cus_IBn....", "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [], "discount": null, "ended_at": null, "items": { "object": "list", "data": [ { "id": "si_IBn...", "object": "subscription_item", "billing_thresholds": null, "created": 1602504786, "metadata": {}, "plan": { "id": "price_1HZu....", "object": "plan", "active": true, "aggregate_usage": null, "amount": 1500, "amount_decimal": 1500.0, "billing_scheme": "per_unit", "created": 1602146656, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_IAF....", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "price": { "id": "price_1HZ.....", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1602146656, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_IAFD1.....", "recurring": { "aggregate_usage": null, "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tiers": null, "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 1500, "unit_amount_decimal": 1500.0 }, "quantity": 1, "subscription": "sub_IBnU........", "tax_rates": [] } ], "has_more": false, "url": "/v1/subscription_items?subscription=sub_IBn...." }, "latest_invoice": "in_1Hb.........", "livemode": false, "metadata": {}, "next_pending_invoice_item_invoice": null, "pause_collection": null, "pending_invoice_item_interval": null, "pending_setup_intent": null, "pending_update": null, "plan": { "id": "price_1HZu........", "object": "plan", "active": true, "aggregate_usage": null, "amount": 1500, "amount_decimal": 1500.0, "billing_scheme": "per_unit", "created": 1602146656, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "nickname": null, "product": "prod_IAFD1k.......", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "quantity": 1, "schedule": null, "start_date": 1602504785, "status": "incomplete", "tax_percent": null, "transfer_data": null, "trial_end": null, "trial_start": null }

1
The subscription will be incomplete if the initial payment failed or required authentication. What is the value of subscription.latest_invoice.payment_intent.status , or the PaymentIntent's last_payment_error ? That should give a hint to why the payment failed and the subscription is incomplete.karllekko
subscription.latest_invoice is having the incoice Id and there is no payment_intentIshika Jain
The invoice and its PaymentIntent needs to be expanded or retrieved from the API, by default it's just an ID. It's described a bit at stripe.com/docs/billing/subscriptions/… and the examples show subscriptionOptions.AddExpand("latest_invoice.payment_intent"); for example for that reason.karllekko
Thanks, it helpedIshika Jain

1 Answers

0
votes

As @karllekko The invoice and its PaymentIntent needs to be expanded or retrieved from the API, by default it's just an ID. It's described a bit at stripe.com/docs/billing/subscriptions/… and the examples show subscriptionOptions.AddExpand("latest_invoice.payment_intent"); for example for that reason.

I am able to see the error and error was

Non-INR transactions in India should have a shipping/billing address outside India. More info here: https://stripe.com/docs/india-exports

I was using a dummy address for user since it is mandatory as per Indian gov.