Closed thelmuxkriovar closed 11 months ago
When using stripe::Token::create and creating an account token, async-stripe fails to deserialize the request and returns the following Err:
Err(JSONSerialize(Error { path: Path { segments: [Map { key: "id" }] }, original: Error("invalid `TokenId`, expected unknown id prefix", line: 2, column: 37) })
I have verified that the request went through correctly on stripe's end, as you can see from the following screenshot of stripe's requests log
Simplest code to reproduce this:
let stripe_account_token = stripe::Token::create( &stripe_client, stripe::CreateToken { account: Some(stripe::CreateTokenAccount { business_type: Some(stripe_create_token_business_type), company: company_params.clone(), individual: Some(individual_params.clone()), tos_shown_and_accepted: Some(true), }), card: None, customer: None, cvc_update: None, expand: &[], person: None, pii: None, }, ) .await?;
I expect the token to be parsed correctly
No response
irrelevant
1.70.0
0.22.2
2022-11-15
Thanks for this! Looks like we are missing that prefix in the list of ids. I will open a PR asap.
PR merged and released, closing
Describe the bug
When using stripe::Token::create and creating an account token, async-stripe fails to deserialize the request and returns the following Err:
I have verified that the request went through correctly on stripe's end, as you can see from the following screenshot of stripe's requests log
To Reproduce
Simplest code to reproduce this:
Expected behavior
I expect the token to be parsed correctly
Code snippets
No response
OS
irrelevant
Rust version
1.70.0
Library version
0.22.2
API version
2022-11-15
Additional context
No response