> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payreque.st/llms.txt
> Use this file to discover all available pages before exploring further.

# Zapier Integration

> Connect PayRequest to thousands of apps and automate payments, subscriptions, and payment links without code.

# Automate PayRequest with Zapier

The official PayRequest integration for Zapier lets you start workflows from successful payments and subscription events. You can also create PayRequest payment links from other apps.

<Info>
  Zapier uses real-time REST Hooks for the new payment and subscription triggers. Your Zap runs as soon as PayRequest records the event; it does not need to wait for a polling interval.
</Info>

## What You Can Automate

<CardGroup cols={2}>
  <Card title="Payment succeeded" icon="money-bill-transfer">
    Run a Zap after a payment is successfully completed in PayRequest.
  </Card>

  <Card title="Subscription created" icon="circle-plus">
    Run a Zap when a subscription is created, including subscriptions that are still pending activation.
  </Card>

  <Card title="Subscription activated" icon="circle-check">
    Run a Zap when a subscription or trial becomes active.
  </Card>

  <Card title="Subscription renewed" icon="arrows-rotate">
    Run a Zap after a subsequent recurring subscription payment succeeds. The initial payment is not reported as a renewal.
  </Card>

  <Card title="Subscription cancelled" icon="circle-xmark">
    Run a Zap when a subscription is cancelled in PayRequest.
  </Card>

  <Card title="Create payment link" icon="link">
    Create an amount-based PayRequest payment link from another Zapier app.
  </Card>
</CardGroup>

You can also use **Find Subscription** to retrieve a subscription by its PayRequest ID.

## Connect Your Account

<Steps>
  <Step title="Open Zapier settings in PayRequest">
    Sign in to PayRequest and open [Settings → Integrations](https://payrequest.app/zapier).
  </Step>

  <Step title="Create a dedicated token">
    Select **Create Zapier token**. PayRequest creates a token with the `billing.read` and `billing.write` permissions required by the integration.

    Copy the token immediately. For security, its value is shown only once.
  </Step>

  <Step title="Open PayRequest in Zapier">
    Select **Open Zapier**, or open the [PayRequest integrations page](https://zapier.com/apps/payrequest/integrations). Create a Zap and choose PayRequest as the trigger or action app.
  </Step>

  <Step title="Connect your PayRequest account">
    When Zapier asks for your PayRequest API token, paste the token you just created. Zapier tests the connection before continuing.
  </Step>

  <Step title="Choose an event and test">
    Select a payment or subscription event. Zapier loads recent PayRequest data so you can map fields into the next step of your workflow.
  </Step>
</Steps>

<Warning>
  Treat the API token like a password. Do not send it by email, place it in a spreadsheet, or paste it into a Zap field other than the PayRequest account connection screen.
</Warning>

## Payment Data

The **Payment succeeded** trigger includes fields such as:

| Field                              | Description                                  |
| ---------------------------------- | -------------------------------------------- |
| Payment ID                         | Unique PayRequest transaction ID             |
| Amount and currency                | Paid decimal amount and ISO currency code    |
| Customer                           | Customer ID, display name, and email address |
| Payment method                     | Method used for the payment                  |
| Payment provider                   | Provider that processed the payment          |
| Paid at                            | ISO 8601 payment timestamp                   |
| Invoice, order, or subscription ID | Related PayRequest record when available     |

PayRequest uses its transaction record as the source of truth for the amount and payment timestamp.

## Subscription Data

Subscription triggers include:

| Field                          | Description                                  |
| ------------------------------ | -------------------------------------------- |
| Subscription ID                | Unique PayRequest subscription ID            |
| Status                         | Current subscription status                  |
| Name and product               | Subscription and product information         |
| Amount, currency, and interval | Recurring billing details                    |
| Customer                       | Customer ID, display name, and email address |
| Next payment at                | Scheduled next billing time, when available  |
| Cancellation details           | Cancellation time and reason, when available |
| Renewal payment ID             | Transaction that caused a renewal event      |

<Tip>
  Use **Subscription created** when you need to prepare work before payment activation. Use **Subscription activated** when the next step should happen only after access or billing becomes active.
</Tip>

## Example Zaps

* Add a customer to your CRM after a successful payment
* Send a Slack or Microsoft Teams message for a new subscription
* Grant course or community access after subscription activation
* Update a customer record after every renewal
* Start an offboarding workflow after cancellation
* Create a PayRequest payment link from a form submission

## Manage Tokens and Connections

The PayRequest **Settings → Integrations** page shows:

* How many active Zap subscriptions are registered
* Which dedicated Zapier tokens exist
* When each token was created and when it expires
* A control to revoke tokens that are no longer used

Existing token values cannot be displayed again. If you lose a token, create a new one, reconnect the PayRequest account in Zapier, and then revoke the old token.

Revoking a token immediately prevents Zapier from accessing PayRequest with that connection. Zaps using it will stop until you reconnect them with a valid token.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Zapier says &#x22;Unauthenticated&#x22;">
    Open **Settings → Integrations**, create a new Zapier token, and reconnect the PayRequest account inside Zapier. Make sure you paste only the token value and do not add `Bearer` before it.
  </Accordion>

  <Accordion title="Zapier cannot pull subscriptions">
    First test the PayRequest account connection in Zapier. If authentication succeeds, make sure the PayRequest account contains at least one subscription that matches the selected trigger. The subscription sample must belong to the same PayRequest business as the token.
  </Accordion>

  <Accordion title="A trigger test returns no records">
    Create or update the relevant record in PayRequest, then test the trigger again. For example, **Subscription cancelled** needs a cancelled subscription to provide a real sample.
  </Accordion>

  <Accordion title="A Zap stopped running after I revoked a token">
    Reconnect the PayRequest account in Zapier with a new token, then update the affected Zaps to use that connection.
  </Accordion>

  <Accordion title="Will the same payment trigger a Zap more than once?">
    Each event includes a stable unique ID. Zapier uses this ID for deduplication, while PayRequest delivers each active REST Hook subscription independently.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="API authentication" icon="key" href="/api/authentication">
    Learn how PayRequest API tokens and permissions work.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api/webhooks">
    Build a direct webhook integration when you need custom code.
  </Card>

  <Card title="Subscription lifecycle" icon="arrows-rotate" href="/subscriptions/subscription-lifecycle">
    Understand subscription statuses and lifecycle events.
  </Card>

  <Card title="Payment links API" icon="link" href="/api/payment-links">
    Create payment links directly through the API.
  </Card>
</CardGroup>
