Skip to content

Status postbacks

For: Lenders (integration team)

When a consumer applies for one of your products through Prosperas, you process that application on your side (approve it, disburse it, reject it). A postback is how you tell Prosperas what happened, in near real time, so we can update the lead status, reconcile revenue, and keep the consumer experience in sync.

The integration is deliberately small: one endpoint, one credential, one payload shape.

Property Value
Direction You → Prosperas (you call us)
Endpoint POST /client_app/webhook/lender/loan-status (an equivalent GET variant exists)
Auth X-API-KEY header (recommended) or source-IP allowlist
Body format JSON, snake_case
Events application, approval, disbursement, rejected, no_payment_yet, on_time, late, default, paid_in_full
Success 200 OK with a JSON acknowledgement
Retries You retry on 5xx / network errors (we do not retry you)

Every postback must authenticate. Prosperas checks the API key first, then the source IP. If neither matches a registered credential, the request is rejected with 403.

Send your key in the HTTP header:

X-API-KEY: <your-key>
  • The header name is case-insensitive (X-API-KEY, x-api-key, X-Api-Key all work).
  • The key is matched by exact string. No prefix, no Bearer, no encoding.

If you were provisioned by IP, no header is required — we read your source IP from X-Forwarded-For, then X-Real-IP, then the socket peer.

  • The match is exact string against the IP we registered.
  • No CIDR / subnet ranges are supported. Every individual egress IP you use must be registered. If your infrastructure rotates IPs, use the API key method instead.

Authentication is not only about the credential — it is bound to a real lead. A request succeeds only when all of the following hold:

  1. Your credential (key or IP) matches a registered lender origin, and
  2. the click_id in the request resolves to a lead, and
  3. that lead belongs to a product owned by your lender account.

If your credential is valid but the click_id does not resolve to one of your leads, you still get 403 (not 404). In practice this means: a wrong, unknown, or foreign click_id returns 403.

click_id is the single identifier that ties a consumer’s journey together across Prosperas and your systems.

  • Prosperas generates it and hands it to you at the moment the consumer is redirected to you (as the tracking / click identifier in the hand-off URL).
  • You must store it and echo it back — exactly — in every postback for that application.
  • It carries no personal data; it is an opaque reference.

Accepted formats:

Format Example Notes
Bare UUID 7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e
orgname_UUID claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e Organization prefix + underscore + UUID

Prosperas takes whatever follows the last underscore as the UUID. If that part is not a valid UUID, the response is 400. Still, don’t parse it on your side: return the full value exactly as received.

Method: POST with a JSON body (recommended for server-to-server integrations). If your platform cannot issue a POST with a body, a fully supported GET variant takes the same fields as query parameters — same endpoint, same authentication, same processing (the parameter table is in that section). A pixel variant is also available for tag managers.

Headers:

Content-Type: application/json
X-API-KEY: <your-key>

Body (JSON, snake_case):

{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "approval",
"occurred_at": "2026-07-01T12:34:56Z",
"data": {
"provider": "your-brand",
"client": {
"email": "consumer@example.com",
"fullName": "Ana Gomez",
"firstName": "Ana",
"lastName": "Gomez",
"idNumber": "1234567890",
"phoneNumber": "3001234567",
"returningCustomer": false
}
}
}
Field Type Required Notes
click_id string Yes The tracking id described above. Echo it exactly.
event string Yes One of the 9 supported events: application, approval, disbursement, rejected, no_payment_yet, on_time, late, default, paid_in_full (see Events & lifecycle below). Lowercase only — uppercase is rejected with 422.
occurred_at string — ISO-8601 timestamp of when the event happened on your side (e.g. 2026-07-01T12:34:56Z). If you send it without an offset (e.g. 2026-07-01T12:34:56), it is interpreted in the lender’s country local time (Colombia: America/Bogota); we recommend always including Z or an explicit offset.
data object — Optional audit blob, free-form. Recognized keys: provider (string) and client (object below). Payment-status events additionally have recommended keys (see Payment status updates below); they are not required. The only key that is validated is disbursed_amount (see below).
data.client object — Optional consumer data. See next section.
data.disbursed_amount number or string — Disbursed loan amount, in the local currency (COP in Colombia, MXN in Mexico). Optional on any event; recommended on disbursement. An invalid amount never rejects the postback. See Disbursed amount.
segment string — Risk segment your institution assigned to the consumer, using the values agreed for your integration. Optional on any event; see Risk segment.

