Simulate the payroll vendor confirming the deduction removal (sandbox only)
After a donor cancels, Roster opens a removal session with the payroll vendor; the removal is confirmed by the vendor's own webhook. This simulator plays the vendor: it delivers the confirmation (or, with outcome: "error", the failure) through the same production webhook path. Prerequisites, checked before anything is sent: the enrollment is cancel_pending, and the removal session this simulator confirms is open — cancelling opens it; if that failed, the donor's "Finish turning it off" (data-action="finish-disconnect") in the hosted manage screen opens it again. Otherwise 400 says which one is missing. An enrollment whose paycheck was never connected has no deduction to remove: its cancellation completes on its own (wait for enrollment.cancelled), and this simulator answers 400. Use it in scripts and CI; by hand, the donor's "Finish turning it off" in the hosted sandbox manage screen opens the removal in the payroll provider's window in its test mode.
Headers
- Type: stringIdempotency
- Key min length:1max length:255requiredRequired on every POST, before any effect: 1–255 visible ASCII characters, no spaces. The key belongs to the first body sent with it on this operation for 30 days from the moment that request arrives, including while that request is running and after a
5xxor a timeout. On an operation that creates a resource (POST /v1/churches,POST /v1/churches/import,POST /v1/church_consents,POST /v1/donor_sessions,POST /v1/manage_sessions,POST /v1/refundsandPOST /v1/webhook_endpoints), a key whose request succeeded keeps its body for as long as the resource it created exists. A creation replayed with the same key and body returns the original resource with200and changes nothing; a4xxreleases the key.
Body
- Type: stringchurch
_id requiredRoster identifier of the church this record belongs to.
- Type: stringenrollment
_id requiredIdentifier of the recurring giving arrangement; links its individual donations over time.
- Type: "success" or "error"enumoutcome
Payroll provider result to simulate. success confirms the deduction was removed; error simulates the provider failing to remove it. Defaults to success.
Responses
- application/json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
curl https://api.sandbox.rostergiving.com/sandbox/simulate/payroll-disconnected \
--request POST \
--header 'Idempotency-Key: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"enrollment_id": "",
"church_id": "",
"outcome": "success"
}'
{
"status_code": 1,
"expected_event": null
}