#martin_98625

1 messages ยท Page 1 of 1 (latest)

sullen dustBOT
balmy marsh
#

You'll need to create your own field for name and require it be filled out in your validation code

sharp quarry
#

hi! thanks for the answer. So this is the form provided by stripe. Is there a way to make it look nice in that form?

balmy marsh
#

Nah it'll need to be outside that form

#

You can style it how you want though

#

That's up to you

sharp quarry
#

do you have any examples I can get inspiration from?

balmy marsh
#

Nah I don't

sharp quarry
#

I'm not sure where to place the carholders name in this arrangement to make it look nice

#

but I'll see what I can do

#

do you know if stripe has a pre-built billing info form?

balmy marsh
sharp quarry
#

ohh I see, and this address element can't be embedded in this payment element somehow right?

balmy marsh
#

You can add them on the same page right next to each other

sharp quarry
#

and it's name AddressElement

#

however, in my local setup I only have access to ShippingAddressElement

balmy marsh
#

You could be using an older version of the library

#

Should be AddressElement afaik

sharp quarry
#

checking...

#

using 1.7.0_226

#

which is the same as the example

#

๐Ÿค”

balmy marsh
#

Do you get an error when trying to import AddressElement?

sharp quarry
#

it;s not exported from the library

#

I'll update the library and see what I get

#

do you have any recommendations on how to minimize the amount of payment rejections?

balmy marsh
#

Yeah it should be int he latest version at least

sharp quarry
#

we're seeing like a 75% payment rejections on our site

#

using the payment component provided by stripe

balmy marsh
#

What flow are you using?

#

Can you describe exactly how you integrate and accept payments?

#

Start to end

sharp quarry
#

sure

#
  1. We create a setup intent using the following ruby code:
Stripe::SetupIntent.create(
      usage: 'off_session',
      customer: customer.id,
      automatic_payment_methods: { enabled: true }
    )
#
  1. that gives us back a setup intent secret we input in the frontend react PaymentElement
#

that's our code.

balmy marsh
#

Ok that just sets up the pm for future usage

#

When do you charge it?

sharp quarry
#
  1. the success URL redirects the user to a page of ours that creates a 7 day free trial subscription in the backend with the payment method selected:
#

so at this point the payment is hooked up with the customer and the customer is subscribed to a recurring plan

#

that has a 7 day free trial

#

we get the payment failures after those 7 days, when stripe tries to collect the payment

balmy marsh
#

Ah ok. No need to create a setupintent at all. When you create a subscription with a trial, it creates a setupintent. You can use that setupintent to collect payment details

sharp quarry
#

don't I need the setup intent for the payment element?

balmy marsh
#

You do

#

But you don't need to create one

#

When you create a subscription with a trial, it creates a setupintent

#

Available at the above param

#

You'd then use that setupintent's client secret to take payment details

sharp quarry
#

yeah, but that would create the subscription when the payment form renders

#

which we don't want

#

we want the subscription to be created only when the customer inputs his/her payment info

balmy marsh
#

Ok

#

Have you examined these declines

#

To see what the reasons usually are

sharp quarry
#

let me check

#

mostly this

balmy marsh
#

Yeah that message is accurate

#

Recommend having some customers ask their banks why the payments were declined

#

But also it could be that the customers are intentionally having it this way to avoid continuing the subscription

#

Using a virtual card or something like that that they cancel

#

Hard to say

sharp quarry
#

this is how the customer is set up

#

we read somewhere that collecting the cardholder's name might help

#

hence my original question

balmy marsh
#

Don't know how much that'll help

#

You need to find out why the declines are happening in the first place

#

75% decline rate is quite large

#

Really recommend getting in touch with our support team on this: https://support.stripe.com/contact for more info/help

sharp quarry
#

ya

#

that's what we thought

balmy marsh
#

We just provide advice on the api, but they may be able to have some more insight

sharp quarry
#

I'll see what I can get from support

#

we went that route already

#

and couldn't get much help

#

this is our payments table

glad cosmos
#

๐Ÿ‘‹ Hopping in here since codename_duchess has to head out - I can spot check a specific example for you if you want to see what may be happening, but if you do want someone to take a look at your decline rate overall it's really something support will have to handle

sharp quarry
#

do you need a payment id?

glad cosmos
#

Yeah, something like pi_123 will work

sharp quarry
#

pi_3O0PooHjwUyPPYQc0fKvycLC

glad cosmos
#

For that particualr payment it was decline because of insufficient funds, so it does seem to be a genuine decline

sharp quarry
#

well stripe shows this:

Payment declined by the issuing bank
Tell the customer to try a different payment method, or they can contact their issuing bank for more information. Retries may succeed. Learn more about declines.
Oct 12, 2023, 7:24 AM

#

where can I see it was due to insufficient funds?