Transfer Credits

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /user/limit/transfer_credits

Moves credits between a parent (matriz) account and one of its sub-accounts. A single endpoint handles two operations, selected by the type field.

📘

Authorization

Only parent accounts can call this endpoint. Both operations require sub_account_id to be a sub-account owned by the authenticated parent. The caller must also have a Library provisioned.

Operations

OperationtypeDescription
Transfer creditstransferMoves credits from the parent to the sub-account
Redeem creditsredeemPulls credits from the sub-account back to the parent

HTTP Method & Path

POST /user/limit/transfer_credits

Base URL: https://api-v2.pandavideo.com.br

Authentication Requirements

  • Security Scheme: PandaAuth (apiKey)
  • Header: Authorization: <your_api_token> (no Bearer prefix)

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesPanda API token (without Bearer prefix)

Request Body

Content-Type: application/json

FieldTypeRequiredDescriptionConstraints
sub_account_idstring (uuid)YesThe sub-account involved in the operation
creditsnumberYesAmount of credits to moveGreater than 0
typestringYesOperation typeEnum: transfer, redeem

Example — transfer (parent → sub-account)

{ "sub_account_id": "efcb5915-df17-46b6-bfd8-e8998bc94917", "credits": 100, "type": "transfer" }

Example — redeem (sub-account → parent)

{ "sub_account_id": "efcb5915-df17-46b6-bfd8-e8998bc94917", "credits": 50, "type": "redeem" }

Response

Success Response (200)

{
  "status": "success",
  "message": "Credits transferred successfully",
  "parent_organization_id": "parent_organization_id",
  "sub_account_id": "sub_account_id",
  "credits_transferred": 100,
  "balance_final": {
    "id": "id",
    "amount": 100,
    "created_at": "2026-04-15T14:24:23.921Z",
    "updated_at": "2026-04-17T13:57:26.108Z",
    "user_id": "user_id"
  }
}
FieldTypeDescription
statusstring"success" on completion
messagestring"Credits transferred successfully" or "Credits redeemed successfully"
parent_organization_idstring (uuid)Parent (matriz) organization ID
sub_account_idstring (uuid)Sub-account involved
credits_transferrednumberCredits moved in this operation
balance_finalobjectThe recipient's credit balance record after the operation (balance_final.amount = new balance)
⚠️

Important: the response has no type or remaining_credits field. Balances are tracked per each org's root user.

Error Responses

All validation/business failures return 400 Bad Request (this endpoint does not use 404 or 422). Common messages:

  • "sub_account_id and credits are required"
  • "Credits amount must be greater than zero"
  • "Target account not found"
  • "Transfer not allowed - target account is not a sub-account of current organization"
  • "Target account does not have a parent organization" (redeem)
  • 'Invalid type. Must be "redeem" or "transfer"'
  • "Insufficient credits"

Other: 401 Unauthorized (invalid token); 404 Not Found only if the caller has no Library; 500 Internal Server Error.

Example Usage

cURL

curl -X POST \
  'https://api-v2.pandavideo.com.br/user/limit/transfer_credits' \
  -H 'Authorization: your_api_token_here' \
  -H 'Content-Type: application/json' \
  -d '{ "sub_account_id": "your_sub_account_id_here", "credits": 100, "type": "transfer" }'
Responses

400

Bad Request

401

Unauthorized

500

Internal Server Error

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json