#josula_api

1 messages ¡ Page 1 of 1 (latest)

vagrant impBOT
#

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

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

lyric jewel
#

So this is my flow:

  1. I create a new payment session
    const session = await stripe.checkout.sessions.create({
      mode: "payment",
      payment_method_types: ["billie"], // Only Billie for this session
      customer: stripeCustomerId,
      success_url: `https://yourdomain.com/success?session_id={CHECKOUT_SESSION_ID}`,
      cancel_url: `https://yourdomain.com/cancel`,
      payment_intent_data: {
        capture_method: "manual", // start with manual capture
      },
      line_items: [
        {
          price_data: {
            currency: "eur",
            product_data: { name: "Test Product" },
            unit_amount: 1000,
          },
          quantity: 1,
        },
      ],
    });
  1. I want to take the payment intent from the payment session and POUPLATE it with customer data and THEN send the payment session url to my customer

=> somehow the created payment session does NOT have a pamyent intend it? Why?

oak tundra
#

want to take the payment intent from the payment session and POUPLATE it with customer data and THEN send the payment session url to my customer
That's not possible. What are you trying to populate, exactly?

lyric jewel
#

Ok

#

We are trying to add Billie-specific customer data that Billie then takes over to pre-populate in the checkout, otherwise the customer has to re-enter their entire information every single time. This is a crazy conversion killer.

#
   const session = await stripe.checkout.sessions.create({
      mode: "payment",
      payment_method_types: ["billie"], // Only Billie for this session
      success_url: "https://www.example.com",
      customer: stripeCustomerId,
      payment_intent_data: {
        capture_method: "manual", // start with manual capture
      },
      payment_method_options: {
        //billie: {
        //reference: metadata.external_order_id || metadata.internal_order_id,
        //   request_extended_authorization: "if_available",
        //   company_details: {
        //     registered_name: companyName,
        //     registration_number: registrationNumber,
        //     registered_address: {
        //       line1: billingAddress.address_1,
        //       ...(billingAddress.address_2 && {
        //         line2: billingAddress.address_2,
        //       }),
        //       city: billingAddress.city,
        //       postal_code: billingAddress.postal_code,
        //       country: billingAddress.country_code,
        //     },
        //     vat: metadata.vat_id,
        //     },
        // },
        //},
      },
      line_items: [
        {
          price_data: {
            currency: "eur",
            product_data: { name: "Test Product" },
            unit_amount: 1000,
          },
          quantity: 1,
        },
      ],
    });

the commented out specific data for Billie is the one that I cannot attach. I immediately get a Stripe API error that these keys are not valid

#

Our problem is that Billie is a buy now pay later payment method. An easy workaround would be to use Billie in Stripe payment links. That works, but the problem is that Stripe immediately captures the amount when someone uses the payment link to pay. But with buy now pay later, it shouldn't immediately capture the amount; it should just authorize it. So the state after the payment via the payment link would be uncaptured and not succeeded. Otherwise, the customer will receive an invoice immediately which does not make sense in that case because it would be the customer's only payment method. They would only be charged once the item is shipped to them, which can be several days later

oak tundra
#

Are you using these fields on non-checkout payment intents currently?

#

And if so can you share a payment intent or request ID example?