WebhooksEvent payloads
HelpStatusOpen portal

Webhooks

Webhooks push events to you as they happen: a new purchase, a payment that cleared or failed, a payout, a clawback, an order going past due. Register an HTTPS endpoint, choose the events, and stop polling. Event payloads lists what each event sends.

Event payloads

What Payva sends to your endpoint: one JSON body per event, with snake_case keys. The order is plan_id, a string equal to Order.orderId. There is no orderId key.

Webhook payloads use legacy names and may differ from the API. A new version is coming.

In event names and payloads, "contract" means an order. Every event is a POST, except CONTRACT_STATUS_CHANGE, which is a PUT. The body is JSON, sent with Content-Type: application/json. Deliveries are not signed yet, so do not act on a body alone: take plan_id or transaction_id back to the API (order, transactions) and read the current state first.

Your endpoint has a hard deadline of 35 seconds to finish responding with a 2xx. Receiving part of a response does not extend the deadline. Any other status, a timeout or a network error records the delivery as FAILED in webhookLogs, with no automatic retry. A timeout or network error has a null responseStatusCode. responseBody holds the response or delivery error.

An endpoint is switched off automatically when its last 10 distinct UTC dates with completed delivery attempts contain only 404 responses. Today can count. Dates with no completed attempts are skipped, and a burst of 404s on one date counts as one date. A success, another HTTP status, a timeout or a network error on any date breaks the run. Any endpoint configuration edit resets the evidence, including a URL or name change or reactivation.

Amounts are strings in USD with two decimals, such as "900.00", not numbers. A chargeback or a clawback amount is negative. Dates are ISO 8601 timestamps in UTC. event_date is when Payva built the event; for PAST_DUE that is days before it is sent.

A cancellation arrives as CONTRACT_STATUS_CHANGE with status CANCELED. Text keys such as event_type and payment_status_reason are for display: branch on event and the status keys instead.

Body keys

FieldTypeDescription
eventStringThe event, such as PAYMENT_SUCCESS. Every event.
event_typeStringA display label for the event, such as "Cleared Payment". Every event.
event_dateStringWhen Payva built the event, a timestamp. Every event.
plan_idStringThe order, equal to Order.orderId. Pass it to order. Every event.
plan_typeStringHow you are paid on the order: FUNDING (the UPFRONT route), SERVICING (the PAC route) or PENDING (not decided yet). Every event.
partner_nameStringYour business name. Every event.
product_nameStringThe product name, or an empty string. Every event. product_parent carries the same name, or null.
product_option_nameStringThe payment option the customer chose, or an empty string. Every event.
created_atStringWhen the order was created, a timestamp. Every event.
statusStringThe new order status, such as ACTIVE, PAID or CANCELED. CONTRACT_STATUS_CHANGE only.
first_name, last_name, email, phoneStringThe customer. phone can be null. Every event except PAYOUT and CONTRACT_STATUS_CHANGE.
address1, city, state, zipcode, countryStringThe customer's address, each null when missing. NEW_PURCHASE, PAYMENT_SUCCESS, PAYMENT_FAILED and PAST_DUE.
total_amount_financedStringThe amount financed. NEW_PURCHASE, PAYMENT_SUCCESS, PAYMENT_FAILED and PAST_DUE.
total_repayment_amountStringWhat the customer repays in total. Same events as total_amount_financed.
number_of_paymentsStringPayments in the whole plan, as a string. Same events as total_amount_financed.
payment_frequencyStringD (daily), W (weekly), BW (every two weeks), SM (twice a month), M (monthly) or UNKNOWN. Same events as total_amount_financed.
payment_methodStringHow the customer pays, or how the transaction moved, such as ACH or CC. Can be UNKNOWN. Every event except CONTRACT_STATUS_CHANGE and CLAWBACK.
payment_amountStringOn NEW_PURCHASE, the amount per period. On PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK and PAYOUT, the transaction amount, negative for a chargeback, or null when there is no transaction.
transaction_idStringThe transaction, equal to Transaction.transactionId, or null. PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK, PAYOUT and CLAWBACK.
payment_dateStringWhen the transaction was processed, a timestamp. PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK and PAYOUT.
payment_statusStringPENDING, CLEARED or FAILED. Same events as payment_date.
payment_status_reasonStringA display label, such as "Cleared". PAYMENT_SUCCESS, PAYMENT_FAILED, CHARGEBACK and CLAWBACK.
days_past_dueIntThe daysDelay set on your PAST_DUE subscription, as a number. PAST_DUE only.
clawback_amount, clawback_date, clawback_statusStringThe amount taken back (negative), when it was processed (a timestamp), and PENDING, CLEARED or FAILED. CLAWBACK only.
clawback_methodStringHow it was taken back: ACH, Funding, Remittance or UNKNOWN. CLAWBACK only.
utm_parametersObjectThe query-string parameters from the Payva checkout link, as text values, or {}. See Checkout link parameters. NEW_PURCHASE, PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK and CLAWBACK only.
application_url, application_created_byStringThe checkout URL, and who created it: "Payva", a team member's name, or an empty string. Same events as utm_parameters.
contract_urlStringA link to the Payva portal. NEW_PURCHASE, PAYMENT_SUCCESS and PAYMENT_FAILED.
checkout_id, client_ip_addressStringThe checkout id, or null, and an always-empty string. NEW_PURCHASE only.

