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
firstNamestringlastNamestringemailstringphonestringconsent
givenAtUtcstringipAddressstringuserAgentstringpageUrlstringtextstringmethodstringcheckbox.checkboxgpcbooleanprivacyPolicyUrlstringprivacyPolicyVersionstringaddOnsarraydebtToIncome also asks for the debt-to-income ratio and income, charged as on forms. Send [] for none.debtToIncomecurl 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
idstringapiVersionstringskipReasonnullable stringnull.consumerOptedOutnoMatchproviderErrornotCompletedinsufficientFundsreusedbooleantrue 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.chargedCentsinteger0 when it was reused, skipped or run with a test key.leadIdnullable stringlead.id in webhooks.createdAtUtcstringcompletedAtUtcnullable stringnull while pending.resultnullable objectstatus is complete.+result
creditScorenullable integeroffersarrayname and its amount in dollars, or null when the provider gave no amount.debtToIncomenullable number31 means 31%. With the debtToIncome add-on, when it came back.incomenullable number{
"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
| HTTP | status | What it means |
|---|---|---|
| 200 | complete | A result. reused: true when it is the same person's check from the last 14 days, free. |
| 200 | skipped | No result, not charged. skipReason says why. |
| 202 | pending | The credit provider had a temporary error and the check is retried once, about 90 seconds later. Read it with GET after that. |
skipReason | Meaning |
|---|---|
consumerOptedOut | The 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. |
noMatch | The credit provider found nothing for this person. |
providerError | The credit provider failed, and its retry failed too. |
notCompleted | The 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. |
insufficientFunds | The 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:
| Refusal | Code |
|---|---|
| There is no active X-Ray subscription, or X-Ray or X-Ray Finance setup is not done for the subaccount | 403 xraySetupIncomplete |
| The X-Ray terms must be accepted again in the dashboard | 403 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 changed | 403 addendumReacceptanceRequired |
| The privacy policy URL or version is not the one that was registered when consent was given | 403 policyNotRegistered |
| The person has opted out. No check runs and nothing about them is stored | 422 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 product | 422 consentInvalid |
| A phone that is not a US number | 422 phoneNotUs |
| The wallet cannot cover the check, even after auto-recharge | 402 insufficientFunds |
| A check for the same person is already running | 409 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.

