#lukelengl

1 messages · Page 1 of 1 (latest)

north mossBOT
mental urchin
#

hello! can you share an example request id for 1) and 2) ?

tranquil mountain
#

Sure, I'm using the .NET SDK.
Here's option 1)

        var ephemeralKeyService = new EphemeralKeyService();
        var requestOptions = new RequestOptions { StripeAccount = financialAccount.StripeConnectAccountId };
        var ephemeralKey = await ephemeralKeyService.CreateAsync(new EphemeralKeyCreateOptions
        {
            IssuingCard = request.CardId,
            ExtraParams = new Dictionary<string, object>()
            {
                { "nonce", request.Nonce }
            },
        }, requestOptions, cancellationToken);
#

Here's option 2)

var ephemeralKeyService = new EphemeralKeyService();
        var ephemeralKey = await ephemeralKeyService.CreateAsync(new EphemeralKeyCreateOptions
        {
            IssuingCard = request.CardId,
            ExtraParams = new Dictionary<string, object>()
            {
                { "nonce", request.Nonce }
            },
        }, null, cancellationToken);
mental urchin
#

do you have the request id?

#

it'll look like req_xxx

tranquil mountain
#

Sure, here's one where I'm setting the Stripe Account ID to to the connected account ID: req_E7tlBXhKzAQNhD

mental urchin
#

your issuing card : ic_1N4B7GRIbVe7ttO5H9rWa9vq belongs to another Stripe account. Since you're using the StripeAccount header in your first request, you should also include the StripeAccount header for the second request too

tranquil mountain
#

I'm pretty sure that I'm using the correct Stripe Account for that Card ID. Is the problem that I'm not including the Financial Account that's associated with it?

#

Oh actually, the request I sent you was using option 2 of my code sample above. I'm trying again with option 1

mental urchin
#

sure, let me know what's the request id for option 1 if you're still running into an error

tranquil mountain
#

Here's request ID using option 1: req_J7SYvExBOl7tRi

#

says "No such ephemeralkeynonce: 'ephkn_pub_BAI5bBEPyOL6sY76IYprBW0i'"

mental urchin
#

Try including the StripeAccount header client side also for that same StripeAccount and see if that works

tranquil mountain
#

ah that makes sense. i'm using the React SDK for the client side. didn't see any options to pass the StripeAccount header using the SDK

#

but i see how to do it in that link you just sent

#

thank you so much for the help Alex!