-
Notifications
You must be signed in to change notification settings - Fork 489
Closed
Labels
Description
Describe the bug
Error on create BankAccount: parse \"https://api.stripe.com/v1/accounts/btok_456/external_accounts%!(EXTRA string=, string=acct_123)\": invalid URL escape \"%!(\"\n
The OpenAPI–generated code for creating bank accounts builds a URL with one %s
but supplies three value, resulting in an invalid escape sequence in the path
To Reproduce
call client.V1BankAccounts.Create(ctx, params)
with correct data
Expected behavior
create new BankAccount
Code snippets
// var client *stripe.Client
params := &stripe.BankAccountCreateParams{
Account: stripe.String("acct_123"),
Token: stripe.String("btok_456"),
}
_, err := client.V1BankAccounts.Create(ctx, params)
OS
macOS
Go version
go1.23.2 darwin/arm64
stripe-go version
v82.2.1
API version
2025-05-28
Additional context
It can still be created via the deprecated client.API
import (
"github.com/stripe/stripe-go/v82"
"github.com/stripe/stripe-go/v82/client"
)
var stripeClient *client.API
.......
params := &stripe.BankAccountParams{
Account: stripe.String(accountId),
Token: stripe.String(token),
}
ba, err := stripeClient.BankAccounts.New(params)