data.client lets you enrich the consumer record. All fields are optional.

Field Type Notes
email string
firstName string Used only if fullName is absent.
lastName string Used only if fullName is absent.
fullName string Takes priority: first token → first name, remainder → last name.
idNumber string National ID / document number.
phoneNumber string
returningCustomer boolean Defaults to false if omitted. See the caution below.

segment is an optional top-level field (next to click_id, event, occurred_at and data) carrying the risk segment your institution computed for the consumer. It is also accepted as the segment query parameter on both GET variants (see GET variant).

The values you may send are the ones agreed for your integration (your own convention). Prosperas converts them to its standard risk scale (low, medium, high, where high is the highest risk) according to your lender’s configuration, and keeps the original value you sent for audit. You do not need to adapt your convention to Prosperas’.

  • The value is case-insensitive and surrounding spaces are ignored (" High " is the same as high).
  • A value outside the ones agreed for your integration returns 422 (see Responses & status codes). A 422 rejects the whole postback: the status event is NOT recorded, not just the segment. Fix the value and resend the postback.
  • The value may be at most 64 characters; a longer one returns the same 422 with the same body.
  • In the JSON body, segment must be a string. A non-text value (an array such as ["high"] or an object such as {"value": "high"}) is rejected with the same 422. A numeric value (for example 1) is accepted only if, once converted to text, it matches a value agreed for your integration; if none is numeric, in practice it returns 422.
  • Omitting it never breaks anything: the postbacks you already send keep working unchanged.

When to send it. It is accepted on any event. Prosperas may require it on specific events for a given lender (for example disbursement), as agreed during onboarding. If a required segment is missing, the postback is still accepted (200), but the lead is held for manual review before billing. We recommend sending it whenever your institution has scored the consumer, including on rejected.

data.disbursed_amount is an optional field with the amount your institution disbursed to the consumer, in the local currency of the market: COP in Colombia, MXN in Mexico. Prosperas uses it to reconcile the disbursement. It goes inside the data object of the POST; on the GET and pixel variants it is sent as a query parameter named literally data.disbursed_amount (see GET variant).

Format. A positive number, an integer or with a . and at most 2 decimals. No thousands separators and no currency symbol.

Value Valid? Why
1500000 Yes Integer.
1500000.50 Yes Up to 2 decimals with ..
1.500.000 No Thousands separator.
1,500,000 No Thousands separator.
$1500000 No Currency symbol.
500.000 No Read as invalid (3 decimals), not as 500. In Colombia the . is commonly a thousands separator: send 500000.
0 or negative No The amount must be greater than zero.
  • In the JSON body you can send it as a number (1500000) or as a string ("1500000.50"); the same format rules apply.
  • When to send it. It is accepted on any event. We recommend it on disbursement; the recommended keys section also suggests it on no_payment_yet. Both work.
  • An empty value is treated as absent.

If your platform cannot issue a POST with a JSON body — a tag manager, a legacy system, a rules engine that only knows how to call URLs — you can report the exact same event with a GET against the same endpoint, passing the fields as query parameters:

GET {BASE_URL}/client_app/webhook/lender/loan-status?click_id=<id>&event=<event>

It goes through the same authentication, the same event → status mapping and the same persistence as the POST. It returns the same JSON acknowledgement (200) and the same error codes (400 / 403 / 404 / 422 / 5xx), with the same retry rules.

Parameter Type Required POST equivalent
click_id string Yes click_id
event string Yes event (lowercase; one of the 9 events)
occurred_at string — occurred_at (ISO-8601)
segment string — segment (value agreed for your integration; see Risk segment)
data.disbursed_amount string — data.disbursed_amount (positive amount, up to 2 decimals; see Disbursed amount). The parameter name contains the dot, as written.
x_api_key (or api_key) string — X-API-KEY header (see below). Both names are accepted.
provider string — data.provider
email string — data.client.email
firstName string — data.client.firstName
lastName string — data.client.lastName
fullName string — data.client.fullName
idNumber string — data.client.idNumber
phoneNumber string — data.client.phoneNumber
returningCustomer boolean — data.client.returningCustomer

All values must be URL-encoded (emails, names with spaces, the + in an international phone number). Parameters not listed in this table are ignored and never stored. The data.disbursed_amount parameter is written with the dot in its name (?data.disbursed_amount=1500000); do not use a bare disbursed_amount, which is ignored.

