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.
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
| Field | Type | Description |
|---|---|---|
event | String | The event, such as PAYMENT_SUCCESS. Every event. |
event_type | String | A display label for the event, such as "Cleared Payment". Every event. |
event_date | String | When Payva built the event, a timestamp. Every event. |
plan_id | String | The order, equal to Order.orderId. Pass it to order. Every event. |
plan_type | String | How you are paid on the order: FUNDING (the UPFRONT route), SERVICING (the PAC route) or PENDING (not decided yet). Every event. |
partner_name | String | Your business name. Every event. |
product_name | String | The product name, or an empty string. Every event. product_parent carries the same name, or null. |
product_option_name | String | The payment option the customer chose, or an empty string. Every event. |
created_at | String | When the order was created, a timestamp. Every event. |
status | String | The new order status, such as ACTIVE, PAID or CANCELED. CONTRACT_STATUS_CHANGE only. |
first_name, last_name, email, phone | String | The customer. phone can be null. Every event except PAYOUT and CONTRACT_STATUS_CHANGE. |
address1, city, state, zipcode, country | String | The customer's address, each null when missing. NEW_PURCHASE, PAYMENT_SUCCESS, PAYMENT_FAILED and PAST_DUE. |
total_amount_financed | String | The amount financed. NEW_PURCHASE, PAYMENT_SUCCESS, PAYMENT_FAILED and PAST_DUE. |
total_repayment_amount | String | What the customer repays in total. Same events as total_amount_financed. |
number_of_payments | String | Payments in the whole plan, as a string. Same events as total_amount_financed. |
payment_frequency | String | D (daily), W (weekly), BW (every two weeks), SM (twice a month), M (monthly) or UNKNOWN. Same events as total_amount_financed. |
payment_method | String | How 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_amount | String | On 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_id | String | The transaction, equal to Transaction.transactionId, or null. PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK, PAYOUT and CLAWBACK. |
payment_date | String | When the transaction was processed, a timestamp. PAYMENT_SUCCESS, PAYMENT_FAILED, PAST_DUE, CHARGEBACK and PAYOUT. |
payment_status | String | PENDING, CLEARED or FAILED. Same events as payment_date. |
payment_status_reason | String | A display label, such as "Cleared". PAYMENT_SUCCESS, PAYMENT_FAILED, CHARGEBACK and CLAWBACK. |
days_past_due | Int | The daysDelay set on your PAST_DUE subscription, as a number. PAST_DUE only. |
clawback_amount, clawback_date, clawback_status | String | The amount taken back (negative), when it was processed (a timestamp), and PENDING, CLEARED or FAILED. CLAWBACK only. |
clawback_method | String | How it was taken back: ACH, Funding, Remittance or UNKNOWN. CLAWBACK only. |
utm_parameters | Object | The 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_by | String | The checkout URL, and who created it: "Payva", a team member's name, or an empty string. Same events as utm_parameters. |
contract_url | String | A link to the Payva portal. NEW_PURCHASE, PAYMENT_SUCCESS and PAYMENT_FAILED. |
checkout_id, client_ip_address | String | The checkout id, or null, and an always-empty string. NEW_PURCHASE only. |
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"
}{
"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
| Field | Type | Description |
|---|---|---|
id | ID! | The endpoint id, a UUID. Pass it to webhookConfig, updateWebhookConfig and deleteWebhookConfig. |
name | String! | Your label for the endpoint. |
url | String! | The HTTPS URL events are posted to. |
active | Boolean! | 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. |
createdAt | DateTime! | When the endpoint was registered. |
updatedAt | DateTime! | When it last changed. |
Example
query Webhooks {
webhookConfigs {
id name url active
eventConfigs { eventType active daysDelay }
}
}{
"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
| Name | Type | Description |
|---|---|---|
id | ID!required | The endpoint id, a UUID. |
Returns
| Field | Type | Description |
|---|---|---|
id | ID! | The endpoint id. |
name | String! | Your label. |
url | String! | The HTTPS URL events are posted to. |
active | Boolean! | 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. |
createdAt | DateTime! | When registered. |
updatedAt | DateTime! | When last changed. |
Example
query WebhookConfig($id: ID!) {
webhookConfig(id: $id) {
id name url active
eventConfigs { eventType active daysDelay }
}
}{
"id": "3b9d6f20-0000-4000-8000-000000000012"
}{
"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
| Name | Type | Description |
|---|---|---|
input.url | String!required | The HTTPS endpoint events are posted to. |
input.name | String | Your label. A name is generated if you omit it. |
input.active | Boolean | Start live (true) or paused (false). Defaults to true. |
input.eventConfigs | [WebhookEventConfigInput!]!required | The events to subscribe to: at least one, and at most one entry per event type. See WebhookEventConfigInput. |
Returns
| Field | Type | Description |
|---|---|---|
id | ID! | The new endpoint's id. |
name | String! | Your label, or the generated one. |
url | String! | The HTTPS URL. |
active | Boolean! | 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 }
}
}{
"input": {
"url": "https://hooks.payva.example/payva",
"name": "Primary",
"eventConfigs": [
{
"eventType": "PAYMENT_SUCCESS",
"active": true
},
{
"eventType": "PAST_DUE",
"active": true,
"daysDelay": 3
}
]
}
}{
"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
| Name | Type | Description |
|---|---|---|
id | ID!required | The endpoint to update. |
input.url | String | A new HTTPS URL. Editing the endpoint resets the automatic switch-off evidence. |
input.name | String | A new label. Editing the endpoint resets the automatic switch-off evidence. |
input.active | Boolean | Switch 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
| Field | Type | Description |
|---|---|---|
id | ID! | The endpoint id. |
name | String! | Your label. |
url | String! | The HTTPS URL. |
active | Boolean! | 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 }
}
}{
"id": "3b9d6f20-0000-4000-8000-000000000013",
"input": {
"active": true,
"eventConfigs": [
{
"eventType": "PAYMENT_SUCCESS",
"active": true
}
]
}
}{
"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
| Name | Type | Description |
|---|---|---|
id | ID!required | The endpoint to delete. |
Returns
| Field | Type | Description |
|---|---|---|
deleteWebhookConfig | Boolean! | True when the endpoint was deleted. |
Example
mutation DeleteWebhook($id: ID!) {
deleteWebhookConfig(id: $id)
}{
"id": "3b9d6f20-0000-4000-8000-000000000013"
}{
"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" }
utm_parameters object.Good to know
utm_parametersis sent onNEW_PURCHASE,PAYMENT_SUCCESS,PAYMENT_FAILED,PAST_DUE,CHARGEBACKandCLAWBACK.PAYOUT,CANCELEDandCONTRACT_STATUS_CHANGEevents don’t include it.- Every value is text. A key that appears more than once in the link is not stored.
productId,productOptionIdandlegacy_linkare reserved and never stored.- Payva can add keys of its own, such as
paymentLinkIdon a payment link, oruserIdwhen 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.
Types
WebhookEventConfigObject
One event type an endpoint is subscribed to.
| Name | Type | Description |
|---|---|---|
eventType | EventType! | Which event. Values below. |
active | Boolean! | When false this event is not delivered, even if the endpoint is active. |
daysDelay | Int | For PAST_DUE only: how many days overdue a payment must be before the event fires. |
createdAt | DateTime! | When the subscription was created. |
updatedAt | DateTime! | 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.
| Name | Type | Description |
|---|---|---|
eventType | EventType! | Which event to subscribe to. |
active | Boolean! | True to deliver this event to the endpoint. |
daysDelay | Int | Days 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.
| Value | Meaning |
|---|---|
NEW_PURCHASE | A customer completed checkout and an order was created. |
PAYMENT_SUCCESS | A scheduled payment cleared. |
PAYMENT_FAILED | A scheduled payment failed. |
PAST_DUE | A payment has been overdue for daysDelay days. |
CONTRACT_STATUS_CHANGE | The order's status changed. A cancellation arrives as this event with status CANCELED. |
CANCELED | The order was canceled. Not sent yet: today a cancellation arrives as CONTRACT_STATUS_CHANGE with status CANCELED. |
CHARGEBACK | A payment was charged back. |
PAYOUT | A payout was sent to you. |
CLAWBACK | A clawback was taken from you. |
INVALID | The stored event type is not valid. Rejected on mutations. |