#dorian6730_best-practices

1 messages ¡ Page 1 of 1 (latest)

crude barnBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1278119421923295413

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

nova sluice
#

Hi there!

marble drift
#

HEY HEY!

nova sluice
#

PaymentIntents are more of a "low level" object type, so it's only possible to pass an amount, not price or quantity like you would with a Subscription or Invoice

marble drift
#

Ah ok

#

So in the case where it isnt a subscription, and I want items (price and quantity) to appear on the receipt, do I instead need to create an invoice and if so, can the invoice be immediately charged to a payment method that I pass in and will I get an immediate success/failure response (in the case of card)?

nova sluice
marble drift
#

I'd like to display indiovidual line items (I already do this for subscriptions)

nova sluice
#

Actually, the description value will propagate to the Charge object, and this is what's used for the receipt

#

Ah, I see

marble drift
#

Can I create a one-time invoice that is immediately charged and pass in prices and quantities?

nova sluice
#

You could if you're creating an Invoice for an existing Customer where that Customer already has a saved PaymentMethod

marble drift
#

Yes I will have both customer and payment method already

nova sluice
#

Another option could be to build out these receipts on your end altogether. That would give you more control overall but would require more dev resources

marble drift
#

Right ok thanks. I might actually try the description on the payment intent first, that will be the leasrt work for me. If that doesnt work, I'll try the invoice.

#

Thanks for your help!