---
title: "Reading results: did the call work?"
url: "https://platformdocs.coinme.com/agents/results.md"
markdown: "https://platformdocs.coinme.com/agents/results.md"
summary: "How to tell whether a Coinme call succeeded: why HTTP 200 is not success, the error envelope, what each common error code asks you to do (fix the request, retry, clean up, or stop and ask), lifetimes and limits, confirming by reading back, what reruns collide with, and what to send your Coinme integration contact when something fails."
---

# Reading results: did the call work?

**HTTP 200 does not mean success.** Most Coinme services answer a refused request with HTTP 200 and the error in the body. Judge every call by its body: it succeeded only when the body has `data` and carries no error in any of the shapes below. A 2xx with neither is not a success either; treat it as unknown and confirm by reading back.

The SDKs and the CaaS API clients already apply this rule and turn an error body into a rejected promise or an error result. It matters most when you call an endpoint yourself with `fetch`, or put a proxy of your own between an SDK and Coinme.

<a id="success"></a>

## Success, and the shapes of an error

An error body takes one of three shapes:

- `{ "errorResponse": { "httpStatus": "200", "path": "…", "errorData": [{ "errorCode": "203-400-115-009", "message": "…" }] } }`, the usual envelope;
- `{ "errorData": [ … ] }`, the same list without the envelope;
- `{ "errors": [ … ] }`, which some services send when something behind them failed.

A classifier you can copy, for a call made with `fetch`:

```ts
type Outcome =
  | { ok: true; data: unknown }
  | { ok: false; status: number; errorCode?: string; message?: string };

// Judge a Coinme response by its body, never by its status alone.
export const readCoinmeResponse = async (response: Response): Promise<Outcome> => {
  const text = await response.text();
  let body: any;
  try {
    body = text === '' ? undefined : JSON.parse(text);
  } catch {
    body = undefined;
  }
  const errors =
    body?.errorResponse?.errorData ?? body?.errorData ?? body?.errors;
  if (Array.isArray(errors) && errors.length > 0) {
    const [first] = errors;
    return {
      ok: false,
      status: response.status,
      errorCode: first?.errorCode,
      message: first?.message,
    };
  }
  if (!response.ok || body?.data === undefined) {
    return { ok: false, status: response.status };
  }
  return { ok: true, data: body.data };
};
```

<a id="codes"></a>

## What an error code asks you to do

An error code is four groups of digits, such as `203-400-115-009`. The second group is an HTTP-style status (`400`, `404`, `406`, `500`) even when the response itself was HTTP 200, so it is the quickest hint at the kind of failure. Match on the whole code, not on the message: messages are written for people and can mislead, as the phone-check example below shows.

<a id="fix-the-request"></a>

### Fix the request

Retrying the same request gives the same answer. Compare the request with the guide, field by field and header by header, change it, and only then send it again.

| Code | From | Meaning |
| --- | --- | --- |
| `101-406-359-667` | Session tag (Risk SDK) | A required parameter is missing, which is also what a header under the wrong name looks like. Check every header name against the guide exactly. |
| `143-404-317-704` | Session tag (Risk SDK) | Coinme does not know the partner ID the request sent. |
| `203-400-115-009` | Phone verification check | The code was not accepted. A wrong code gives it, and so does a right code sent under the wrong field name: the check reads the code only from `phoneValidationCode`. Before asking the human for another code, check the request body. |
| `203-404-359-227` | Vault payment-method submit | The session tag sent with the card does not match the one Coinme stored for this customer and device. Mint the tag on the same device the card is submitted from, with the partner ID your partner access token carries (`metadata.PartnerId`), and send that device's fingerprint unchanged on both calls. |

<a id="refresh-and-retry"></a>

### Refresh what expired and retry once

Fetch a fresh token, session tag or code, then retry the call once. If the retry fails the same way, stop and ask.

| Code | From | Meaning |
| --- | --- | --- |
| HTTP `401` or `403` | Any call with a Transient Auth Token | The token is missing, expired, or minted for another customer or scope. Mint a new one on the backend for the right customer and scope. |
| `101-500-359-000`, `270-500-203-604`, `206-500-100-999` | Session tag, onboarding | A general server error. Retry once; when it repeats, check the request for values the SDK did not produce (an edited device fingerprint, for example), then send the details listed under "What to send" to your Coinme integration contact. |

<a id="clean-up"></a>

### Clean up, or use a fresh record

These say an earlier attempt already happened. Do not resubmit the same thing; reuse the earlier result, or start from a record nothing has used.

