EndpointsPayments

Payments

Function-calling namespace: payments

  • Base URL: https://api.aivida.in
  • Engine endpoint: POST /api
  • Auth: Stack token middleware enabled in optional mode.
  • Send token in header: x-stack-access-token: <access_token> (or Authorization: Bearer <access_token>).
  • In optional mode: no token is allowed; invalid token is rejected with 401.

create

Source: backend/endpoints/payments/create

Input Fields

FieldTypeRequired
organizationIdstringYes
patientIdstringNo
sourceTypestringYes
sourceIdstringYes
amountfloat64Yes
currencystringYes
paymentMethodstringYes
statusstringYes
gatewaystringNo
gatewayOrderIdstringNo
gatewayPaymentIdstringNo
gatewaySignaturestringNo
checkoutSessionIdstringNo
manualReferenceNumberstringNo
notesstringNo
createdByUserIdstringNo
createdAt*int64No
updatedAt*int64No

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

FieldTypeRequired
idstringYes
organizationIdstringYes

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

FieldTypeRequired
idstringYes
organizationIdstringYes

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

FieldTypeRequired
organizationIdstringYes
pageintNo
pageSizeintNo

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

FieldTypeRequired
idstringYes
organizationIdstringYes
patientId*stringNo
sourceType*stringNo
sourceId*stringNo
amount*float64No
currency*stringNo
paymentMethod*stringNo
status*stringNo
gateway*stringNo
gatewayOrderId*stringNo
gatewayPaymentId*stringNo
gatewaySignature*stringNo
checkoutSessionId*stringNo
manualReferenceNumber*stringNo
notes*stringNo
createdByUserId*stringNo
createdAt*int64No
updatedAt*int64No

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": {} }