#Sanjeev Sundaravarathan

1 messages · Page 1 of 1 (latest)

exotic coyoteBOT
twin idol
#

Hi
that means you are passing a customerId that doesn't exist. Or there is no pending invoicesItems for the customer

humble ledge
#

Hi Sorry, I am writing like this,

creating a subscription first, we have an use case where to create we need to create a manual invoice and customer can pay for that invoice

#

so when I try to call stripe.Invoice.create, getting this error

stripe.error.InvalidRequestError: Request req_oGlsMaItsDuh01: Nothing to invoice for customer

twin idol
#

If you want to create an empty invoice try passing collection_method: 'send_invoice',

humble ledge
#

sure, will try that

twin idol
exotic coyoteBOT
humble ledge
#

sorry should I create invoice first and then invoice items or create invoice with the items ?

glacial forum
#

Hi, I'm taking over my colleague. Please let me catch up

#

You should create invoice first, and then create items.

humble ledge
#

I am trying to create invoice like this

stripe.error.InvalidRequestError: Request req_wDWr6fhKqDVblz: Nothing to invoice for customer

glacial forum
#

Try creating items on the customer first then.

humble ledge
#

Hey, I tried like this and getting this error

stripe.error.InvalidRequestError: Request req_yx0dXuuwLfRRHz: You cannot update subscriptions with multiple plans using the deprecated /v1/customers/* endpoints. Instead, please use the /v1/customers/* endpoints to manage customers and use the /v1/subscriptions/* endpoints to manage subscriptions.

#

just to show what i do exactly

#

account_id = subscription.payment_instrument.payment_method.company_processor.data["account_id"]extra = {"stripe_account": account_id}stripe_subscription_id = subscription.processor_subscription_data["subscription_id"]stripe_subscription = stripe.Subscription.retrieve(stripe_subscription_id, **extra)

created subscription and retrieve it

stripe.Customer.modify( stripe_subscription.customer, email="test@splink.io", items=[ { "id": item.id, 'price_data': { "unit_amount": 19255, "currency": "eur", "product": item.plan.product, "recurring": { "interval": "day", } } } ], **extra)

creating customer

then trying to create manual invoice and pay from customer side

glacial forum
humble ledge
#

no sorry, i need use the manuall invoicing, so customer will have subscriptions going on and in between we need create a invoice to which they can pay as well

glacial forum
#

In any case, the way you do this step currently is not correct, so you'll need to fix it before moving on.

humble ledge
#

so I created a subscriptions. then for creating new invoice, is there way i can manually create one and make payment to it?

glacial forum
humble ledge
#

I followed that docs and created a new invoice but still getting stripe.error.InvalidRequestError: Request req_ibjJewuTdLCSXS: Nothing to invoice for customer

twin idol
#

You are using this API version 2020-08-27, try creating an invoice item first to the customer and then create an Invoice