| Code | From | Meaning |
| --- | --- | --- |
| `206-400-100-001`, `270-400-203-603` (`duplicate`) | Onboarding | This identity is already a customer of this partner: one account per identity per partner. Reuse the `customerId` you saved when it was first onboarded; in a test, onboard a different test identity. |
| `231-400-313-600` | Vault payment-method submit | Card already in use: another customer of this partner holds it. In a test this is usually an earlier run that never deleted its card; delete it, or use another test card. |

<a id="stop-and-ask"></a>

### Stop and ask the human

These are decisions about a real person or a real limit, not bugs to work around. Report the code and what it means, and wait.

| Code | From | Meaning |
| --- | --- | --- |
| `206-400-100-020` (`identityVerificationFailed`) | Onboarding | Coinme could not verify the identity. No customer was created. Do not resubmit the same details. |
| `206-400-100-011`, `-012`, `-014`, `-031` to `-036` | Onboarding | Age, jurisdiction, prohibited or sanctions refusals. Final for these details. |
| `203-400-115-001`, `203-400-115-003` | Phone verification | Too many failed checks or phone changes. Further sends and checks are refused for a while; wait rather than retry. |
| `203-400-115-004`, `-006`, `-007`, `-008` | Phone verification send | The number cannot be used: recently used by another account, not a mobile number, an unsupported carrier, or already in use. The customer needs another number. |

<a id="limits"></a>

## Lifetimes and limits

| What | Lives or allows | Past it |
| --- | --- | --- |
| Transient Auth Token | 10 minutes, for one customer and one scope | Calls are refused. Mint a fresh token on the backend just before the call, never cache one across steps. |
| Session tag (Risk SDK) | 30 minutes from when it was issued | A card submitted with an older tag is refused. Fetch a new tag on the device that will submit. |
| Phone verification code | About a minute after it is sent | Checking it fails. Enter the code as soon as it arrives; a code that arrives late needs a new send. |
| Failed phone checks | A small number per customer within a time window | The customer is refused further sends and checks for a while (`203-400-115-001`). Each wrong or malformed check counts, so fix the request before sending another. |

<a id="read-back"></a>

## Confirm by reading back

A call can be accepted and still not have done what you meant: a session tag minted with the wrong partner ID is issued normally and only fails later, at the card submit. After each step that creates something, read it back from your backend before building on it: list the customer's payment methods and find the card with status `CREATED` (and `DELETED` after a delete); keep the `customerId` onboarding returned and use it for every later call.

Phone verification has no status endpoint. The SDK reports the result of the check itself (`onVerified`, or the check's outcome); record it on your backend when it arrives. To confirm a customer's phone state after the fact, use the Partner Portal or ask your Coinme integration contact.

<a id="reruns"></a>

## What a rerun collides with

- One account per identity per partner: onboarding the same identity twice returns `duplicate`.
- A card can be held by only one customer of the partner at a time: a test that adds a card and never deletes it blocks that card for every later run (`231-400-313-600`).
- Failed phone checks accumulate per customer: a test that keeps checking wrong or malformed codes locks the customer out.
- So a test that writes should clean up whatever it created, even when it fails, and record what it created (customer IDs, payment method IDs) before it creates it, so a run killed halfway can be cleaned up by hand.

<a id="events"></a>

## Widget events

A Widget purchase's completion event is sent when the customer finishes the flow (presses Done on the success screen), not the moment the payment succeeds. A test that stops on the success screen never sees it; a page that waits for it to show its own confirmation waits until the customer leaves the Widget.

<a id="browser-tests"></a>

## Secure fields in a browser test

The Vault and Onboarding SDKs collect card numbers and SSNs in secure iframes. Browser automation that sets a field's value directly (Playwright's `fill()`, for example) is not seen by the SDK; type key by key (`pressSequentially`), then read the value back. On a slow machine keystrokes can be dropped while a field reformats itself, so type with a short delay, and type a card expiry as digits only (`1229`), letting the field add its separator.

Each secure iframe may also contain hidden autofill inputs (`aria-hidden="true"`); target the visible input.

<a id="support"></a>

## What to send when something fails

Send your Coinme integration contact:

- the error code from the body (not only the HTTP status), and its message;
- the `X-B3-TraceId` the request carried: the SDKs set one on every call, and if you call an endpoint yourself, set your own and log it;
- the time, in UTC, to the second;
- the endpoint and method, and the field names of the body you sent (never the values: no codes, SSNs, card numbers or tokens);
- the `customerId`, and the SDK and version.

With those, one specific call can be traced; without them, the conversation starts with questions.

## Related pages

- [Transient Auth Token](https://platformdocs.coinme.com/docs/transient-auth-token.md)
- [Test identities for Coinme KYC](https://platformdocs.coinme.com/docs/widget-test-identities.md)
