Cowdidocs
API ReferenceInvoice financing

Estimate the invoice discount

POST
/v1/merchants/{merchantId}/invoice-financing/applications/preview

Calculates the discount and payout for financing an invoice on a hypothetical disbursement date, without creating an application. Requires the merchant:financing.invoices:read permission on the merchant. Returns 404 when the merchant does not belong to the caller's organization.

AuthorizationBearer <token>

Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.

In: header

Path Parameters

merchantId*string

Unique identifier of the merchant.

Formatuuid

Request Body

application/json

Fields to price an invoice financing estimate, without creating an application.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/merchants/a50e8400-e29b-41d4-a716-446655440000/invoice-financing/applications/preview" \  -H "Content-Type: application/json" \  -d '{    "invoice_amount": {      "value": 100000,      "currency": "KES"    },    "due_date": "2026-11-01",    "estimated_disbursement_date": "2026-10-01"  }'
{  "estimated_disbursement_date": "2026-10-01",  "due_date": "2026-11-01",  "estimated_discount": {    "value": 15000,    "currency": "KES"  },  "estimated_payout": {    "value": 485000,    "currency": "KES"  }}
{  "code": "BAD_REQUEST",  "description": "Bad Request"}
{  "code": "UNAUTHORISED",  "description": "Unauthorised"}
{  "code": "FORBIDDEN",  "description": "Forbidden"}
{  "estimated_disbursement_date": "2026-10-01",  "due_date": "2026-11-01",  "estimated_discount": {    "value": 15000,    "currency": "KES"  },  "estimated_payout": {    "value": 485000,    "currency": "KES"  }}
{  "code": "RATE_LIMIT_EXCEEDED",  "description": "Too Many Requests"}
{  "code": "INTERNAL_ERROR",  "description": "Internal Server Error"}