Reporting API v1.0

Reconcile payments, audit calls

Five read-only endpoints for pulling transaction history, Call Detail Records, API traces, and webhook delivery logs out of Paytia. Use them to feed your own reporting dashboards, build reconciliation runs, or debug payment flows without logging in to the portal.

API reference menu

The five endpoints

All five share the same base URL, the same authentication model, and the same response envelope. Every request is a POST with a JSON body.

EndpointPurpose
POST /api/payment_takenPayment transaction history — filter, paginate, search
POST /api/manage_cdr_logsCall Detail Record logs — filter and paginate
POST /api/view_cdr_logCDR detail for a single call (by cdr_id)
POST /api/view_api_details_cdrAPI call trace (request/response pair) for a CDR
POST /api/webhook_request_dataWebhook delivery logs for a given CDR

Environments

EnvironmentBase URL
Sandboxhttps://accounts.pay729.guru/
Productionhttps://accounts.pay729.net/ or https://accounts.paytia.com/

Authentication

There are two ways to authenticate. Both keys are configured under Account Security → API secret key in the SecureFlow merchant portal.

  • X-API-KEY header — a static key. Simple to set up, no rotation required. Fine for internal scripts and server-to-server integrations where you control the environment.
  • ACCESS-TOKEN header — a short-lived token issued via the Enhanced API Security licence. Expires after one hour; you rotate it with a refresh token. Use this if you need stricter key hygiene or regular rotation.

Getting an access token (Enhanced API Security)

Three steps:

  1. In the merchant portal, go to API secret key → Generate Tokens. This issues a client_id, client_secret, and a refresh_token.
  2. Exchange them at POST /api/authorize by sending client_id and client_secret as form fields. The response includes an access_token (valid for one hour) and a new refresh_token.
  3. Before the token expires, call POST /api/refresh_token with the same fields plus refresh_token. You'll get a fresh pair back.
// POST /api/authorize — response
{
  "httpStatus": true,
  "refresh_token": "M+ixxr3jST3uPlVFQmbCpiDr+ea12WLyQvRQUjSEK1w=",
  "access_token": "kQ3bwoO+k2ol6YL9dcD9QSON2GhrMuGSjf8OigtY3jo=",
  "expire_time": "2024-03-15 14:05:57",
  "status": { "statusCode": 200, "statusDescription": "success" }
}
json

Treat access_token as ephemeral and rotate it before expire_time. A 400 with the message "Access token expired, please generate again using refresh token" means you left it too late.

Response envelope

Every endpoint wraps its result in the same shape:

{
  "httpStatus": true,
  "reference_id": "your-echoed-ref",
  "status": {
    "statusCode": 200,
    "statusDescription": "success"
  },
  "data": [ ... ]
}
json

httpStatus is true on success, false on error. reference_id echoes whatever you sent in the request, so you can correlate calls in your own logs. data is always an array — empty on no results.

Error codes

All five endpoints return the same error shapes. The most common ones you'll see:

ErrorCodeResponse description
API key missing400API key is required.
Invalid API key401Invalid API key.
Access token missing400Access token is required.
Invalid access token400Invalid access token.
Access token expired400Access token expired, please generate again using refresh token.
CDR ID missing400Cdr id is Required
No data found400No Data Founddata is an empty array

Payment history — POST /api/payment_taken

Returns paginated payment transaction records. All parameters are optional — call with none to get the most recent transactions.

FieldTypeDescription
reference_idstringYour request reference, echoed back in the response.
pageintegerPagination page number (1-based).
limit_per_pageintegerRecords per page. Allowed values: 10, 25, 50, 100.
start_date / end_dateYYYY-MM-DDDate range filter.
statusstringsuccess, failed, or pending.
search_transaction_idstringSearch by Paytia transaction ID.
search_ref_brnstringSearch by BRN reference.
search_amountstringSearch by transaction amount.
search_first_name / search_last_namestringSearch by customer name.
search_acquirer_messagestringSearch by acquirer message text.
search_nicknamestringSearch by payment gateway nickname.
search_gateway_codestringSearch by gateway code.

