#stevec0583

1 messages ยท Page 1 of 1 (latest)

brazen tangleBOT
azure flower
#

This error is usually thrown when you use secret key from account A to access the payment intent from account B

#

pi_3NcGv9RT28QMR5HW08kJIjDU was created on connected account acct_1NZyqWRT28QMR5HW using platform key with Stripe-Account header

rigid glade
azure flower
#

When you retrieve the Payment Intent, you should also use Stripe-Account in your request

rigid glade
#

Okay I'll double check the stripe account. It's stripe connect and I can't see any problems with keys.
Unless it's not possible for the platform to retrieve a payment intent for a connected user? (I can't understand why that would be a problem though)

azure flower
rigid glade
#

Gotcha. Kinda annoying that it's necessary (since PI's are globally unique) but that's okay, I'll give it a shot now.

azure flower
#

With Connect integration, it's necessary to send the connected account ID under Stripe-Account header in the request

rigid glade
#

Gotcha. I checked and it works.
Thanks for the help!

azure flower
#

No problem! Happy to help ๐Ÿ˜„

#

Is it possible to get a url to a receipt for payments on stripe connect? When someone pays on the platform, I'd like to send them a confirmation email with a few details, including (if possible) a link to their receipt.
In your retrieval request, latest_charge should b expanded and you will be able to find receipt URL under latest_charge.receipt_url

rigid glade
azure flower
#

This SO has an update in 2019 that:

UPDATE: As of January 17 2019, this is now possible to do. The Charge object has the receipt_url property that lets you access this information whether an email receipt was sent or not!

Which is the same as what I recommended

rigid glade
#

Sorry, got caught on something else. Just checking now. Will report back in a min

#

Brilliant, it works, thanks very much for the help!

azure flower
#

No problem! Happy to help ๐Ÿ˜„

rigid glade
#

It worked, thanks a lot for the help. I posted an answer to the question to hopefully help others in the future: https://stackoverflow.com/a/76848387/5783745

#

If I made any mistake or if anything's poorly worded I can edit it (just let me know)

azure flower
#

the stripe account id as an option
Stripe account ID is only required if Connect is used. For non-Connect, it's not required to set connected account ID as Stripe-Account

rigid glade
#

Great to know. If not using connect, is

Stripe::PaymentIntent.retrieve(
  { id: payment_intent_id, expand: ['latest_charge'] }
)

enough?

azure flower
#

Yes! This looks good

rigid glade
#

Awesome. Thanks a lot for all your help!