Payments
Function-calling namespace: payments
- 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/payments/create
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
patientId | string | No |
sourceType | string | Yes |
sourceId | string | Yes |
amount | float64 | Yes |
currency | string | Yes |
paymentMethod | string | Yes |
status | string | Yes |
gateway | string | No |
gatewayOrderId | string | No |
gatewayPaymentId | string | No |
gatewaySignature | string | No |
checkoutSessionId | string | No |
manualReferenceNumber | string | No |
notes | string | No |
createdByUserId | string | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "payments",
"apiName": "create",
"data": {
"organizationId": "org_123",
"sourceType": "GENERAL",
"sourceId": "source_123",
"amount": 1,
"currency": "INR",
"paymentMethod": "value",
"status": "ACTIVE"
}
}'Example Response
{ "status": "ok", "data": {} }delete
Source: backend/endpoints/payments/delete
Input Fields
| Field | Type | Required |
|---|---|---|
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": "payments",
"apiName": "delete",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }getById
Source: backend/endpoints/payments/get-by-id
Input Fields
| Field | Type | Required |
|---|---|---|
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": "payments",
"apiName": "getById",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }listByOrganization
Source: backend/endpoints/payments/list-by-organization
Input Fields
| Field | Type | Required |
|---|---|---|
organizationId | string | Yes |
page | int | No |
pageSize | int | 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": "payments",
"apiName": "listByOrganization",
"data": {
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }update
Source: backend/endpoints/payments/update
Input Fields
| Field | Type | Required |
|---|---|---|
id | string | Yes |
organizationId | string | Yes |
patientId | *string | No |
sourceType | *string | No |
sourceId | *string | No |
amount | *float64 | No |
currency | *string | No |
paymentMethod | *string | No |
status | *string | No |
gateway | *string | No |
gatewayOrderId | *string | No |
gatewayPaymentId | *string | No |
gatewaySignature | *string | No |
checkoutSessionId | *string | No |
manualReferenceNumber | *string | No |
notes | *string | No |
createdByUserId | *string | No |
createdAt | *int64 | No |
updatedAt | *int64 | 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": "payments",
"apiName": "update",
"data": {
"id": "id_123",
"organizationId": "org_123"
}
}'Example Response
{ "status": "ok", "data": {} }