#Vinz

1 messages · Page 1 of 1 (latest)

languid turtleBOT
tranquil obsidian
native portal
#

We likely cannot help with that here. This chat is focused on developers and API integration questions for Stripe products specifically.

tranquil obsidian
#
    <!-- Event snippet for Example conversion page -->
    <script>
     gtag('event', 'conversion', {'send_to': 'AW-123456789/AbC-D_efG-h12_34-567',
      'value': 1.0,
      'currency': 'USD',
      'transaction_id': '<%= orderId %>',
     });
    </script>
#

Yes but just listen to me

#

Hi want to insert it on the sucess page

#

so I need to insert a bunch of code depending on the checkout transaction in the success page

#

here is how I build the checkout session

        if customer_id:
            checkout_session = stripe.checkout.Session.create(
                line_items=line_items,
                customer=customer_id,
                success_url=settings.SITE_URL + reverse('transactions:success_url'),
                cancel_url=settings.SITE_URL + reverse('transactions:cancel_url'),
                payment_method_types=["card"],
                mode='payment',
                billing_address_collection='required',
            )
        else:
            checkout_session = stripe.checkout.Session.create(
                line_items=line_items,
                customer_email=request.user.email,
                success_url=settings.SITE_URL + reverse('transactions:success_url'),
                cancel_url=settings.SITE_URL + reverse('transactions:cancel_url'),
                payment_method_types=["card"],
                mode="payment",
                billing_address_collection='required',
            )
#

What would you advise to get a success page that has a parameter with the checkout session id ?

#

@native portal my question is about stripe not google ads especially

native portal
tranquil obsidian
#

Exactly what I needed