Super Admin Refunds
Function-calling namespace: superAdminRefunds
- Base URL:
https://api.aivida.in - Engine endpoint:
POST /api - Auth: Stack token middleware enabled in
optionalmode. - Send token in header:
x-stack-access-token: <access_token>(orAuthorization: Bearer <access_token>). - In
optionalmode: no token is allowed; invalid token is rejected with401.
create
Source: backend/endpoints/super-admin-refunds/create
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
paymentId | string | Yes | - |
organizationId | string | Yes | - |
patientId | string | No | - |
sourceType | string | No | - |
sourceId | string | No | - |
cancelledReason | string | No | - |
originalAmount | number | Yes | - |
refundAmount | number | Yes | - |
razorpayRefundId | string | No | - |
status | string | Yes | - |
notes | string | No | - |
processedByUserId | string | No | - |
processedAt | integer | No | unix-ms timestamp; nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "superAdminRefunds",
"apiName": "create",
"data": {
"paymentId": "payment_123",
"organizationId": "org_123",
"originalAmount": 1,
"refundAmount": 1,
"status": "scheduled"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/super-admin-refunds/delete
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "superAdminRefunds",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/super-admin-refunds/get-by-id
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "superAdminRefunds",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/super-admin-refunds/list-by-organization
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
organizationId | string | Yes | - |
page | integer | No | - |
pageSize | integer | No | - |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "superAdminRefunds",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/super-admin-refunds/update
Input Fields
| Field | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | - |
organizationId | string | Yes | - |
paymentId | string | No | nullable |
patientId | string | No | nullable |
sourceType | string | No | nullable |
sourceId | string | No | nullable |
cancelledReason | string | No | nullable |
originalAmount | number | No | nullable |
refundAmount | number | No | nullable |
razorpayRefundId | string | No | nullable |
status | string | No | nullable |
notes | string | No | nullable |
processedByUserId | string | No | nullable |
processedAt | integer | No | unix-ms timestamp; nullable |
createdAt | integer | No | unix-ms timestamp; nullable |
updatedAt | integer | No | unix-ms timestamp; nullable |
Example Request
curl -X POST https://api.aivida.in/api \
-H "Content-Type: application/json" \
-H "x-stack-access-token: <access_token_optional>" \
-d '{
"namespace": "superAdminRefunds",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }