Skip to main content

Tickets

A ticket is a structured listing on the Roja marketplace. Borrowers post borrow tickets describing the loan they need; lenders post lend tickets describing capital they're offering. Counterparties respond with offers (or accept directly), and an accepted match becomes a loan.

The lifecycle at a glance

Create

POST /v1/tickets with the terms: type (borrow or lend), principal, currency, number of installments, reward and optional insurance. Requires an idempotency key.

Discover

Counterparties browse GET /v1/tickets (filterable by type, status, amount and installment ranges). Your own listings live at GET /v1/tickets/mine; offers you've made at GET /v1/tickets/offers.

Negotiate

Respond to a ticket with POST /v1/tickets/{ticket_id}/offers, or take the listed terms as-is with POST /v1/tickets/{ticket_id}/accept/direct. The ticket owner accepts, rejects, or the offerer withdraws via the /offers/{offer_id}/accept|reject|withdraw endpoints.

Approve and complete

Once matched, POST /v1/tickets/{ticket_id}/approve confirms the match and POST /v1/tickets/{ticket_id}/complete finalizes it into a loan. Lenders on borrow tickets additionally have lender-approve / lender-decline for their side of the confirmation.

Creating a ticket

curl -X POST https://api.getroja.com/v1/tickets \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: $(uuidgen)" \
-d '{
"type": "lend",
"ticket_name": "Short-term business loan",
"description": "Offering short-term lending with competitive reward",
"principal_amount": 100000,
"currency": "NGN",
"number_of_installments": 3,
"has_reward": true,
"reward_amount": 5000,
"total_amount": 105000
}'

Amounts are in the ticket's currency (NGN today). total_amount is the principal plus reward — what the borrower repays across all installments.

Judging risk before you commit

Before accepting a match, lenders can pull a per-ticket risk read:

  • GET /v1/tickets/{ticket_id}/risk-assessment — Roja's risk assessment for the ticket's borrower.
  • The borrower's Roja Score (GET /v1/score, tiers and history) feeds the same picture.

Sharing

POST /v1/tickets/{ticket_id}/share generates a shareable link for a ticket, so users can bring their own counterparty to the marketplace.