#Jonas Reif

1 messages · Page 1 of 1 (latest)

shell jasperBOT
gray bay
#

Hi there!

thorn coral
#

Hi there 🙂

gray bay
#

Give me a few minutes to look into this.

thorn coral
#

Thanks🙌

gray bay
thorn coral
#

Do show you the complete Checkout::Session creating:

    @checkout_session ||= Stripe::Checkout::Session.create(
        success_url: success_url,
        cancel_url: cancel_url,
        mode: "payment",
        customer_email: email,
        expires_at: Time.now.to_i + (3600 * 2),
        after_expiration: {
          recovery: {
            enabled: true
          }
        },
        invoice_creation: {
          enabled: true,
          invoice_data: {
            description: "XXX",
            metadata: { order: order_id },
            custom_fields: [{ name: "Bestellnummer", value: order_id }],
            rendering_options: { amount_tax_display: "exclude_tax" },
            footer: "XXX"
          }
        },
        line_items: [{ price: price_id, quantity: 1 }],
        payment_method_types: %w[card paypal sepa_debit sofort klarna],
        allow_promotion_codes: allow_promotion_codes,
        discounts: [{
          coupon: discount_coupon
        }],
        payment_method_options: {
          klarna: {
            setup_future_usage: "none"
          },
          sofort: {
            setup_future_usage: "none"
          }
        },
        billing_address_collection: "required",
        automatic_tax: { enabled: true },
        tax_id_collection: { enabled: true },
        client_reference_id: order_id,
        metadata: {
          **metadata,
          affiliate_id: affiliate_id,
          price_id: price_id,
          order_id: order_id
        },
        payment_intent_data: {
          setup_future_usage: "off_session",
          metadata: {
            **metadata,
            affiliate_id: affiliate_id,
            order_id: order_id,
            price_id: price_id
          }
        }
      )
    end
#

yes thats the checkout session

#

I then receive the checkout.session.expired webhook with following data:

gray bay
#

And when the Checkout Session was created, was the url working as expected? Or was there the same error message?

thorn coral
#
{
  "id": "evt_1MOK3xAHqm7DWpwQzH6HAJc3",
  "object": "event",
  "api_version": "2019-03-14",
  "created": 1673265768,
  "data": {
    "object": {
      "id": "cs_test_b1UfKgztnaJUMJ6cx2p1FKGkrx4BS1nOQStDR8bvb7svMSYmb2RanJeHgy",
      "object": "checkout.session",
      "after_expiration": {
        "recovery": {
          "allow_promotion_codes": false,
          "enabled": true,
          "expires_at": 1675857768,
          "url": "https://buy.stripe.com/r/test_YWNjdF8xRWJsV0JBSHFtN0RXcHdRLF9OOGJHTjhIQktDZzFOMjUzQlhvNnQ0TllNY1RsZ0hp0100aVG0ihci"
        }
      },
      ...
  "type": "checkout.session.expired"
}
#

And when the Checkout Session was created, was the url working as expected? Or was there the same error message?
Yes. It was working and I made the payment.

gray bay
#

Why are you talking about Payment Links? You are not creating a Payment Link, but a Checkout Session.

thorn coral
#

I thought that this might be a kind of a payment link behind the scenes

#

You know what I mean?

gray bay
#

Yes, I agree this error is strange. Still looking into this.

thorn coral
#

Thanks🙌

cosmic siren
#

This looks like a bug as far as we can see. I will work to recreate it and report it. If you want, you can create a ticket with us and I can keep you updated on the fix. If you wan t to do that you can write an email in to our support team (it can just be your first message and mentioning talking to us on our Discord), and DM me with your email address. https://support.stripe.com/?contact=true

thorn coral
#

Thanks for the update.
Alright, that would be great.

I will create a ticket.

Sent my email via DM

Thanks for your time and help! 🙂

cosmic siren
#

Thank you, grabbed the ticket and will get back to you with what I can find.