#Dethsesh-ach-debit

1 messages ยท Page 1 of 1 (latest)

small rapids
#

Hello ๐Ÿ‘‹
Give me a moment to catch up and I'll respond as soon as I can ๐Ÿ™‚ thanks

foggy kernel
#

thank you

small rapids
foggy kernel
#

Yes, but if I use that then it accepts credit card as well

#

unless there is a way to define payment_method, but I do not see this being available

#

right now i'm using something like this:

    PaymentMethodOptions = new SessionPaymentMethodOptionsOptions
    {
        UsBankAccount = new SessionPaymentMethodOptionsUsBankAccountOptions
        {
            FinancialConnections = new SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions
            {
                Permissions = new List<string> { "payment_method" },
            },
        },
    },```
normal moat
#

๐Ÿ‘‹ I'm hopping in since @small rapids had to heado ut

#

Can you share the full request ID you're using to create your checkout session?

foggy kernel
#

on page load:

var options = new SessionCreateOptions
            {
                Mode = "payment",
                //Customer = "{{CUSTOMER_ID}}",
                PaymentMethodTypes = new List<string> { "us_bank_account" },
                PaymentMethodOptions = new SessionPaymentMethodOptionsOptions
                {
                    UsBankAccount = new SessionPaymentMethodOptionsUsBankAccountOptions
                    {
                        FinancialConnections = new SessionPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions
                        {
                            Permissions = new List<string> { "payment_method" },
                        },
                    },
                },
                LineItems = new List<SessionLineItemOptions>
    {
        new SessionLineItemOptions
        {
            PriceData = new SessionLineItemPriceDataOptions
            {
                Currency = "usd",
                UnitAmount = 50000,
                ProductData = new SessionLineItemPriceDataProductDataOptions
                {
                    Name = "Payment",
                },
            },
            Quantity = 1,
        },
    },
                SuccessUrl = "https://payment.sidoti.com/success?",
                CancelUrl = "https://payment.sidoti.com/cancel",
            };
            var service = new SessionService();
            Session session = service.Create(options);
            sessionId = session.Id;
        }
    }
}```
hollow finch
foggy kernel
#

req_eXifSapNfYguSq

hollow finch
foggy kernel
#

That's what I was looking at but I did not see the option to set payment methods there

#

I created a price in the dashboard

hollow finch
#

Ah, so you can use the same code you already have, but pass in the Price ID instead of PriceData.

foggy kernel
#

oh, that would be easy. I will test this out

#

okay wow that was easy, worked. and they can edit the amount

#

perfect

#

thank you