#xfechx_api

1 messages ¡ Page 1 of 1 (latest)

lyric mountainBOT
#

👋 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/1316650028839731282

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

proud ether
#

AfterPay requires shipping address to be collected in order to have it displayed.

This is how the shipping address should be collected in Checkout Session:

shipping_address_collection: {
  # Specify which shipping countries Checkout should provide as options for shipping locations
  allowed_countries: ['AU', 'CA', 'GB', 'NZ', 'US'],
},
# If you already have the shipping address, provide it in payment_intent_data:
# payment_intent_data: {
#   shipping: {
#     name: 'Jenny Rosen',
#     address: {
#       line1: '1234 Main Street',
#       city: 'San Francisco',
#       state: 'CA',
#       country: 'US',
#       postal_code: '94111',
#     },
#   },
# },

Reference: https://docs.stripe.com/payments/afterpay-clearpay/accept-a-payment?web-or-mobile=web&payments-ui-type=stripe-hosted#enable-afterpay-as-a-payment-method

Learn how to accept Afterpay (also known as Clearpay in the UK), a payment method in the US, CA, UK, AU, and NZ.

placid comet
#

where can I find this for php

#

ah I can see it

#

If I add those lines...
Will it affect any other payment types?

#

I use that same code for all my checkout sessions, and I want them as flexible as possible, because it is also used amongst different countries and different accounts.

proud ether
#

When enabling this, the Checkout Session will collect the shipping address for all payment method types

placid comet
#

Do I need to explicitly enable afterpay?

#

here:

#
            'card' =>  [
              //'setup_future_usage'  => 'off_session', (disabled setup_future_usage so that applepay is enabled.)
              'installments' => ['enabled' => true]
            ],
            'oxxo' => ['expires_after_days' => 2],
            'sepa_debit' => ['setup_future_usage' => 'off_session']
          ],```