#achilles_best-practices

1 messages ยท Page 1 of 1 (latest)

astral ospreyBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1242462225113940028

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

junior kettle
#

Hi there ๐Ÿ‘‹ the Test your integration section in that doc gives some guidance for testing this flow. Is there something else you were trying to test about it?

sacred hamlet
#

Is it possible to collect customers preferred payment method card/bank transfer using checkout?

junior kettle
#

Yes.

sacred hamlet
#

I want to create a checkout with free trial that collects payment method options
params := &stripe.CheckoutSessionParams{
Customer: stripe.String(customerId),
LineItems: subscriptionItems,
Mode: stripe.String(string(stripe.CheckoutSessionModeSubscription)),
SuccessURL: &successUrl,
CancelURL: &failureUrl,
ExpiresAt: &expiresAt,
BillingAddressCollection: stripe.String(string(stripe.CheckoutSessionBillingAddressCollectionRequired)),
SubscriptionData: &subscriptionData,
CustomFields: customFields,
}

#

should i add anything for the above params

#

also currently my dashboard shows this

junior kettle
sacred hamlet
#

but bank transfer is active

junior kettle
#

We aren't as familiar with the dashboard in this forum, so I don't know what that first screenshot is showing, where it was taken from, or what it's referring to. Is it impacting what you're seeing in your testing?

sacred hamlet
#

i didn't set it as it will always default to always

junior kettle
#

Ah, yup, I missed overlooked that mode was set to subscription.

sacred hamlet
junior kettle
#

Okay, it's on in your automatic payment method settings, are you not seeing it in the Checkout Sessions you create?

sacred hamlet
#

yes

junior kettle
#

Can you share the ID of a Checkout Session from your testing?

sacred hamlet
#

cs_test_b1idXcVXFcrnQz13dV3r3IO0EYcUNVZcHo4XeGvGqBO5aLSsXPJThQwTRP

junior kettle
#

Thank you, not spotting the problem here yet, but am still looking.

sacred hamlet
#

I can see this on retrieving the checkout session from cli

    "card": {
      "request_three_d_secure": "automatic"
    }
  },
  "payment_method_types": [
    "card"
  ],
junior kettle
sacred hamlet
#

Oh! so how do i collect customer preference for my use case

junior kettle
#

You would need to collect that manually before progressing to the payment process, so you know which payment flow to send your customer through based on how they want to pay.
Alternatively you could explore migrating from Checkout Sessions to the Payment Element, as the supportablility matrix linked above indicates that integration path doesn't have the limitaton Checkout Sessions do.