You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I submit the token to Stripe API I get this error in response:
{
"error": {
"message": "You must provide a card that has the 'currency' field set when adding a card to a Stripe account.",
"param": "external_account",
"type": "invalid_request_error"
}
}
That means that I don't send a currency field in request. For creating a token I am using createToken function.
As you can see after passing card info and currency field to createToken function it returns null for currency field for token object which is causing error from Stripe. Can you please help me with this issue?
Thank you.
The text was updated successfully, but these errors were encountered:
Describe the bug
React Native.
@stripe/stripe-react-native
I am trying to add a debit card for payout method for connect account in test mode.
I am using cards from here: https://stripe.com/docs/connect/testing#test-debit-card-numbers
When I submit the token to Stripe API I get this error in response:
{
"error": {
"message": "You must provide a card that has the 'currency' field set when adding a card to a Stripe account.",
"param": "external_account",
"type": "invalid_request_error"
}
}
That means that I don't send a currency field in request. For creating a token I am using createToken function.
const token_prep = {...card, currency: 'usd'}
console.log(token_prep); //Object {
"brand": "MasterCard",
"complete": true,
"currency": "usd",
"expiryMonth": 12,
"expiryYear": 24,
"last4": "8210",
"postalCode": "06514",
"validCVC": undefined,
"validExpiryDate": undefined,
"validNumber": undefined,
}
const { token, error } = await createToken(token_prep);
console.log(token); //Object {
"bankAccount": null,
"card": Object {
"address": Object {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postalCode": null,
"state": null,
},
"brand": "MasterCard",
"country": "US",
"currency": null,
"expMonth": 12,
"expYear": 2024,
"funding": "Debit",
"last4": "8210",
"name": null,
},
"created": "1655960704000",
"id": "tok_1LDiE0DEHw6rr3PAtTHtGVMt",
"livemode": false,
"type": "Card",
}
As you can see after passing card info and currency field to createToken function it returns null for currency field for token object which is causing error from Stripe. Can you please help me with this issue?
Thank you.
The text was updated successfully, but these errors were encountered: