#Gajendra.kumar-angular-acss

1 messages ยท Page 1 of 1 (latest)

dark lotus
#

Pasting additional context:

I am trying to use this code in my angular 8 application, but confirmAcssDebitSetup method is not found. So how can I use this code for ACSS integration

Can anyone help me, how to do integration of Pre-authorized debit in Canada (ACSS) using Angular 8 as frontend and dot net api as backend application

#

Hi there ๐Ÿ‘‹ are you building your own angular components, or are you leveraging a library?

vagrant bear
#

Yes I am using Stripe.js

#

and I am trying to use pre-build checkout page

dark lotus
#

Is it just that function that isn't working? For example, are you able to successfully initialize the library by setting the stripe variable?

#

Actually hang on, I'm not sure you need to confirm if you're trying to use the pre-built checkout page. Please bear with me while I double check that.

vagrant bear
#

Actually I want to save bank details for future payment also, so I want to attach bank details with customer.

#

so I am following this link

dark lotus
#

Ah, gotcha. That flow also doesn't use the confirmAcssDebitSetup, can you indicate where you're seeing instructions to use this?

vagrant bear
#

I am using this link to save bank details for future payment

vagrant bear
#

Is there any other way to use ACSS debit for future payment

dusk elbow
#

Hello, catching up on this thread. One moment...

#

The two in that link are the ones we have. So is the question how to attach it to the customer with those flows?

vagrant bear
#

yes

#

I want to attach customer with bank details for future payment

dusk elbow
#

In the flow we linked to, that will happen when you provide the customer ID when creating the setup intent

vagrant bear
#

where I need to provide bank details

#

it should be attached with payment Intent

#

or somewhere else

#

I mean How can I attach bank details with customer

dusk elbow
vagrant bear
#

var options = new PaymentIntentCreateOptions
{
Amount = 1099,
Currency = "cad",
SetupFutureUsage = "off_session",
Customer = "{{CUSTOMER_ID}}",
PaymentMethodTypes = new List<string> { "acss_debit" },
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions
{
AcssDebit = new PaymentIntentPaymentMethodOptionsAcssDebitOptions
{
MandateOptions = new PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions
{
PaymentSchedule = "interval",
IntervalDescription = "First day of every month",
TransactionType = "personal",
},
},
},
};
var service = new PaymentIntentService();
service.Create(options);

#

this is the code to create a payment intent

#

but how will I attach banking information here

#

I have institution number, transit number, account number, name and email information stored in my database.

#

but how will I attach these banking information

#

Should I attach with Customer or Payment Intent

viscid leaf
#

๐Ÿ‘‹ Give me a minute to get caught up!

vagrant bear
#

var acss_options = new PaymentMethodCreateOptions
{
Type = "acss_debit",
AcssDebit = new PaymentMethodAcssDebitOptions
{
AccountNumber = "000123456789",
InstitutionNumber = "000",
TransitNumber = "11000"
},
BillingDetails = new PaymentMethodBillingDetailsOptions
{
Name = name,
Email = email,
Phone = "9999999999",
Address = new AddressOptions
{
City = "HAILFAX",
Country = "CA",
Line1 = "356 CHARLES RD",
Line2 = "356 CHARLES RD",
PostalCode = "A1A1A1",
State = "NS"
}
}
};
var paymentMethodService = new PaymentMethodService();
var paymentMethod = paymentMethodService.Create(acss_options);

#

var customerService = new CustomerService();
var customer = customerService.Create(new CustomerCreateOptions
{
Email = email,
Name = name
});

#

var options = new SetupIntentCreateOptions
{
PaymentMethodTypes = new List<string> { "acss_debit" },
Customer = customer.Id,
PaymentMethod = paymentMethod.Id,
PaymentMethodOptions = new SetupIntentPaymentMethodOptionsOptions
{
AcssDebit = new SetupIntentPaymentMethodOptionsAcssDebitOptions
{
Currency = "cad",
MandateOptions = new SetupIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions
{
PaymentSchedule = "interval",
IntervalDescription = "First day of every month",
TransactionType = "personal",
},
},
},
};
var service = new SetupIntentService();
var setupIntent = service.Create(options);

#

Can you pls check, is it correct code

#

first I am creating Payment Method

#

then I am creating customer

viscid leaf
#

Have you tried running it? That would be the fastest way to check if things are correct

vagrant bear
#

then I am creating Setup Intent

viscid leaf
#

@vagrant bear Did you try it out on your end and confirm you got things working?

vagrant bear
#

yes payment intent is created

mossy flame
#

So are you unblocked?

vagrant bear
#

ok let me see what should I do next to complete the process

mossy flame
#

What is blocking you?

vagrant bear
#

When I am looking stripe dashboard Payment section it is showing me Incomplete payment