Example

Example
{
  "event": "PAYMENT_SUCCESS",
  "event_type": "Cleared Payment",
  "event_date": "2026-07-15T14:02:11.000Z",
  "plan_id": "100235",
  "plan_type": "FUNDING",
  "partner_name": "Example Merchant",
  "product_name": "Studio membership, 12 months",
  "product_option_name": "12 monthly payments",
  "product_parent": "Studio membership, 12 months",
  "created_at": "2026-03-14T16:02:00.000Z",
  "first_name": "Biscuit",
  "last_name": "Wigglesworth",
  "email": "[email protected]",
  "phone": "+12125550142",
  "address1": "123 Example St",
  "city": "Springfield",
  "state": "TX",
  "zipcode": "00000",
  "country": "US",
  "total_amount_financed": "9000.00",
  "number_of_payments": "10",
  "payment_frequency": "M",
  "total_repayment_amount": "9000.00",
  "transaction_id": "6d0b5e3a-0000-4000-8000-000000004471",
  "payment_amount": "900.00",
  "payment_date": "2026-07-14T00:00:00.000Z",
  "payment_status": "CLEARED",
  "payment_method": "ACH",
  "payment_status_reason": "Cleared",
  "utm_parameters": {},
  "application_url": "https://checkout.payva.example/payment/7Qm4Z",
  "application_created_by": "Payva",
  "contract_url": "https://app.payva.example"
}
Response
{
  "received": true
}

webhookConfigsQuery

Your webhook endpoints, oldest first, each with the events it is subscribed to.

An endpoint is switched off automatically when its last 10 distinct UTC dates with completed delivery attempts contain only 404 responses. Today can count. Dates with no completed attempts are skipped, and a burst of 404s on one date counts as one date. A success, another HTTP status, a timeout or a network error on any date breaks the run. Any endpoint configuration edit resets the evidence, including a URL or name change or reactivation. Fix the URL and set active back to true with updateWebhookConfig.

POST/graphql

webhookConfigs: [WebhookConfig!]!

Arguments

None.

Returns

FieldTypeDescription
idID!The endpoint id, a UUID. Pass it to webhookConfig, updateWebhookConfig and deleteWebhookConfig.
nameString!Your label for the endpoint.
urlString!The HTTPS URL events are posted to.
activeBoolean!The master switch. When false nothing is delivered, whatever the per-event settings say. Automatically switched off when the last 10 active UTC delivery dates contain only 404s. See webhookConfigs for the full rule.
eventConfigs[WebhookEventConfig!]!One entry per subscribed event type. Fields below.
createdAtDateTime!When the endpoint was registered.
updatedAtDateTime!When it last changed.

Example

query Webhooks {
  webhookConfigs {
    id name url active
    eventConfigs { eventType active daysDelay }
  }
}
Response
{
  "data": {
    "webhookConfigs": [
      {
        "id": "3b9d6f20-0000-4000-8000-000000000012",
        "name": "Primary",
        "url": "https://hooks.payva.example/payva",
        "active": true,
        "eventConfigs": [
          {
            "eventType": "PAYMENT_SUCCESS",
            "active": true,
            "daysDelay": null
          },
          {
            "eventType": "PAST_DUE",
            "active": true,
            "daysDelay": 3
          }
        ]
      }
    ]
  }
}

webhookConfigQuery

Fetch one webhook endpoint by id, with its event subscriptions. Null when the id isn’t found on your account.

Use it to check an endpoint's state after a delivery problem. An endpoint can be switched off automatically when its last 10 active UTC delivery dates contain only 404s. See webhookConfigs for the full rule. Editing the endpoint resets the evidence.

POST/graphql

webhookConfig(id: ID!): WebhookConfig

Arguments

NameTypeDescription
idID!requiredThe endpoint id, a UUID.

Returns

