#Adarsh
1 messages · Page 1 of 1 (latest)
Hi
Can you please share an Invoice Id ?
in_1NrxgJJfSFX0WiLFt8vfchya
after finalizing the invoice, when I try to get the invoice through GO SDK, (with expanding the payment intent), I see that the client secret is empty in the payment intent under the invoice
Can you please share the code you are using and print the output
I'm seeing a client secret attached to the payment_intent pi_3NrxieJfSFX0WiLF1VMoxrq2 of that invoice
yes, even I am able to see the payment intent
invoiceGetParams := &stripe.InvoiceParams{}
invoiceGetParams.StripeAccount = stripe.String("acct_1Ltl1oPdSybcyjWE")
invoiceGetParams.Expand = []*string{stripe.String("subscription"),
stripe.String("payment_intent")}
in, err := invoice.Get(invoiceID, invoiceGetParams)
if err != nil && in != nil {
}
here , what I see is
in.payment_intent.client_secret is ""
What is the content og payment_intent ?
sorry didnt follow you
What is the content of in.payment_intent ?
if you try to get the invoice in_1NrxgJJfSFX0WiLFt8vfchya,
using go sdk, the client secret returned in the response is empty (even after expanding the payment inteNT)
I could be wrong, but AFAIK that is expected and is because the Invoice does not belong to your platform, it was created by the connected account itself using its own API keys. In those cases, because you can't update the payments(https://stripe.com/docs/connect/subscriptions#restrictions) the client_secret is null
to be clear if your platform created the Invoices for the account yourself(by calling the API and using invoiceCreateParams.StripeAccount ) then you have "ownership" of the Invoice and are able to access the client_secret to use in processing the payment, it's just that you can't do it if the Invoice was fully created/owned by the account itself
That makes sense, got it, thanks
just one follow-up question, on the dashboard can I create an invoice that is owned by the Uber platform and is invoiced for a connects account customer?
Platform Account (owned by) -> Connect Account -> Customer (invoiced for)
not really no. Either the customer is on the platform account (Destination Charges) or the customer is on the connected account(Direct Charges), and in all cases I don't think the Dashboard supports using Connect and you'd use the API
https://stripe.com/docs/invoicing/connect