Source: https://datafa.st/docs/paddle-overlay-checkout
Markdown source: https://datafa.st/docs/paddle-overlay-checkout.md
Description: Set up revenue attribution with Paddle Overlay Checkout. Pass DataFast cookies through the inline checkout for accurate attribution.

# Attribute revenue with Paddle Overlay Checkout

← [Revenue attribution guide](/docs/revenue-attribution-guide)

# Attribute revenue with Paddle Overlay Checkout

> Make sure you've [connected your Paddle account](/docs/connect-payment-provider) first.

When using Paddle's Overlay Checkout (inline checkout), pass `customData` with `datafast_visitor_id` and `datafast_session_id` when opening the checkout:

```javascript
// Get DataFast cookies
function getCookie(name) {
  const value = `; ${document.cookie}`;
  const parts = value.split(`; ${name}=`);
  if (parts.length === 2) return parts.pop().split(';').shift();
}

// Open Paddle checkout with DataFast attribution
Paddle.Checkout.open({
  items: [{ priceId: 'pri_01234567890', quantity: 1 }],
  customData: {
    datafast_visitor_id: getCookie('datafast_visitor_id'),
    datafast_session_id: getCookie('datafast_session_id')
  }
});
```
Once connected and custom data is properly passed, DataFast will automatically attribute revenue to the correct marketing channels. **No webhook setup is required**.

## Important notes

- Works with Paddle's inline/overlay checkout experience
- Duplicate payment events are ignored so you don't need to worry about multiple transactions

> After receiving a successful payment, you should see revenue data in your dashboard (referrer, country, browser, etc.).
