Simulate a KYC outcome (sandbox only)
Completes the donor's identity-verification step with the outcome you choose, through the same production webhook path. Use it to release a test donor held in review (a test number from +1 202-555-0190 to 0199 always is): passed lets the donor continue in the hosted flow; review and failed keep the donor on the neutral in-review screen, because the hosted flow never tells a donor why, and with failed no account is prepared for the donor. Identify the donor by enrollment_id (from the donor session) or donor_id; one that is not yours, or does not exist, is refused with 400. A donor whose verification already has a final outcome (passed or failed) is not decided again, including one this simulator decided a moment ago whose outcome is still being processed: the request is refused with 400 and nothing is sent, so use a new test donor. status_code echoes what the webhook edge answered.
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 requiredEnrollment of the test donor, from
GET /v1/donor_sessions/{id}orenrollment.created. Send this ordonor_id. - Type: stringdonor
_id Roster identifier of the donor, when you already have it (for example from
donation.updated). Send this orenrollment_id. - Type: "passed" or "review" or "failed"enumoutcome
Identity-verification result to simulate. passed lets the donor continue; review and failed both keep the donor on the in-review screen, and with failed no account is prepared. Defaults to passed.
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/kyc \
--request POST \
--header 'Idempotency-Key: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"enrollment_id": "",
"donor_id": "",
"church_id": "",
"outcome": "passed"
}'
{
"status_code": 1,
"simulated": "ACCEPT"
}