#lokis

1 messages ยท Page 1 of 1 (latest)

crude mortarBOT
pastel yew
#

If the payment method has been created, following steps can be performed:

  1. set the payment method ID in default_payment_method of invoice creation request: https://stripe.com/docs/api/invoices/create#create_invoice-default_payment_method and set collection_method to 'charge_automatically'
  2. finalise the invoice after adding the invoice items: https://stripe.com/docs/api/invoices/finalize
  3. pay the invoice: https://stripe.com/docs/api/invoices/pay
royal apex
#

Thanks. It's unclear from the docs what finalising an invoice item means. Is this step needed, or can we directly call invoices.pay after adding the invoice items?

pastel yew
#

Ah right! Finalising invoice is not necessary. The invoice will be moved to finalised and charged to the payment method with invoices.pay

royal apex
#

Great. Will invoices.pay return an error if the payment fails?

pastel yew
#

Yup, it will return error

royal apex
#

๐Ÿ‘ . Can you please point me to the docs on what the response would look like?

pastel yew