#iefsu

1 messages · Page 1 of 1 (latest)

unborn warrenBOT
torpid torrent
#
import stripe

stripe.api_key = ""

payment_method = stripe.PaymentMethod.create(
    type="card",
    card={
        "number": "4000002760003184",
        "exp_month": 12,
        "exp_year": 2023,
        "cvc": "123",
    },
)

customer = stripe.Customer.create(
    email="customer@example.com",
    payment_method=payment_method.id, # Replace with your own payment method ID
)

stripe.PaymentMethod.attach(payment_method.id, customer=customer.id)

stripe.Customer.modify(
    customer.id,
    invoice_settings={
        "default_payment_method": payment_method.id,
    },
)

product = stripe.Product.create(
    name="My Product",
    description="A test product",
)

price = stripe.Price.create(
    unit_amount=1000, # Replace with your own price amount
    currency="usd",
    recurring={"interval": "month"},
    product=product.id,
)

subscription = stripe.Subscription.create(
    customer=customer.id,
    items=[{
        "price": price.id,
    }],
)
#

i have this problem

#

when more verification is required the payment stays incomplete
how to redirect the user to the verification page (bank vbv) to complete verification

dry goblet
#

'Send a Stripe-hosted link for customers to confirm their payments when required'

#

So in cases like these, when it's enabled, a Stripe hosted link will be sent to the customer to confirm the payments

torpid torrent
#

they will have to re-enter the info once again?

#

can i just get that link from a webhook and redirect user to it?

dry goblet
#

No, you can look at the preview email here to see what it looks like.

torpid torrent
#

on other websites that's uses stripe subscriptions
i don't have to do this when i'm the client for example netflix displays the verification page inside netflix page (iframe)

how to do that?

#

actually stripe does provide that
it's called
"next_action": {
"type": "use_stripe_sdk",
"use_stripe_sdk": {
"source": "src_1MwY0WK8PSvVi4I4",
"stripe_js": URL
}

dry goblet
#

I brushed over the second question, can i just get that link from a webhook and redirect user to it?.

Looking

torpid torrent
#

oh no worries

#

you been a great help that option helps too in case user forget i can just remind him to do it after in email

dry goblet
#

I was able to confirm that is not it. There is not a way to get a link to confirm like you described.

#

You'd need to bring the user back on session to complete 3DS which would require a lot of heavy lifting on your end.