Skip to main content

Webhooks

AccruPay sits between your application and the payment providers you use. Providers send webhook events to AccruPay; AccruPay processes those events and updates its internal transaction state. AccruPay does not forward those events to your servers.


How it works

Provider ──► AccruPay (inbound webhook) ──► transaction state updated internally

└─ your app reads via API
  1. A provider event arrives at AccruPay's webhook endpoint.
  2. AccruPay validates the event, matches it to the relevant transaction or payment plan, and updates the record.
  3. Your application reads the updated state via the GraphQL API.

Provider webhook URL

Each transaction provider configured in AccruPay has a dedicated inbound webhook URL. Find it in the AccruPay dashboard under your provider settings, then configure that URL in your provider's dashboard.

Do not share or modify this URL. AccruPay uses it to validate that events are genuine before updating any records.


How merchants see state changes

Because AccruPay has no outbound webhook delivery to merchant servers, you have three options for staying in sync:

1. Call syncOne() on demand

Trigger a manual re-sync with the provider for a specific transaction:

mutation SyncTransaction {
merchantApiTransactionSyncOne(
merchantTransactionProviderId: "provider-id"
id: "transaction-id"
) {
id
status
updatedAt
}
}

Use this when you expect a state change and want to confirm it immediately — for example, after a provider operation that settles asynchronously like ACH.

2. Poll merchantApiTransaction

Fetch the current state of a transaction by ID or your internal transaction code:

query GetTransaction {
merchantApiTransaction(id: "transaction-id") {
id
status
providerCode
updatedAt
}
}

Implement a polling loop in your backend when waiting for a terminal status on asynchronous payment types.

3. Build your own notification layer

If you need real-time notifications in your application, build them on top of AccruPay's API:

  • Schedule a periodic job that calls syncOne() or queries pending transactions.
  • When you detect a status change, trigger your own internal event, email, or webhook to the relevant part of your system.

note

AccruPay has no outbound webhook delivery to merchant servers. Use syncOne() if you need to force a state update from the provider, or poll merchantApiTransaction to detect changes.


What events AccruPay processes

Providers send different event types depending on payment method and operation. Common categories include:

Event categoryEffect on AccruPay record
Authorization approvedTransaction status set to STARTED or SUCCEEDED
Settlement / captureTransaction status set to SUCCEEDED
DeclineTransaction status set to DECLINED
Refund processedTransaction status updated; refund child record created
ACH settlementTransaction status set to SUCCEEDED (timing is provider-specific — see ACH settlement windows below)
ACH returnTransaction status set to FAILED or DECLINED
Plan renewal chargedNew transaction created under the plan
Plan cancelled at providerPlan status set to CANCELED
ACH settlement webhook timing
Nuvei

ACH settlement webhooks arrive 1–5 business days after initiation, depending on SEC code and bank schedule.

Other providers

ACH settlement timing varies by provider and ACH tier. Consult your provider's documentation for expected webhook delivery windows.