FieldTypeDescription
idID!The endpoint id.
nameString!Your label.
urlString!The HTTPS URL events are posted to.
activeBoolean!The master switch. Automatically switched off when the last 10 active UTC delivery dates contain only 404s. Editing the endpoint resets the evidence. See webhookConfigs for the full rule.
eventConfigs[WebhookEventConfig!]!The subscriptions.
createdAtDateTime!When registered.
updatedAtDateTime!When last changed.

Example

query WebhookConfig($id: ID!) {
  webhookConfig(id: $id) {
    id name url active
    eventConfigs { eventType active daysDelay }
  }
}
Variables
{
  "id": "3b9d6f20-0000-4000-8000-000000000012"
}
Response
{
  "data": {
    "webhookConfig": {
      "id": "3b9d6f20-0000-4000-8000-000000000012",
      "name": "Primary",
      "url": "https://hooks.payva.example/payva",
      "active": true,
      "eventConfigs": [
        {
          "eventType": "PAYMENT_SUCCESS",
          "active": true,
          "daysDelay": null
        }
      ]
    }
  }
}

createWebhookConfigMutation

Register an HTTPS endpoint and the events it should receive. Returns the new endpoint.

Omit name and one is generated. Omit active and the endpoint starts live. PAST_DUE needs a daysDelay between 1 and 21; no other event accepts one.

POST/graphql

createWebhookConfig(input: CreateWebhookConfigInput!): WebhookConfig!

Arguments

NameTypeDescription
input.urlString!requiredThe HTTPS endpoint events are posted to.
input.nameStringYour label. A name is generated if you omit it.
input.activeBooleanStart live (true) or paused (false). Defaults to true.
input.eventConfigs[WebhookEventConfigInput!]!requiredThe events to subscribe to: at least one, and at most one entry per event type. See WebhookEventConfigInput.

Returns

FieldTypeDescription
idID!The new endpoint's id.
nameString!Your label, or the generated one.
urlString!The HTTPS URL.
activeBoolean!The master switch. Automatically switched off when the last 10 active UTC delivery dates contain only 404s. Editing the endpoint resets the evidence. See webhookConfigs for the full rule.
eventConfigs[WebhookEventConfig!]!The subscriptions as saved.

Example

mutation CreateWebhook($input: CreateWebhookConfigInput!) {
  createWebhookConfig(input: $input) {
    id name url active eventConfigs { eventType active daysDelay }
  }
}
Variables
{
  "input": {
    "url": "https://hooks.payva.example/payva",
    "name": "Primary",
    "eventConfigs": [
      {
        "eventType": "PAYMENT_SUCCESS",
        "active": true
      },
      {
        "eventType": "PAST_DUE",
        "active": true,
        "daysDelay": 3
      }
    ]
  }
}
Response
{
  "data": {
    "createWebhookConfig": {
      "id": "3b9d6f20-0000-4000-8000-000000000013",
      "name": "Primary",
      "url": "https://hooks.payva.example/payva",
      "active": true,
      "eventConfigs": [
        {
          "eventType": "PAYMENT_SUCCESS",
          "active": true,
          "daysDelay": null
        },
        {
          "eventType": "PAST_DUE",
          "active": true,
          "daysDelay": 3
        }
      ]
    }
  }
}

updateWebhookConfigMutation

Partially update an endpoint. Omit eventConfigs to leave subscriptions alone, or pass a list of at least one to replace them. Returns the endpoint.

The eventConfigs rule is the one to remember: the list you send replaces the whole subscription list, so include every event you still want. To unsubscribe from one event, send its entry with active: false. An empty list is refused; to stop every delivery, set the endpoint's active to false or delete it. Any endpoint configuration edit resets the automatic switch-off evidence, including URL or name changes and reactivation.

POST/graphql

updateWebhookConfig(id: ID!, input: UpdateWebhookConfigInput!): WebhookConfig!

Arguments

NameTypeDescription
idID!requiredThe endpoint to update.
input.urlStringA new HTTPS URL. Editing the endpoint resets the automatic switch-off evidence.
input.nameStringA new label. Editing the endpoint resets the automatic switch-off evidence.
input.activeBooleanSwitch the endpoint on or off. Set true to reactivate it after the last 10 active UTC delivery dates rule. Reactivation resets the evidence.
input.eventConfigs[WebhookEventConfigInput!]Replaces the whole subscription list, at least one entry. Omit it to keep the current one. To unsubscribe from an event, send its entry with active: false.

Returns

FieldTypeDescription
idID!The endpoint id.
nameString!Your label.
urlString!The HTTPS URL.
activeBoolean!The master switch. Automatically switched off when the last 10 active UTC delivery dates contain only 404s. Editing the endpoint resets the evidence. See webhookConfigs for the full rule.
eventConfigs[WebhookEventConfig!]!The current subscriptions.

