Skip to main content

Transactions and Payments

Review payment activity and download invoices from your authenticated YODI account. Payment initiation and subscription management are handled in the Console; the API routes below are account-scoped and require an authenticated YODI session cookie. They do not accept an API key as a substitute for that session.

All JSON responses use the standard YODI response envelope. Invoice downloads are PDF bytes and are the documented binary-response exception.

List transactions​

GET /v1/paygate/transactions

The list is scoped to the signed-in account. Optional query parameters are page (integer, zero-based), limit (1–50), sortBy (date, amount, or status), sortDir (asc or desc), status (all, SUCCESS, PENDING, FAILED, CANCELLED, or EXPIRED), dateFrom, and dateTo (ISO 8601 dates). When page is supplied, data contains data, total, page, and limit. Without page, data is the transaction array.

GET /v1/paygate/transactions?page=0&limit=10 HTTP/1.1
Host: api.yodi.tg
Cookie: <authenticated YODI session>

Each transaction exposes numeric id, status, amount_paid, payment_method, phone_number, tx_reference, payment_reference, description, created_at, datetime_paid, and plan ({ id, name } or null). Nullable fields may be null. Do not infer a currency from the amount; use the payment summary endpoint for currency-grouped totals.

Payment summary​

GET /v1/paygate/transactions/summary

Returns totals grouped by currency, successful transaction count, and total transaction count. Currency totals are not combined across currencies.

Check a payment​

GET /v1/paygate/payment-status?identifier=<identifier>

The identifier must be 1–50 characters and match ^[A-Za-z0-9_-]+$. The lookup is scoped to the authenticated account. A JSON success response has data.initialized and data.status; when no matching transaction exists, initialized is false and status is null.

GET /v1/paygate/payment-status?identifier=YOUR_TRANSACTION_IDENTIFIER HTTP/1.1
Host: api.yodi.tg
Cookie: <authenticated YODI session>

Download an invoice​

GET /v1/paygate/transactions/{id}/invoice

id is a numeric transaction ID. The endpoint returns a PDF attachment, not the JSON envelope, and checks that the transaction belongs to the signed-in account. An optional lang query parameter selects the invoice language.

Manage payments​

Start or manage a subscription from the YODI Console. The payment provider and available payment methods are selected by the platform; this API reference does not promise specific providers, currencies, or payment methods.