Webhook Events
recurringPayment.created
Occurs when a recurring payment is created.
Example recurringPayment.created payload:
{
"data": [
{
"id": "360",
"type": "recurringPayment.created",
"attributes": {
"createdAt": "2022-06-25T14:27:41.093Z",
"amount": 1000,
"description": "Monthly Subscription",
"status": "Active"
},
"relationships": {
"recurringPayment": {
"data": {
"id": "4",
"type": "recurringPayment"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
}
}
}
]
}
recurringPayment.failed
Occurs when a payment creation from a recurring payment has failed.
The event includes:
| Attribute | Type | Description |
|---|---|---|
| createdAt | Request for Comments (RFC) 3339 Date string | The date the event was created. |
| amount | integer | The payment amount (in cents). |
| tags | object | See Tags. |
| error | string | The JSON-serialized error that caused the failure. |
| Relationship | Type | Description |
|---|---|---|
| recurringPayment | JSON:API Relationship | The recurring payment. Resource type: recurringPayment. |
| account | JSON:API Relationship | The account of the recurring payment. Resource type: account. |
| customer | JSON:API Relationship | The customer the account belongs to. Resource type: customer. |
| payment | JSON:API Relationship | Optional. The related payment. Resource type: payment. |
Example recurringPayment.failed payload:
{
"data": [
{
"id": "100",
"type": "recurringPayment.failed",
"attributes": {
"createdAt": "2022-06-11T11:40:58.708Z",
"amount": 200,
"tags": {},
"error": "{\"title\":\"User is not allowed to create a payment\",\"status\":\"403\"}"
},
"relationships": {
"recurringPayment": {
"data": {
"id": "24",
"type": "recurringPayment"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"id": "10004",
"type": "customer"
}
},
"payment": {
"data": {
"id": "22",
"type": "payment"
}
}
}
}
]
}
recurringPayment.statusChanged
Occurs when a recurring payment status has been changed. See Recurring Payment Statuses.
The event includes:
| Attribute | Type | Description |
|---|---|---|
| createdAt | RFC3339 Date string | The date the event was created. |
| previousStatus | string | The recurring payment status before the change. |
| status | string | The recurring payment status after the change. |
| numberOfPayments | integer | The number of payments. |
| nextScheduledAction | date (YYYY-MM-DD) | Optional. The next scheduled date of the recurring payment. |
Example recurringPayment.statusChanged payload:
{
"data": [
{
"id": "359",
"type": "recurringPayment.statusChanged",
"attributes": {
"createdAt": "2022-06-25T14:23:26.785Z",
"previousStatus": "Active",
"status": "Disabled",
"numberOfPayments": 2,
"nextScheduledAction": "2022-07-25"
},
"relationships": {
"recurringPayment": {
"data": {
"id": "2",
"type": "recurringPayment"
}
},
"account": {
"data": {
"type": "account",
"id": "10001"
}
}
}
}
]
}
Related Payment Events
When a recurring payment triggers and creates an actual payment (ACH or Book), the following events may fire depending on the payment type:
- payment.created - When the payment is created
- payment.sent - When the payment is sent (ACH)
- payment.rejected - If the payment is rejected
- payment.returned - If the ACH payment is returned
- transaction.created - When the transaction is created