#Harpreet-SetupIntent

1 messages · Page 1 of 1 (latest)

near cave
#

Yes it should be possible. Which Doc are you following and what is the issue you have with it?

opal dock
#

yes, i have bank details of the customer, like account number, routing number , name etc.

#

how can i create customer and then add that method with that customer ..?

near cave
#

You would want to follow this Doc

opal dock
#

var options = new CustomerCreateOptions
{
Name = cardHolderName,
Email = email,
Source = tokenId,
};
var service = new CustomerService();
var response = service.Create(options);

        var options1 = new SetupIntentCreateOptions
        {
            PaymentMethodTypes = new List<string>
          {
            "card",
          },
            Customer = response.Id,
            PaymentMethod = response.DefaultSourceId,
            Confirm = true,
        };
        var service1 = new SetupIntentService();
        service1.Create(options1);

        return response;
#

i am using this code for card

#

what i need to change here

#

??

near cave
#

Have you read the link I provided above? The syntax will be quite different

#

It's all written in that Doc

opal dock
#

ok

#

let me check

opal dock
#

I'm using stripe version 39.19.0, do i need to update the version to use this options SetupIntentPaymentMethodOptionsUsBankAccountOptions..?

near cave
#

Seems you need to update