#Adarsh

1 messages · Page 1 of 1 (latest)

robust oysterBOT
ashen nexus
#

Hi
Can you please share an Invoice Id ?

astral vigil
#

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

ashen nexus
#

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

astral vigil
#

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 ""

ashen nexus
#

What is the content og payment_intent ?

astral vigil
#

sorry didnt follow you

ashen nexus
#

What is the content of in.payment_intent ?

astral vigil
#

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)

tidal burrow
#

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

astral vigil
#

@tidal burrow GOT IT, THANKS

tidal burrow
#

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

astral vigil
#

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)

tidal burrow
#

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