All three authentication methods still apply, in this order of preference:

  1. X-API-KEY header — recommended on the GET too. A GET can carry headers; if your client can set them, do this.
  2. x_api_key or api_key query parameter (both names are accepted) — the fallback for clients that cannot set headers.
  3. IP allowlist — no credential on the request, if your source IP is registered.

For tag managers that can only load an image, GET /client_app/webhook/lender/loan-status/pixel accepts the same query parameters (including segment and data.disbursed_amount) and the same authentication. It always responds 200 with a transparent 1x1 GIF, even on errors: it does not tell you whether the postback failed. An invalid segment discards the entire postback: the status event is not recorded either, not just the segment, and no error is surfaced. Validate values before sending them or, better, use POST or GET, which do report the error and allow reliable retries. An invalid data.disbursed_amount, by contrast, does not discard the postback on any variant (see Disbursed amount).

Ventana de terminal
curl -G "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "X-API-KEY: <your-key>" \
--data-urlencode "click_id=claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e" \
--data-urlencode "event=approval" \
--data-urlencode "occurred_at=2026-07-01T12:34:56Z" \
--data-urlencode "provider=your-brand" \
--data-urlencode "email=consumer@example.com" \
--data-urlencode "fullName=Ana Gomez"
{ "ok": true, "lead_id": 12345, "user_id": 678, "status": "APPROVAL" }

With a risk segment (disbursement):

GET {BASE_URL}/client_app/webhook/lender/loan-status?click_id=claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e&event=disbursement&occurred_at=2026-07-01T15:00:00Z&segment=high

With a disbursed amount (disbursement; the parameter name contains the dot):

GET {BASE_URL}/client_app/webhook/lender/loan-status?click_id=claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e&event=disbursement&occurred_at=2026-07-01T15:00:00Z&data.disbursed_amount=1500000.50

Send one postback per status transition, using the event that matches what happened:

event Meaning Required?
application The consumer’s application was received / started on your side. Optional
approval The application was approved. Yes
disbursement Funds were disbursed. Yes
rejected The application was rejected. Yes
no_payment_yet The loan was disbursed but the first scheduled due date hasn’t arrived yet. Yes — required
on_time Payment was received on/before the due date (or within the standard grace period). Yes — required
late Payment was received after due date + grace, below your institution’s default threshold. Yes — required
default The loan met your institution’s internal default criteria. Yes — required
paid_in_full All scheduled payments and the outstanding balance were satisfied; the loan closes in good standing. Yes — required

application is accepted but optional — send it if you have a meaningful “application received” milestone; otherwise the three terminal outcomes (approval, disbursement, rejected) are what matter most.

The five payment-status events (no_payment_yet, on_time, late, default, paid_in_full) differ from the four above: they are not a single milestone but ongoing updates for the life of the loan, reported after disbursement. They replace one another as the payment situation changes — no_payment_yet is the initial state and gets replaced by on_time, late, or default once the first due date passes. Reporting all five events is required for every lead. Approval and disbursement data only say who qualified for credit; payment data closes the loop on who actually repays, which improves matchmaking quality for all lenders. See Payment status updates below for the per-status detail.

Send events in the order they occur. Prosperas tolerates events arriving out of order, but in-order delivery keeps the lead history clean.

Unlike the four events above, which mark a single milestone in the application, payment status updates are an ongoing report: you send a new postback every time the consumer’s payment situation changes, for the life of the loan.

event Definition
no_payment_yet The loan was disbursed but the first scheduled due date hasn’t arrived yet. This is the initial, healthy state — it gets replaced by on_time, late, or default once that date passes.
on_time Payment was received on/before the due date, or within your institution’s standard grace period.
late Payment was received after due date + grace, but still below your institution’s default threshold.
default The loan met your institution’s internal default criteria.
paid_in_full All scheduled payments and the outstanding balance (principal, interest, fees) were satisfied. The loan closes in good standing.

For late, it’s recommended to report the days-past-due (DPD) bucket in data.dpd_bucket:

Bucket Range
1-30 1 to 30 days past due
31-60 31 to 60 days past due
61-90 61 to 90 days past due

The most common industry criterion for default is 90 or more days past due. If your institution uses a different threshold, report it explicitly in data.default_threshold_dpd so it’s clear which convention you’re applying.

Event Recommended keys in data
no_payment_yet disbursed_amount
on_time —
late dpd_bucket
default default_threshold_dpd
paid_in_full paid_off_date

