#elias117-tax
1 messages · Page 1 of 1 (latest)
yup
one second
Here is the invoice pay attempt
req_VMFKfvFu5tz5IH
and here is the customer creation
req_yy5cigs5uis71t
Can you try again but put a space in the postal code?
That's strange - does this happen for any canadian address you try? Let me also do some digging on my end to see what the issue could be
yeah it does
I think I've figured it out - replace "Canada" with "CA" and "Nova Scotia" with "NS"
Oh ok one min
ok I think it worked
I'm just having trouble adding a payment method
req_s7OnSmy13aAq3l
Hello! I'm taking over for @ember latch, let me get caught up...
ok
The Customer the Invoice belongs to has no invoice_settings.default_payment_method set, so Stripe doesn't know what to use to pay the Invoice: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
It can happen when you create the Customer. Ideally you should use a Setup Intent to set the Payment Method up for future use and attach it to the Customer: https://stripe.com/docs/api/setup_intents
Currently I have this
var paymentMethod = new PaymentMethodCreateOptions
{
Type = "card",
Card = new PaymentMethodCardOptions
{
ExpYear = cc.ExpirationYear,
ExpMonth = cc.ExpirationMonth,
Cvc = cc.Cvc,
Number = cc.CreditCardNumber.Replace(" ", ""),
},
BillingDetails = new PaymentMethodBillingDetailsOptions
{
Name = cc.CardHolderName,
}
};
PaymentMethod method;
StripeCreditCardPaymentInfo cardInfo;
method = await paymentMethodService.CreateAsync(paymentMethod);
method = await paymentMethodService.AttachAsync(method.Id, new PaymentMethodAttachOptions { Customer = userRecord.StripeId });```
It's strongly recommended that you do not handle raw PANs yourself. Are you fully PCI compliant?
we will be
just not yet
cant I just attach that method to the invoice_settings.default_payment_method
You can, but doing so is not recommended as the Payment Method will not be set up for future use.
ok for now I just want it as one time payment
You should remove PaymentMethodAttachOptions { Customer = userRecord.StripeId }); and use a Setup Intent instead: https://stripe.com/docs/payments/save-and-reuse
ok
Your current approach does not allow the customer to authenticate the transaction if needed (i.e., 3D Secure).
oh I see ok