Most accounts payable workflows still look like this:
- Someone emails a PDF invoice
- Someone checks it against a purchase order
- Someone approves it
- Someone logs into a bank and sends the payment
β³ It takes days.
πΈ It costs money.
π§ It requires humans in the loop.
β‘ So I built something simpler
An API where an AI agent can verify an invoice and pay a supplier in one flow.
No API keys.
No accounts.
Just pay per request.
π§ The idea
Instead of humans doing invoice checks, an agent can run:
Create PO β Submit invoice β Verify β Pay
Thatβs it.
π From invoice β verified β paid in seconds.
π₯ The flow (3 calls that matter)
Hereβs the entire loop.
π§Ύ 1. Submit an invoice
curl -X POST https://gateway.spraay.app/api/v1/sctp/invoice \
-H "Content-Type: application/json" \
-d '{
"poId": "po_123",
"supplierId": "sup_abc",
"items": [
{
"description": "Resistor 10K x1000",
"quantity": 1000,
"unitPrice": 0.02
}
],
"total": 20.00
}'
β 2. Verify it (this is the interesting part)
curl -X POST https://gateway.spraay.app/api/v1/sctp/invoice/verify \
-H "Content-Type: application/json" \
-d '{"invoiceId": "inv_456"}'
β‘ Exact match (instant)
{
"status": "matched",
"confidence": 0.99,
"verifiedBy": "deterministic",
"latencyMs": 42,
"recommendation": "approve_payment"
}
π§ Fuzzy match (AI reasoning)
{
"status": "partial_match",
"confidence": 0.87,
"verifiedBy": "ai",
"latencyMs": 1340,
"discrepancies": [
"Description variation: 'Resistor 10K' vs 'Resistors 10KΞ© (1000pc)'"
],
"recommendation": "approve_payment"
}
πΈ 3. Pay the supplier
curl -X POST https://gateway.spraay.app/api/v1/sctp/pay \
-H "Content-Type: application/json" \
-d '{
"invoiceId": "inv_456",
"supplierId": "sup_abc",
"amount": 20.00,
"token": "USDC",
"chain": "base"
}'
Response
{
"status": "processing",
"estimatedSettlement": "~2s"
}
βοΈ How it works
The /verify endpoint uses a two-step system:
β‘ Fast path (~50ms)
- Deterministic checks
- Totals, quantities, prices
- Instant match β high confidence
π§ Slow path (~1β2s)
- LLM reasoning for fuzzy cases
- Handles naming differences, rounding, inconsistencies
π‘ Why this matters
This isnβt just another API.
It changes how financial workflows work:
- β No dashboards
- β No logins
- β No subscriptions
Instead:
Programmable financial infrastructure that agents can use directly
An AI agent can:
- receive an invoice
- verify it
- decide based on confidence
- execute payment
All without a human.
π Who this is for
- π€ AI CFO / finance agents
- πͺ Crypto startups paying vendors
- ποΈ DAOs managing contributor payments
- π§βπ» Indie hackers automating ops
π§ͺ What this is (and isnβt)
This is v0.1 of something Iβm calling:
Supply Chain Task Protocol (SCTP)
Right now it focuses on:
- invoices
- verification
- payments
Later, it may expand into:
- escrow
- shipment tracking
- document verification
β¦but only after this core loop is proven.
π Try it yourself
π https://gateway.spraay.app
π https://github.com/plagtech/sctp
If you're building AI agents and want to automate real-world workflows, Iβd love feedback.
This is one of those things that either clicks immediatelyβ¦
or sounds insane.
Iβm betting on the former.
Top comments (0)