disbursed_amount is the only one of these keys that is validated: it follows the format rules in Disbursed amount, but an invalid value does not reject the event either. It is also accepted on disbursement and on any other event.

no_payment_yet

{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "no_payment_yet",
"occurred_at": "2026-08-01T09:00:00Z",
"data": { "disbursed_amount": 500000 }
}

on_time

{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "on_time",
"occurred_at": "2026-09-01T09:00:00Z",
"data": {}
}

late

{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "late",
"occurred_at": "2026-09-15T09:00:00Z",
"data": { "dpd_bucket": "1-30" }
}

default

{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "default",
"occurred_at": "2026-12-01T09:00:00Z",
"data": { "default_threshold_dpd": 90 }
}

paid_in_full

{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "paid_in_full",
"occurred_at": "2027-06-01T09:00:00Z",
"data": { "paid_off_date": "2027-06-01" }
}

Success body (200 OK):

{
"ok": true,
"lead_id": 12345,
"status": "APPROVAL",
"user_id": 6789
}
  • ok — always true on success.
  • lead_id — the Prosperas lead the event was recorded against.
  • status — the internal status your event mapped to (APPLICATION / APPROVAL / DISBURSEMENT / REJECTED / NO_PAYMENT_YET / ON_TIME / LATE / DEFAULT / PAID_IN_FULL).
  • user_id — the consumer record id, when available.
  • segment — (optional) the segment already converted to Prosperas’ standard scale (low / medium / high). Only present when the segment was recorded; if you did not send one, it is absent.

An invalid data.disbursed_amount does not change this response: it is still 200 (see Disbursed amount).

Status codes:

Code Meaning What you should do
200 Event recorded. (Also returned when data.disbursed_amount is invalid: the event is recorded, the amount is not.) Done. If you sent an amount, check that it follows the format.
400 Malformed click_id (what follows the last underscore is not a valid UUID). Fix the click_id; do not retry unchanged.
403 Auth failed or the click_id doesn’t resolve to one of your leads. Check your key/IP and that you’re echoing the correct click_id. Do not blindly retry.
404 Session not found (rare edge, after auth succeeds). Verify the click_id; contact Prosperas if it persists.
422 Validation error — e.g. camelCase clickId, uppercase event, wrong types, or a segment outside the values accepted for your lender. Fix the payload shape (see common mistakes below). A 422 rejects the whole postback (the event is not recorded): fix the value and resend; do not retry unchanged (resending with the corrected value is expected).
5xx Transient Prosperas-side error. Retry with exponential backoff (see below).

Example 422 for an invalid segment. The response lists in allowed the values accepted for your lender (the values in this example are illustrative):

{
"detail": {
"field": "segment",
"value": "premium",
"allowed": ["low", "mid", "medium", "high"],
"message": "Invalid value 'premium' for 'segment' (risk_segment); allowed: low, mid, medium, high"
}
}

Common mistakes (read this before you build)

Section titled “Common mistakes (read this before you build)”

These four mistakes account for almost every failed first integration. Avoid them:

❌ Don’t ✅ Do
Use camelCase clickId in the body Use snake_case click_id — camelCase → 422
Send event: "APPROVAL" (uppercase) Send lowercase approval — uppercase → 422
Assume the endpoint is public / no auth Send X-API-KEY (or call from an allowlisted IP) — else 403
Put the API key in a query string out of convenience Send the key in the X-API-KEY header — a GET can carry it too. ?x_api_key= exists only as a last resort (see GET variant)
  • You own retries. Prosperas does not retry you. On a 5xx or a network failure, retry the postback with exponential backoff (e.g. 1s, 2s, 4s, 8s…), up to a sensible ceiling.
  • Do not retry on 4xx. A 400, 403, or 422 means the request is wrong — fix it and send a corrected request instead of hammering the same payload.
  • The endpoint is not idempotent. Each accepted postback records a new event. If you retry after a request that actually succeeded (but whose response you missed), you may create a duplicate event. Keep retries bounded and prefer retrying only on confirmed failures.
  • Every request is logged on our side (with your API key masked) for support and reconciliation.
Ventana de terminal
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "approval",
"occurred_at": "2026-07-01T12:34:56Z",
"data": { "provider": "your-brand" }
}'

Response — 200 OK:

{ "ok": true, "lead_id": 12345, "status": "APPROVAL", "user_id": 6789 }

Disbursement with consumer enrichment (POST)

