#bbfallen

1 messages · Page 1 of 1 (latest)

winter jasperBOT
sour atlas
#

Hi there

drowsy wraith
#

Hello, I'm stucked with Bank transfer payment option. I'm using the test mode and created a customer with all requirements(SEPA region, EUR currency, France country) - but I still can not create a checkout session to initiate a bank transfer

sour atlas
#

Taking a look

#

Can you try setting payment_method_types: ['customer_balance'] when you create the Checkout Session?

drowsy wraith
#

I'ts already there, here is the code:
@classmethod
def create_payment_checkout(
cls,
customer: str,
types: list[str],
currency: str,
amount: int,
metadata: dict,
options: dict | None = None,
) -> dict:
intent = stripe.checkout.Session.create(
payment_method_types=types,
payment_method_options=options,
success_url=CLIENT_APP_URL,
cancel_url=CLIENT_APP_URL,
mode="payment",
line_items=[
{
"price_data": {
"currency": currency,
"product_data": {
"name": "credits",
},
"unit_amount": amount,
},
"quantity": 1,
}
],
customer=customer,
metadata=metadata,
)
return intent

@classmethod
def create_bank_checkout(
cls,
customer: str,
amount: int,
currency: str,
user_id: UUID,
) -> dict:
return cls.create_payment_checkout(
customer=customer,
types=["customer_balance"],
options={
"customer_balance": {
"funding_type": "bank_transfer",
"bank_transfer": {
"type": "eu_bank_transfer",
"eu_bank_transfer": {"country": "FR"},
},
}
},
currency=currency,
amount=amount,
metadata={"user_id": user_id},
)

sour atlas
#

Can you give me a request ID where you are seeing the error?

drowsy wraith
#

Give me a sec

#

req_zcSec5rqjjP4oI

sour atlas
#

Thanks sorry for delay. Looking

#

Ah okay you are a SG account

#

Don't think that works with EU Bank Transfers

drowsy wraith
#

So if my Account is a SG account and my customer is a EU customer - it won't work?

sour atlas
#

Correct. You have to have an EU Stripe Account for these bank transfers to work.

drowsy wraith
#

Got it. Thanks!