#Gajendra.kumar-angular-acss
1 messages ยท Page 1 of 1 (latest)
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?
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.
Yeah, you shouldn't need to use the confirm function when using checkout sessions. This guide walks through the process for accepting an ACSS debit with our prebuilt-checkout page, and it links to another guide that helps explain the checkout session process more thoroughly at the top of step 2.
https://stripe.com/docs/payments/acss-debit/accept-a-payment?platform=checkout
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
Ah, gotcha. That flow also doesn't use the confirmAcssDebitSetup, can you indicate where you're seeing instructions to use this?
Is there any other way to use ACSS debit for future payment
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?
In the flow we linked to, that will happen when you provide the customer ID when creating the setup intent
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
If you want to do this while taking a payment, you can follow our "accept a payment flow", making sure to set setup_future_usage to off_session on your payment intent https://stripe.com/docs/payments/acss-debit/accept-a-payment#web-create-payment-intent
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
๐ Give me a minute to get caught up!
If you have the institution, transit, and accuont numbers in your own database you can use them to create a new Payment Method (see https://stripe.com/docs/api/payment_methods/create#create_payment_method-acss_debit) which you would then use in the Payment Intent
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
Have you tried running it? That would be the fastest way to check if things are correct
then I am creating Setup Intent
@vagrant bear Did you try it out on your end and confirm you got things working?
yes payment intent is created
So are you unblocked?
ok let me see what should I do next to complete the process
What is blocking you?
When I am looking stripe dashboard Payment section it is showing me Incomplete payment
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
Yes Payment intent is completed
I follow the steps but was little bit confuse like how to like bank details with customer
what does that mean "payment intent is completed" you just said it was incomplete
Sorry, Payment intent is created but with incomplete status
so I am reading about if I missed any step
I mean creating the PaymentIntent is the first step of the entire thing right?
https://stripe.com/docs/payments/acss-debit/accept-a-payment there are many steps after
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?
you're not supposed to pass raw bank account details via the API in theory, this is unsafe, where do those details come from?
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
??
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?
let me tell you steps again
which I am following in API
- 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);
- then I create a customer
var customerService = new CustomerService();
var customer = customerService.Create(new CustomerCreateOptions
{
Email = email,
Name = name
});
- 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?
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
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
perfect so now you can pass those with the relevant information as needed!
Yes I am doing the same
I'm catching up here @vagrant bear give me a quick sec
after providing mandate data it is still showing incomplete in dashboard
pls see screenshot
??
looking one sec
ok, I am waiting
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 ?
most likely yes that is the issue
but looking
so this is all expected right
you finally correctly passed the right microdeposit verification amounts 32, 45
and now the PaymentIntent is in status: processing
and it takes n days to move into status: succeeded
https://stripe.com/docs/payments/acss-debit/accept-a-payment#web-confirm-paymentintent-succeeded