Fincheck

Accepting an Offer

Commit the lead to the applicant's chosen partner and handle each response.

POST /api/v2/accept is the second step of the Comparisons integration. It commits the lead to the partner the applicant chose from the offers.

See POST /api/v2/accept in the API Reference →

1. Accept the chosen match

Send the offer's lead id as hashid and the chosen match's id as partner_id:

cURL
curl -X POST "https://api.engine-v2.uat.fincheck.co.za/api/v2/accept" \
  -H "Authorization: Bearer fce_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "hashid": "k3mN9pQx",
    "partner_id": 227
  }'
FieldRequiredTypeAllowed valuesDescription
hashidRequiredstring—The lead id returned by POST /offer.
partner_idRequiredinteger≥ 1The id of the match the applicant chose from POST /offer.
bankOptionalstring—Optional. Stored on the lead when present.
live_quotesOptionalany—The quote the applicant selected, copied from the match's live_quotes. Any JSON value. Stored on the lead. An end-to-end application completes this quote, so send it with type "apply-now". The v1 name live_score is rejected with 422 ("is not supported; use live_quotes").
typeOptionalstring—Send "apply-now" to apply end to end with a partner whose match has end_to_end true. It takes effect only when your account is enabled for end-to-end, the lead was offered with application_method "apply-now", and, for a partner that prices live, its match included live_quotes. Otherwise the accept continues as a normal referral.

Only send a partner that appeared in the offer's matches.

2. Handle the response

The partner determines which of three successful responses you receive. Check for each in this order.

A redirect

JSON
{
  "redirect": "https://partner.example.com/apply/k3mN9pQx"
}

Send the applicant to redirect. Always use the URL exactly as returned.

FieldRequiredTypeAllowed valuesDescription
redirectRequiredstring—URL to send the applicant to, to continue with the partner.

Partner details

JSON
{
  "id": "k3mN9pQx",
  "status": "success",
  "api": [
    {
      "id": 227,
      "company_name": "Example Lender",
      "partner_type": "api",
      "live_scoring_api": true,
      "end_to_end": false
    }
  ]
}

The partner received the lead directly. api describes the accepted partner. If the response also has a redirect, send the applicant there.

FieldRequiredTypeAllowed valuesDescription
apiRequiredlist of objects—The partner the lead was sent to (exactly one).
api[].company_nameRequiredstring—Partner's display name.
api[].end_to_endRequiredbooleantrue / falseTrue when the partner supports an end-to-end application.
api[].idRequiredinteger—Partner user id.
api[].live_scoring_apiRequiredbooleantrue / falseTrue when the partner scores applicants in real time.
api[].partner_typeRequiredstring—api or dashboard.
api[].company_logo_urlOptionalstring—Partner logo (square).
api[].company_mini_logo_urlOptionalstring—Small partner logo.
api[].company_website_urlOptionalstring—Partner's website.
api[].company_wide_logo_urlOptionalstring—Wide partner logo.
idRequiredstring—Lead hashid.
statusRequiredstring—success or failed.
redirectOptionalstring—Apply URL for the applicant, when the partner returned one.
JSON
{
  "id": "k3mN9pQx",
  "status": "success"
}

For end-to-end partners the link may follow the acceptance. Fetch it with the lead id:

cURL
curl "https://api.engine-v2.uat.fincheck.co.za/api/v2/accept/k3mN9pQx/link" \
  -H "Authorization: Bearer fce_your_key" \
  -H "Accept: application/json"
JSON
{
  "ready": true,
  "link": "https://partner.example.com/apply/k3mN9pQx"
}

When ready is false, wait two seconds and try again. Stop after about a minute and show the applicant that the partner will contact them. Never build or guess a partner URL.

See GET /api/v2/accept/{hashid}/link in the API Reference →

FieldRequiredTypeAllowed valuesDescription
idRequiredstring—Lead hashid.
statusRequiredstring—success when the application was started; failed otherwise.

The link endpoint answers with:

FieldRequiredTypeAllowed valuesDescription
linkRequiredstring—Partner link for the applicant. Empty until ready is true.
readyRequiredbooleantrue / falseTrue once the partner's link is available.

Applying end to end

An end-to-end application lets the applicant apply with the partner without leaving your journey. Fincheck sends the partner the complete application, including the quote the applicant chose, and the partner returns a link where the applicant finishes, usually to sign.

All of these must be true:

  1. End-to-end applications are enabled for your account.
  2. You requested the offer with "application_method": "apply-now". See Quote or apply now.
  3. The applicant chose a match with end_to_end: true.
  4. If that match has live_scoring_api: true, it also has live_quotes.

Accept with type and the quote the applicant chose, copied from the match's live_quotes:

cURL
curl -X POST "https://api.engine-v2.uat.fincheck.co.za/api/v2/accept" \
  -H "Authorization: Bearer fce_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "hashid": "k3mN9pQx",
    "partner_id": 301,
    "type": "apply-now",
    "live_quotes": { "id": 31, "LoanAmount": 5000, "TermAllowed": 6 }
  }'

The response is a link that is ready later: fetch it from GET /accept/{hashid}/link and send the applicant there.

If any condition is not met, the accept continues as a normal referral and you receive one of the other responses above, usually a redirect. Handle every response type, even when you send apply-now.

If the accept is rejected

POST /accept can return:

CodeHTTP statusMessageCauseWhat to do
invalid_json400Invalid JSON body.The body could not be read as JSON.Fix the request body. Do not retry it unchanged.
lead_not_found404Lead not found.The lead does not exist in this environment, or is not yours.Use the id from your POST /offer response.
lead_already_accepted422This lead has already been accepted.The lead was already sent to a partner.Do not accept it again.
lead_not_acceptable422This lead is not in a matched, declined, or failed state.The lead was not matched by POST /offer, or has moved on.Check the lead with GET /lead/{hashid}.
partner_not_assigned422This partner is not assigned to the intent.The partner does not take leads for this intent.Choose a partner from the offer's matches.
partner_not_eligible422This partner is not currently a valid choice for the lead.The partner no longer qualifies for this applicant.Let the applicant choose another match.
partner_unavailable422This partner has no redirect_url configured.The partner cannot receive the applicant yet.Let the applicant choose another match, and tell support.
validation_failed422Validation failed.One or more fields broke their rules; errors lists each problem per field with its code.Correct the named fields, then send again.
internal_error500Internal error.An unexpected error on Fincheck's side.Retry with backoff. Contact support if it keeps happening.
processing_timeout503Processing is taking longer than expected. Please retry.The request is still being processed after the time it is allowed.Retry later with backoff. Keep any id you already received.

Errors sent before your API key is identified (401, and 503 during maintenance) have no code: their body is only {"error": "…"}.

You can only accept your own leads. Any other hashid returns 404 lead_not_found.

If the chosen partner declines, the lead's state becomes declined and the applicant can accept a different match from the same offer.