Each record in the data array includes:

  • unique_id — Paytia transaction identifier
  • cdr_id — linked call record (if the payment came from a phone call)
  • txn_type — transaction type, e.g. Charge immediately
  • first_name, last_name, company_name
  • agent_name — the agent who handled the call
  • card_last_four_digit, card_brand
  • reference_no, account_number
  • datetime — in DD-MM-YYYY HH:MM:SS format
  • currency, net, tax, total_sell_price
  • transaction_charge, processing_charge, paytia_brand_fee
  • statussuccess, failed, or pending
  • acquirer_message — the gateway's response message
  • gateway_nickname — which gateway processed it
  • metadata, custom_metadata_fields
// Sample request
{
  "reference_id": "ref-recon-001",
  "start_date": "2026-06-01",
  "end_date": "2026-06-30",
  "status": "success",
  "limit_per_page": 100,
  "page": 1
}
json

CDR logs — POST /api/manage_cdr_logs

Returns Call Detail Record logs. If you don't supply date parameters, the default window is the last seven days to today.

FieldTypeDescription
reference_idstringYour request reference.
pageintegerPagination page number.
limit_per_pageintegerAllowed values: 10, 25, 50, 100.
start_dateYYYY-MM-DDStart of date range. Defaults to 7 days ago.
end_dateYYYY-MM-DDEnd of date range. Defaults to today.
search_numberstringFilter by phone number.
search_cdr_idstringFilter by CDR ID.
originator_typestringFilter by originator — e.g. customer.
search_agent_idstringFilter by agent ID.

Each CDR record includes:

  • cdr_id — unique call identifier (used by the three detail endpoints below)
  • agent_id
  • originatorcustomer or agent-side
  • merchant_email
  • call_from, call_to_paytia, call_to — E.164 numbers
  • start_time, end_time
  • ringing, answer_talking, total_duration — in HH:MM:SS

CDR detail — POST /api/view_cdr_log

Fetches the full leg-level detail for a single call, identified by cdr_id. You'll typically call this after finding the record you want via /api/manage_cdr_logs.

FieldRequiredDescription
cdr_idYesThe CDR identifier.
reference_idNoYour request reference.

The response data contains inbound and outbound leg fields. Fields prefixed in* describe the inbound leg — DDI (inddi), CLI (incli), state (instate), and timestamps (intimes, intimee, intimea). Fields prefixed out* describe the outbound leg. The state and hang* fields describe call-setup progress and hang-up cause.

// Sample request
{
  "reference_id": "ref-debug-001",
  "cdr_id": "i-0b943301f1597b410-49662"
}
json

API trace — POST /api/view_api_details_cdr

Returns the exact request/response pair that Paytia exchanged with the merchant endpoint during a call. Useful for debugging unexpected IVR behaviour or replaying a scenario to understand what was sent and received.

FieldRequiredDescription
cdr_idYesThe CDR identifier.
reference_idNoYour request reference.

The response includes:

  • uri — the merchant endpoint Paytia called
  • method — HTTP method used
  • request_params — the serialised request Paytia sent
  • response — what the merchant endpoint returned
  • actual_response — the final response value
  • time — timestamp of the API call

Pair this with /api/view_cdr_log to get the full picture: the call legs plus the API exchange that drove the payment decision.


Webhook delivery logs — POST /api/webhook_request_data

Shows exactly what Paytia posted to your webhook_url for a given call, and how your endpoint responded. If a webhook is showing as failed in your logs, this is the first place to look.

FieldRequiredDescription
cdr_idYesThe CDR identifier.
reference_idNoYour request reference.

The response data shows:

  • webhook_response — the full JSON payload Paytia sent to your endpoint
  • http_code — the HTTP status your endpoint returned (0 means no response received)
  • description — brief and tooltip descriptions of the outcome
  • statussuccess or failed
  • date_time — when the delivery was attempted

Pair this with /api/payment_taken when you need an end-to-end audit: pull the transaction record to confirm what was charged, then pull the webhook log to confirm what your system was told.

For general webhook integration — subscribing, payload format, retry behaviour — see the Webhooks reference.


Support

Postman collections for all five endpoints are available on request. Write to techsupport@paytia.com.

Ready to build with Paytia?

The docs are open. Keys are gated — drop us a line and we'll issue sandbox credentials so you can try every flow against a real endpoint.