Skip to main content

JavaScript Snippets

PayRequest doesnโ€™t have a general-purpose custom JavaScript field (no place to paste in Google Analytics, Meta Pixel, or a custom tracking script that runs on your shop or payment pages). What does exist today is a copy-paste embed snippet for Smart Links, which puts a โ€œbuy buttonโ€ on your own website.
If youโ€™re looking for third-party analytics/tracking injection on your PayRequest Page or shop, that isnโ€™t available yet. This page covers the embeddable Smart Link button, which is the closest existing feature.

Embeddable Buy Buttons

Every Smart Link can generate an embed snippet โ€” a small HTML block (a stylesheet link plus a styled <a> button) that you paste into your own website to link straight to that Smart Linkโ€™s checkout.
1

Open a Smart Link

Go to Smart Links, and open the one you want to embed.
2

Find the embed section

Scroll to Embed button on your website.
3

Pick a style

Choose between Default, Dark, or Outline button styles.
4

Copy the snippet

Click to copy โ€” itโ€™s a <link> tag pulling PayRequestโ€™s button stylesheet plus an <a> tag styled as a button, linking to your Smart Link URL.
5

Paste it into your site

Drop the snippet into your websiteโ€™s HTML wherever you want the buy button to appear.
This is a plain HTML link styled as a button โ€” thereโ€™s no JavaScript to configure, and nothing to maintain beyond pasting the snippet once. If you change the Smart Linkโ€™s price or product later, the embedded button keeps working since it just links to the Smart Link URL.

Tracking Conversions Elsewhere

Since thereโ€™s no native pixel/analytics field, two practical options if you need to track conversions from PayRequest payments on your own site or ad platform:
  • Webhooks: Use the payment.succeeded webhook to fire your own server-side conversion event when a payment completes.
  • On-success redirect: Some Smart Link configurations support an on-success action/URL โ€” if yours redirects to a page on your own domain after payment, you can place tracking scripts on that landing page itself.

FAQ

Not as a built-in settings field today. The most reliable way to track conversions is the payment.succeeded webhook, handled server-side.
Not currently โ€” Default, Dark, and Outline are the available styles.

Next Steps

Smart Links

Create and manage the links you can embed

Webhook Configuration

Track payments server-side instead of client-side