Endpoint #
GET /wp-json/rtcl/v1/payments
Description #
Retrieves a list of payments/orders for the currently authenticated user. Supports search, pagination, and sorting.
Authentication & Permission #
This endpoint requires: #
- REST API enabled in RTCL settings
- Valid authentication headers
- API Key
- Bearer JWT Token
- User must be:
- Logged in
Required Headers #
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_JWT_TOKEN |
| X-API-KEY | YOUR_API_KEY |
| Content-Type | application/json |
Request Parameters #
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
search | string | No | — | Search orders by string. |
per_page | integer | No | 20 | Number of items per page. Min: 1, Max: 100. |
page | integer | No | 1 | Current page number. Min: 1. |
order_by | string | No | — | Field to sort the results by (e.g., date, ID). |
order | string | No | — | Sorting order: ASC or DESC. |
cURL Example #
curl -X GET "https://example.com/wp-json/rtcl/v1/payments?per_page=10&page=1&order_by=date&order=DESC" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Success Response #
{
"data": [
{
"id": 403,
"price": "20.00",
"method": "Offline",
"status": "pending",
"transaction_id": "transaction id",
"order_key": "rtcl_oder_key",
"paid_date": "",
"created_date": "2026-01-29 06:57:22",
"gateway": {
"id": "offline",
"title": "Direct Bank Transfer",
"icon": null,
"instructions": "Make your payment directly in our bank account.",
"description": "Make your payment directly in our bank account. Please use your Order ID as payment reference. Your order won't get approved until the funds have cleared in our account."
}
},
{
"id": 402,
"price": "20.00",
"method": "Offline",
"status": "pending",
"transaction_id": "transaction id",
"order_key": "rtcl_oder_key",
"paid_date": "",
"created_date": "2026-01-29 06:54:01",
"gateway": {
"id": "offline",
"title": "Direct Bank Transfer",
"icon": null,
"instructions": "Make your payment directly in our bank account.",
"description": "Make your payment directly in our bank account. Please use your Order ID as payment reference. Your order won't get approved until the funds have cleared in our account."
}
},
{
"id": 400,
"price": "20.00",
"method": "Offline",
"status": "on-hold",
"transaction_id": "transaction id",
"order_key": "rtcl_oder_key",
"paid_date": "",
"created_date": "2026-01-26 08:57:38",
"gateway": {
"id": "offline",
"title": "Direct Bank Transfer",
"icon": null,
"instructions": "Make your payment directly in our bank account.",
"description": "Make your payment directly in our bank account. Please use your Order ID as payment reference. Your order won't get approved until the funds have cleared in our account."
}
},
{
"id": 152,
"price": "20.00",
"method": "Offline",
"status": "completed",
"transaction_id": "transaction id",
"order_key": "rtcl_oder_key",
"paid_date": "",
"created_date": "2025-08-04 06:57:39",
"gateway": {
"id": "offline",
"title": "Direct Bank Transfer",
"icon": null,
"instructions": "Make your payment directly in our bank account. ",
"description": "Make your payment directly in our bank account. Please use your Order ID as payment reference. Your order won't get approved until the funds have cleared in our account."
}
}
],
"pagination": {
"total": 4,
"count": 4,
"per_page": 20,
"current_page": 1,
"total_pages": 1
}
}
Error Responses #
Not Logged In #
{
"code": "FORBIDDEN",
"message": "You are not logged in.",
"data": {
"status": 403
}
}
REST API Disabled #
{
"code": "DENIED_REST_API",
"message": "Denied api call",
"data": {
"status": 403
}
}
Missing / Invalid Authentication #
{
"status": "error",
"error": "INVALID_API_KEY",
"code": "401",
"error_message": "Invalid API key or authorization token."
}
Missing Authorization Header #
{
"status": "error",
"error": "MISSING_AUTHORIZATION_HEADER",
"code": "401",
"error_message": "Authorization header not received. Either authorization header was not sent or it was removed by your server due to security reasons."
}
Invalid Authorization Token Type #
{
"status": "error",
"error": "INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE",
"code": "401",
"error_message": "Authorization header must be type of Bearer Token."
}
Invalid JWT Format (Segment Fault) #
{
"status": "error",
"error": "SEGMENT_FAULT",
"code": "401",
"error_message": "Incorrect JWT Format."
}
Invalid JWT Signature #
{
"status": "error",
"error": "INVALID_TOKEN",
"code": "401",
"error_message": "JWT signature verification failed."
}