Example

mutation UpdateWebhook($id: ID!, $input: UpdateWebhookConfigInput!) {
  updateWebhookConfig(id: $id, input: $input) {
    id url active eventConfigs { eventType active }
  }
}
Variables
{
  "id": "3b9d6f20-0000-4000-8000-000000000013",
  "input": {
    "active": true,
    "eventConfigs": [
      {
        "eventType": "PAYMENT_SUCCESS",
        "active": true
      }
    ]
  }
}
Response
{
  "data": {
    "updateWebhookConfig": {
      "id": "3b9d6f20-0000-4000-8000-000000000013",
      "url": "https://hooks.payva.example/payva",
      "active": true,
      "eventConfigs": [
        {
          "eventType": "PAYMENT_SUCCESS",
          "active": true
        }
      ]
    }
  }
}

deleteWebhookConfigMutation

Delete an endpoint. Its delivery history stays in webhookLogs. Returns true.

Deliveries already queued for the endpoint are not sent. The history stays readable in webhookLogs under the endpoint's old id.

POST/graphql

deleteWebhookConfig(id: ID!): Boolean!

Arguments

NameTypeDescription
idID!requiredThe endpoint to delete.

Returns

FieldTypeDescription
deleteWebhookConfigBoolean!True when the endpoint was deleted.

Example

mutation DeleteWebhook($id: ID!) {
  deleteWebhookConfig(id: $id)
}
Variables
{
  "id": "3b9d6f20-0000-4000-8000-000000000013"
}
Response
{
  "data": {
    "deleteWebhookConfig": true
  }
}

Checkout link parameters

Add your own query-string parameters to a Payva checkout link, and Payva sends them back to you in the utm_parameters object of that order’s webhooks.

Use this to tie a Payva order back to your own records, such as a campaign, an affiliate or an ID from your own system. Add the parameters to any Payva product link or payment link:

https://app.payva.com/checkout/overview/Ex4mpl3Lnk?orderid=A-1001&utm_source=newsletter

When your customer completes checkout, Payva stores the parameters with the order. Every webhook for that order that carries utm_parameters then includes them:

"utm_parameters": { "orderid": "A-1001", "utm_source": "newsletter" }

Only Payva checkout links pass parameters through. If you sell through a partner platform, checkouts that start on the platform don’t, and their webhooks carry an empty utm_parameters object.

Good to know

  • utm_parameters is sent on NEW_PURCHASE, PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK and CLAWBACK. PAYOUT, CANCELED and CONTRACT_STATUS_CHANGE events don’t include it.
  • Every value is text. A key that appears more than once in the link is not stored.
  • productId, productOptionId and legacy_link are reserved and never stored.
  • Payva can add keys of its own, such as paymentLinkId on a payment link, or userId when a team member shared the link.
  • Parameters are saved as they were at checkout and can’t be changed afterwards. The Merchant API doesn’t return them today; they arrive only in webhooks.
Your customer can see and edit the link, so never put anything secret in a parameter, and check any value against your own records before you act on it.

Types

WebhookEventConfigObject

One event type an endpoint is subscribed to.

NameTypeDescription
eventTypeEventType!Which event. Values below.
activeBoolean!When false this event is not delivered, even if the endpoint is active.
daysDelayIntFor PAST_DUE only: how many days overdue a payment must be before the event fires.
createdAtDateTime!When the subscription was created.
updatedAtDateTime!When it last changed.

WebhookEventConfigInputInput

An input type: one entry in eventConfigs on create and update. At most one entry per event type; a duplicate is refused with INVALID_REQUEST.

NameTypeDescription
eventTypeEventType!Which event to subscribe to.
activeBoolean!True to deliver this event to the endpoint.
daysDelayIntDays a payment must be overdue before PAST_DUE fires, 1 to 21. Required for PAST_DUE; refused for every other event type.

EventTypeEnum

A contract in an event name is an order.

ValueMeaning
NEW_PURCHASEA customer completed checkout and an order was created.
PAYMENT_SUCCESSA scheduled payment cleared.
PAYMENT_FAILEDA scheduled payment failed.
PAST_DUEA payment has been overdue for daysDelay days.
CONTRACT_STATUS_CHANGEThe order's status changed. A cancellation arrives as this event with status CANCELED.
CANCELEDThe order was canceled. Not sent yet: today a cancellation arrives as CONTRACT_STATUS_CHANGE with status CANCELED.
CHARGEBACKA payment was charged back.
PAYOUTA payout was sent to you.
CLAWBACKA clawback was taken from you.
INVALIDThe stored event type is not valid. Rejected on mutations.