Section titled “Disbursement with consumer enrichment (POST)”
Ventana de terminal
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{
"click_id": "7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "disbursement",
"occurred_at": "2026-07-01T15:00:00Z",
"data": {
"provider": "your-brand",
"client": { "fullName": "Ana Gomez", "idNumber": "1234567890" }
}
}'
Ventana de terminal
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "disbursement",
"occurred_at": "2026-07-01T15:00:00Z",
"segment": "high",
"data": { "provider": "your-brand" }
}'

Equivalent GET:

Ventana de terminal
curl -G "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "X-API-KEY: <your-key>" \
--data-urlencode "click_id=claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e" \
--data-urlencode "event=disbursement" \
--data-urlencode "occurred_at=2026-07-01T15:00:00Z" \
--data-urlencode "segment=high"

Response — 200 OK:

{ "ok": true, "lead_id": 12345, "status": "DISBURSEMENT", "user_id": 6789, "segment": "high" }
Ventana de terminal
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "disbursement",
"occurred_at": "2026-07-01T15:00:00Z",
"data": { "provider": "your-brand", "disbursed_amount": 1500000.50 }
}'

Equivalent GET (the parameter name contains the dot):

Ventana de terminal
curl -G "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "X-API-KEY: <your-key>" \
--data-urlencode "click_id=claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e" \
--data-urlencode "event=disbursement" \
--data-urlencode "occurred_at=2026-07-01T15:00:00Z" \
--data-urlencode "data.disbursed_amount=1500000.50"

Response — 200 OK:

{ "ok": true, "lead_id": 12345, "status": "DISBURSEMENT", "user_id": 6789 }

Invalid amount — the postback is still accepted (200)

Section titled “Invalid amount — the postback is still accepted (200)”
Ventana de terminal
# "1.500.000" uses a thousands separator: the amount is invalid
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{
"click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e",
"event": "disbursement",
"segment": "high",
"data": { "disbursed_amount": "1.500.000" }
}'
# → 200 OK
# { "ok": true, "lead_id": 12345, "status": "DISBURSEMENT", "user_id": 6789, "segment": "high" }

The DISBURSEMENT event and the segment were recorded. The amount was not recorded and Prosperas reviews it; you get no error. Send the amount in the correct format (1500000) if you want it recorded.

Ventana de terminal
# WRONG: "premium" is not a valid segment
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{ "click_id": "claro_7e1c2f1f-9b4d-4c1d-9f6c-2f3c1a2b4d5e", "event": "disbursement", "segment": "premium" }'
# → 422 Unprocessable Entity
# { "detail": { "field": "segment", "value": "premium", "allowed": ["low", "mid", "medium", "high"], "message": "Invalid value 'premium' for 'segment' (risk_segment); allowed: low, mid, medium, high" } }
Ventana de terminal
# WRONG: "clickId" (camelCase) instead of "click_id"
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-H "X-API-KEY: <your-key>" \
-d '{ "clickId": "7e1c2f1f-...", "event": "approval" }'
# → 422 Unprocessable Entity (field "click_id" is required)

Error — missing / wrong credential (403)

Section titled “Error — missing / wrong credential (403)”
Ventana de terminal
# No X-API-KEY header and IP not allowlisted → 403
curl -X POST "{BASE_URL}/client_app/webhook/lender/loan-status" \
-H "Content-Type: application/json" \
-d '{ "click_id": "7e1c2f1f-...", "event": "approval" }'
# → 403 Forbidden
Endpoint POST /client_app/webhook/lender/loan-status
Bodyless variant GET on the same path with the fields as query parameters — see GET variant
Auth header X-API-KEY: <your-key> (case-insensitive)
Required body fields click_id (snake_case), event (lowercase)
Events application · approval · disbursement · rejected · no_payment_yet · on_time · late · default · paid_in_full
Optional body fields occurred_at (ISO-8601), data, data.client, segment (value agreed for your integration, see Risk segment), data.disbursed_amount (positive number, up to 2 decimals, local currency; see Disbursed amount)
Success 200 → { ok, lead_id, status, user_id, segment? } (segment only appears when it was recorded)
Invalid amount Still 200: the event is recorded, the amount is not (unlike segment, which returns 422)
Client errors 400 bad click_id · 403 auth/lead · 404 session · 422 validation
Retry on 5xx / network only, exponential backoff
Signing None (no HMAC) — protect the API key

Next step: with postbacks working, close out the integration with Product data.


Last verified: 2026-11-25 · v1.6 · matches api/client_app/webhook/router.py