Stripe Subscription Integration not Working

Hi, Can someone help me understand how to get the Stripe Subscription integration working. I keep trying but always I get the same error shown below.

Traceback (most recent call last):
  File "apps/erpnext/erpnext/erpnext_integrations/stripe_integration.py", line 46, in create_subscription_on_stripe
    subscription = stripe.Subscription.create(customer=customer, items=items)
  File "env/lib/python3.8/site-packages/stripe/api_resources/abstract/createable_api_resource.py", line 22, in create
    response, api_key = requestor.request("post", url, params, headers)
  File "env/lib/python3.8/site-packages/stripe/api_requestor.py", line 122, in request
    resp = self.interpret_response(rbody, rcode, rheaders)
  File "env/lib/python3.8/site-packages/stripe/api_requestor.py", line 373, in interpret_response
    self.handle_error_response(rbody, rcode, resp.data, rheaders)
  File "env/lib/python3.8/site-packages/stripe/api_requestor.py", line 152, in handle_error_response
    raise err
stripe.error.InvalidRequestError: Request req_FSxscADVsD916W: You must pass one of plan, price, or price_data.

P.S. The integration for “normal” payments is working perfectly. Each payment made through ERPNext Payment Request is recorded on my Stripe and customers are being created automatically.

1 Like

You need to create the item in stripe first, then add the ID to Product Price ID in your Suscription Plan

You might be interested in our Stripe integration which supports frappe AutoRepeat for subscriptions. It may mean you can manage your subscriptions within ERPNext instead of on Stripe.