Onboarding
Cancel Onboarding
Close a running onboarding before it finishes
POST
/
customers
/
api
/
onboarding
/
{customer}
/
cancel
curl -X POST "https://api.trusset.org/customers/api/onboarding/client-48213/cancel" \
-H "X-API-Key: trusset_your_key_here"
const response = await fetch(
'https://api.trusset.org/customers/api/onboarding/client-48213/cancel',
{ method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await response.json();
console.log(data.cancelled, data.onboarding.status);
{
"data": {
"cancelled": true,
"onboarding": {}
}
}Closes a running onboarding. Use it when a customer abandons verification, or before you start again under another profile or provider.
An onboarding that is not running answers
| Onboarding | Cancel |
|---|---|
TRUSSET, check open and not yet approved | Revokes the identity check. A review that arrives later changes nothing |
TRUSSET, AWAITING_SIGNATURE for the registration | Dismisses the registration from the pending queue, so it can no longer be signed |
KYC_SOURCE, no record delivered yet | Stops waiting for the record |
| Any other running onboarding | Refused with 409 CANNOT_CANCEL |
200 with cancelled: false and stays as it is. Cancelling removes nothing from a register: an identity your wallet already registered stays until you revoke it with Revoke Identity.
A cancelled identity check reads EXPIRED afterwards, with reason.code CHECK_CANCELLED or REGISTRATION_DISMISSED. Start Onboarding opens a new one.
Path Parameters
The customer
id, your externalId, the reference key or a wallet address of the customer.Response Fields
curl -X POST "https://api.trusset.org/customers/api/onboarding/client-48213/cancel" \
-H "X-API-Key: trusset_your_key_here"
const response = await fetch(
'https://api.trusset.org/customers/api/onboarding/client-48213/cancel',
{ method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await response.json();
console.log(data.cancelled, data.onboarding.status);
Error Codes
| Code | HTTP | Cause |
|---|---|---|
CUSTOMER_NOT_FOUND | 404 | No customer of your instance matches customer |
CANNOT_CANCEL | 409 | The identity check was submitted through the hosted page or approved, the identity is registered, or a sealed record was delivered. Reject a delivered record with Decide Record |
RATE_LIMIT_EXCEEDED | 429 | More than 120 onboarding writes in the minute |
ONBOARDING_CANCEL_FAILED | 500 | The cancel failed on the server |
⌘I
curl -X POST "https://api.trusset.org/customers/api/onboarding/client-48213/cancel" \
-H "X-API-Key: trusset_your_key_here"
const response = await fetch(
'https://api.trusset.org/customers/api/onboarding/client-48213/cancel',
{ method: 'POST', headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await response.json();
console.log(data.cancelled, data.onboarding.status);
{
"data": {
"cancelled": true,
"onboarding": {}
}
}