mossy flame
#

So did you complete the payment intent?

#

I'm sorry, you shared a lot of your code without much details really. Did you follow our docs carefully? They explain exactly what to do step by step

vagrant bear
#

Yes Payment intent is completed

#

I follow the steps but was little bit confuse like how to like bank details with customer

mossy flame
#

what does that mean "payment intent is completed" you just said it was incomplete

vagrant bear
#

Sorry, Payment intent is created but with incomplete status

#

so I am reading about if I missed any step

mossy flame
#

I mean creating the PaymentIntent is the first step of the entire thing right?

vagrant bear
#

next step is Collect payment method details and submit

#

and in this step it is using

#

stripe.confirmAcssDebitPayment

#

to collect the bank details and verification

#

but I already have bank details so I don't need this step. As I correct?

mossy flame
#

you're not supposed to pass raw bank account details via the API in theory, this is unsafe, where do those details come from?

vagrant bear
#

We have separate form to collect bank details and these details are using with multiple application

#

is it really required to use stripe.confirmAcssDebitPayment to collect banking information from customer

#

??

mossy flame
#

It is not required, but it's the common path

#

Sorry I'm still struggling to grasp your question, you say you follow the docs but you don't say where you are blocked, what you tried, what did or didn't work etc

#

like have you passed the bank account details to Stripe already in the API? What have you tried?

vagrant bear
#

let me tell you steps again

#

which I am following in API

#
  1. I am creating payment method and providing banking details here already
#

var acss_options = new PaymentMethodCreateOptions
{
Type = "acss_debit",
AcssDebit = new PaymentMethodAcssDebitOptions
{
AccountNumber = "000123456789",
InstitutionNumber = "000",
TransitNumber = "11000"
},
BillingDetails = new PaymentMethodBillingDetailsOptions
{
Name = name,
Email = email,
Phone = "9999999999",
Address = new AddressOptions
{
City = "HAILFAX",
Country = "CA",
Line1 = "356 CHARLES RD",
Line2 = "356 CHARLES RD",
PostalCode = "A1A1A1",
State = "NS"
}
}
};
var paymentMethodService = new PaymentMethodService();
var paymentMethod = paymentMethodService.Create(acss_options);

#
  1. then I create a customer
#

var customerService = new CustomerService();
var customer = customerService.Create(new CustomerCreateOptions
{
Email = email,
Name = name
});

#
  1. then I create a Payment Intent and assigned payment method and customer to this Payment Intent
#

var options = new PaymentIntentCreateOptions
{
Amount = 1099,
Currency = "cad",
SetupFutureUsage = "off_session",
Customer = customer.Id,
PaymentMethod = paymentMethod.Id,
PaymentMethodTypes = new List<string> { "acss_debit" },
PaymentMethodOptions = new PaymentIntentPaymentMethodOptionsOptions
{
AcssDebit = new PaymentIntentPaymentMethodOptionsAcssDebitOptions
{
MandateOptions = new PaymentIntentPaymentMethodOptionsAcssDebitMandateOptionsOptions
{
PaymentSchedule = "interval",
IntervalDescription = "First day of every month",
TransactionType = "personal",
},
},
},
};
var service = new PaymentIntentService();
var paymentIntent = service.Create(options);

#

till now I have done these steps, and it is creating a Payment on dashboard with incomplete status

#

now pls tell me what should I do next?

mossy flame
#

okay so all you missed is passing Confirm = true, as a parameter to the last call in PaymentIntentCreateOptions

#

that will create and confirm the Payment Intent in one go

vagrant bear
#

ok let me try with this also

#

When confirming a PaymentIntent with a acss_debit PaymentMethod and setup_future_usage, mandate_data is required.

#

now I am getting this error with Confirm = true

mossy flame
#

perfect so now you can pass those with the relevant information as needed!

vagrant bear
#

Yes I am doing the same

winged vale
#

I'm catching up here @vagrant bear give me a quick sec

vagrant bear
#

after providing mandate data it is still showing incomplete in dashboard

#

pls see screenshot

#

??

winged vale
#

looking one sec

vagrant bear
#

ok, I am waiting

winged vale
#

what is the PaymentIntent ID , can you paste that?

#

please no screenshots

vagrant bear
#

pi_3K1zA0JA9YWddhZ71jjfTzFr

#

I have done one thing, I have verified account manually using stripe dashboard, Now it is showing me in Processing status

#

so I need to verify these bank details with micro deposit. is it ?

winged vale
#

most likely yes that is the issue

#

but looking

vagrant bear
#

But I verify these bank details with micro deposit using stripe dashboard.

#

How can I do the same with API?

#

are you still with me?

winged vale
#

yep I'm still here

#

have you followed the doc linked?

#

it shows you how