ROASFormDocs
APIX-Ray Finance

Checks

Run an X-Ray Finance check for a person who gave consent on your page, and read the result.

A check returns the same fields the dashboard shows for an X-Ray Finance check on a form: the credit score and the offers with their amounts, and with the debt-to-income add-on, the debt-to-income ratio and the estimated income. Every check also shows in X-Ray History, marked API, with the key that ran it, and the person appears in Contacts.

Run a check

POST /v1/public/xray/finance/checks with the xrayFinanceChecksRun permission and an Idempotency-Key.

person

firstNamestring
The person's first name.
lastNamestring
The person's last name.
emailstring
The person's email address.
phonestring
A US phone number, in any common format.

consent

givenAtUtcstring
When the person ticked the box, in ISO 8601. No older than 24 hours, and not before the addendum was accepted.
ipAddressstring
The person's own public IP address when they ticked it. Not your server's, a proxy's or a CDN's.
userAgentstring
The person's browser user agent.
pageUrlstring
The page where they ticked it. Any page of yours: pages are not registered.
textstring
The consent sentence exactly as the page showed it: ours, with your legal business name and the product that page offers.
methodstring
How consent was given. Always checkbox.
Possible values
checkbox
gpcboolean
Whether the browser sent a Global Privacy Control signal.
privacyPolicyUrlstring
Your registered privacy policy.
privacyPolicyVersionstring
The policy version that was registered when they ticked it. After you register a new version, a tick from before the change still names the earlier one.
addOnsarray
Add-ons to buy with the check. debtToIncome also asks for the debt-to-income ratio and income, charged as on forms. Send [] for none.
Possible values
debtToIncome
Request
curl https://api.roasform.com/v1/public/xray/finance/checks \
  -H "Authorization: Bearer rf_live_..." \
  -H "Idempotency-Key: 6f1c2b7e-3d4a-4b5c-8d9e-0a1b2c3d4e5f" \
  -H "Content-Type: application/json" \
  -d '{
    "person": {
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "jane@example.com",
      "phone": "+14155550123"
    },
    "consent": {
      "givenAtUtc": "2026-11-05T14:30:00Z",
      "ipAddress": "203.0.113.7",
      "userAgent": "Mozilla/5.0 ...",
      "pageUrl": "https://sunrisesolar.com/apply",
      "text": "I authorize Sunrise Solar LLC and its service providers ...",
      "method": "checkbox",
      "gpc": false,
      "privacyPolicyUrl": "https://sunrisesolar.com/privacy",
      "privacyPolicyVersion": "2026-11-01"
    },
    "addOns": ["debtToIncome"]
  }'

Each text field has a length limit: firstName and lastName 100 characters, email 254, phone 7 to 30, ipAddress 45, userAgent 1,000, text 2,000, both URLs 2,000, method 30 and privacyPolicyVersion 100. email takes letters, digits and . _ % + - before the @, the same rule opt-outs are recorded by. Each add-on can be named once. A field that is missing, malformed or too long answers 400 invalidRequest, and the message names the field.

The check

idstring
The check's id. The same id shows in X-Ray History.
apiVersionstring
The API version this response follows.
statusstring
Possible values
pendingcompleteskipped
skipReasonnullable string
Why a check was skipped, or null.
Possible values
consumerOptedOutnoMatchproviderErrornotCompletedinsufficientFunds
reusedboolean
true when the result is the same person's check from the last 14 days, returned instead of buying a new one. The same person means the same name, email and phone: two people who share an email each get their own contact and their own check. That check may have run on a form. Its result comes back as it was, so debtToIncome and income are there only if that check bought the add-on, whatever this call sent in addOns.
chargedCentsinteger
What this check cost, in cents. 0 when it was reused, skipped or run with a test key.
leadIdnullable string
The person's contact in the subaccount, the same id as lead.id in webhooks.
createdAtUtcstring
When the check started.
completedAtUtcnullable string
When it ended, or null while pending.
resultnullable object
Present when status is complete.
+result
creditScorenullable integer
The credit score.
offersarray
Each offer's name and its amount in dollars, or null when the provider gave no amount.
debtToIncomenullable number
Debt-to-income ratio as a percent: 31 means 31%. With the debtToIncome add-on, when it came back.
incomenullable number
Estimated yearly income in dollars, with the add-on, when it came back.
Response
{
  "id": "0b7c1d2e-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
  "apiVersion": "2026-11-10",
  "status": "complete",
  "skipReason": null,
  "reused": false,
  "chargedCents": 275,
  "leadId": "3d9f7a25-6c1b-4e8d-a2f4-8b0c5d7e9f13",
  "createdAtUtc": "2026-11-05T14:30:02.118Z",
  "completedAtUtc": "2026-11-05T14:30:04.731Z",
  "result": {
    "creditScore": 720,
    "offers": [
      { "name": "Credit Pre-Approval", "amount": 25000 }
    ],
    "debtToIncome": 31,
    "income": 84000
  }
}

Statuses

HTTPstatusWhat it means
200completeA result. reused: true when it is the same person's check from the last 14 days, free.
200skippedNo result, not charged. skipReason says why.
202pendingThe credit provider had a temporary error and the check is retried once, about 90 seconds later. Read it with GET after that.
skipReasonMeaning
consumerOptedOutThe person's opt-out was recorded while this check was waiting for its retry. A person who has already opted out is refused with 422 consumerOptedOut instead, see Errors.
noMatchThe credit provider found nothing for this person.
providerErrorThe credit provider failed, and its retry failed too.
notCompletedThe check was stopped before a result: the person's details changed before the retry, another check of them finished first, or the check's consent record was removed. The credit provider was not asked, or did not answer.
insufficientFundsThe wallet ran out between the funds check and the charge. Rare.

The call waits for the credit provider, which can take up to 60 seconds. Two calls for the same person at the same time buy one check: the second answers 409 checkInProgress.

Read a check

GET /v1/public/xray/finance/checks/{id} with the xrayFinanceChecksRead permission returns the check as above, as it is now: 202 while pending, 200 once it ended. A check of another subaccount, or one that did not come through the API, is 404 checkNotFound.

Errors

X-Ray Finance's own codes are below. Every endpoint can also answer the codes in Errors. A live check is refused, and never charged, when:

RefusalCode
There is no active X-Ray subscription, or X-Ray or X-Ray Finance setup is not done for the subaccount403 xraySetupIncomplete
The X-Ray terms must be accepted again in the dashboard403 termsReacceptanceRequired
The X-Ray Finance API Addendum must be accepted again in the dashboard: there is a new version, or the business's legal name changed403 addendumReacceptanceRequired
The privacy policy URL or version is not the one that was registered when consent was given403 policyNotRegistered
The person has opted out. No check runs and nothing about them is stored422 consumerOptedOut
Consent given before the addendum was accepted, consent older than 24 hours or in the future, an IP that is private, reserved for documentation (such as 203.0.113.7 in the example above) or your server's own, a method other than checkbox, or a sentence that isn't ours with your legal business name and a filled-in product422 consentInvalid
A phone that is not a US number422 phoneNotUs
The wallet cannot cover the check, even after auto-recharge402 insufficientFunds
A check for the same person is already running409 checkInProgress

Small differences in spacing or line breaks in consent.text are fine; any changed word is not. Every comparison of consent.givenAtUtc allows 5 minutes for a difference between your server's clock and ours.

Reading a check of another subaccount, or one that did not come through the API, answers 404 checkNotFound. A check that runs but cannot produce a result is not an error: it answers 200 with status: "skipped" and a skipReason, as in Statuses.