curl -X POST 'https://api.stateset.com/v1/finance/invoices/factor' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"invoice_id": "inv_12345",
"amount": "50000.00",
"currency": "USDC",
"discount_rate": 0.025,
"buyer": {
"id": "did:stateset:buyer:abc123",
"credit_rating": "AAA",
"payment_history": "excellent"
},
"terms": { "net_days": 30, "due_date": "2024-07-25" },
"recourse": false
}'
{
"factoring_id": "fact_8y4mQr5oP2",
"invoice_id": "inv_12345",
"status": "FUNDED",
"advance_amount": "48750.00",
"discount_amount": "1250.00",
"discount_rate": 0.025,
"funded_at": "2024-06-25T12:05:00Z",
"maturity_date": "2024-07-25T23:59:59Z",
"transaction_hash": "0x742d35Cc6634C0532925a3b8D097C00D4dfece08"
}
Factor Invoice
Sell an outstanding invoice for immediate ssUSD, at a discount, without waiting for the buyer to pay.
POST
/
v1
/
finance
/
invoices
/
factor
curl -X POST 'https://api.stateset.com/v1/finance/invoices/factor' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"invoice_id": "inv_12345",
"amount": "50000.00",
"currency": "USDC",
"discount_rate": 0.025,
"buyer": {
"id": "did:stateset:buyer:abc123",
"credit_rating": "AAA",
"payment_history": "excellent"
},
"terms": { "net_days": 30, "due_date": "2024-07-25" },
"recourse": false
}'
{
"factoring_id": "fact_8y4mQr5oP2",
"invoice_id": "inv_12345",
"status": "FUNDED",
"advance_amount": "48750.00",
"discount_amount": "1250.00",
"discount_rate": 0.025,
"funded_at": "2024-06-25T12:05:00Z",
"maturity_date": "2024-07-25T23:59:59Z",
"transaction_hash": "0x742d35Cc6634C0532925a3b8D097C00D4dfece08"
}
Legacy contract: confirm deployment before use. This page does not establish a
provisioned public service. Check the dated host report and obtain
a supported host and API version. New integrations should begin with the
API directory or local commerce walkthrough.
Overview
Factoring converts an unpaid invoice into cash now. You receive the advance amount — the invoice face value less the discount — and the funder collects from the buyer at maturity. The discount rate you’re offered is driven by the buyer’s credit, not yours. CallGET /v1/finance/invoices/{invoice_id}/factoring-options first to see the competing rates before
committing to one — see Finance.
recourse decides who absorbs a buyer default. With recourse: false the funder takes the loss;
with true you are liable to repay the advance. Non-recourse costs a higher discount rate — that
spread is the price of the risk transfer. Set it deliberately.Body
The agreed rate as a decimal —
0.025 is 2.5%. Take this from the factoring options response
rather than proposing your own.Who owes the invoice. The funder prices on this.
Show properties
Show properties
The buyer’s DID, e.g.
did:stateset:buyer:abc123.Response
Identifier for the factoring position. Track it with
GET /v1/finance/factoring/{factoring_id}.Errors
Succeeds with201. Failures return 400, 401, 403, 422 or 429 with an error body, per the platform status-code contract.
curl -X POST 'https://api.stateset.com/v1/finance/invoices/factor' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"invoice_id": "inv_12345",
"amount": "50000.00",
"currency": "USDC",
"discount_rate": 0.025,
"buyer": {
"id": "did:stateset:buyer:abc123",
"credit_rating": "AAA",
"payment_history": "excellent"
},
"terms": { "net_days": 30, "due_date": "2024-07-25" },
"recourse": false
}'
{
"factoring_id": "fact_8y4mQr5oP2",
"invoice_id": "inv_12345",
"status": "FUNDED",
"advance_amount": "48750.00",
"discount_amount": "1250.00",
"discount_rate": 0.025,
"funded_at": "2024-06-25T12:05:00Z",
"maturity_date": "2024-07-25T23:59:59Z",
"transaction_hash": "0x742d35Cc6634C0532925a3b8D097C00D4dfece08"
}
Related
- Finance API — factoring, PO financing, and lending
- Pay Invoice
- Loan Request — borrow against collateral instead
Last modified on September 21, 2026