#Estela
1 messages · Page 1 of 1 (latest)
Hi there
Yep you can create Invoices on a Connected Account.
You would follow the normal process for creating an Invoice but use the Stripe Account Header. See: https://stripe.com/docs/connect/authentication
I'm checking, I tell you now
With this header, can I generate two same invoices for one payment or just one?
Do you mean actually generating an Invoice from the Checkout Session?
Or creating Invoices separately
from the Checkout Session
Okay then yeah only one Invoice related to the Checkout Session
You can create another Invoice separately and just "mark it as paid"
When I create the checkout session I save the Payment Intent id, could I generate multiple invoices with it or refer to it in some way when creating a new invoice?
That will create an Invoice related to the Checkout Session and the PaymentIntent for that Checkout Session
But you can't refer back to that same PaymentIntent for a second Invoice
Understood
I think that with that link I answer my other question. Is there a way to edit the invoice that is generated? Such as adding a text in the body of the document.
No you can't edit a finalized Invoice
before finalizing, in the checkout session
Map<String, Object> inv = new HashMap<>();
inv.put("enabled", true);
// CREATE ORDER
String transferGroupId = TRANSFRER_GROUP + order.getId();
SessionCreateParams params = SessionCreateParams
.builder()
.setMode(SessionCreateParams.Mode.PAYMENT)
.addAllLineItem(lineItemsList)
.setAutomaticTax(
SessionCreateParams.AutomaticTax.builder()
.setEnabled(true)
.build())
.setSuccessUrl(DOMAIN + URL_PAYMENT_CONFIRM + "?session_id={CHECKOUT_SESSION_ID}")
.setCancelUrl(DOMAIN + URL_PAYMENT_CONFIRM)
.setPaymentIntentData(
SessionCreateParams.PaymentIntentData.builder().setTransferGroup(transferGroupId).build())
.putExtraParam("invoice_creation", inv)
.build();
No an Invoice is only generated via Checkout after the Session is completed
If you look at the link you provided above you will see it says:
Generate a post-purchase Invoice for one-time payments.
I see... I'm going to try to generate invoices as a connected account and I'll try to see how to fit our business logic
Sounds good. Let me know if I can help any further