#nobody4322

1 messages · Page 1 of 1 (latest)

ionic dockBOT
old igloo
#

Hi, let me help you with this.

#

What do you mean exactly?
What will you charge then?

tender ocean
#

invoice_item = stripe.InvoiceItem.create(
customer=customer.id,
price=plan.plan_id,
currency='usd',
quantity=len(location_ids),
description="Directory Sync",
)

    invoice = stripe.Invoice.create(
        customer=customer.id,
        auto_advance=False,
        # discounts=[{"coupon": "coup77"}],
        metadata={
            'plan_id': plan.plan_id,
            'quantity': len(location_ids),
            'type': 'directory_sync',
            'reason': 'one_time'
        },
    )

invoice.pay()

i have a scenario in which i don't need to use attached card with customer instead i want to use card entered at run time.
is there any way i can send the payment method detail while charging one time invoice.

old igloo
#

Yes, you can finalize the Invoice, take it's PaymentIntent's client_secret, and use it for payment.

tender ocean
old igloo
#

Yes