Skip to main content
POST
/
fees
Criar Taxa
curl --request POST \
  --url https://api.example.com/fees \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "eventName": "<string>",
  "currency": "<string>",
  "tokens": [
    {
      "tokenId": "<string>"
    }
  ]
}
'
{
  "feeId": "019525fd-8f54-7d6b-c3e9-5f7a9b1d3e5b",
  "externalProductRef": "prod_stripe_abc",
  "externalPriceRef": "price_stripe_abc",
  "externalBillingMeterRef": "meter_stripe_abc",
  "name": "Transcription",
  "description": "Transcription usage fee",
  "eventName": "transcription.complete",
  "currency": "BRL",
  "status": "ACTIVE",
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-03-25T14:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-03-25T14:00:00.000Z"
}
Requer permissao fee:write.

Headers

Authorization
string
required
Bearer token.

Corpo da Requisicao

name
string
required
Nome da taxa. Max 255 caracteres.
description
string
required
Description.
eventName
string
required
Unique event name. Max 255 caracteres.
currency
string
required
Um de: USD, BRL, EUR.
tokens
array
Token associations.

Resposta

feeId
string
ID da taxa.
externalProductRef
string
External product reference.
externalPriceRef
string
External price reference.
externalBillingMeterRef
string
External billing meter reference.
name
string
Nome da taxa.
description
string
Descricao da taxa.
eventName
string
Event name.
currency
string
Codigo da moeda.
status
string
Status da taxa.
createdBy
string
Identificador do criador.
createdAt
string
Timestamp de criacao.
updatedBy
string
Identificador do ultimo atualizador.
updatedAt
string
Timestamp da ultima atualizacao.
{
  "feeId": "019525fd-8f54-7d6b-c3e9-5f7a9b1d3e5b",
  "externalProductRef": "prod_stripe_abc",
  "externalPriceRef": "price_stripe_abc",
  "externalBillingMeterRef": "meter_stripe_abc",
  "name": "Transcription",
  "description": "Transcription usage fee",
  "eventName": "transcription.complete",
  "currency": "BRL",
  "status": "ACTIVE",
  "createdBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "createdAt": "2026-03-25T14:00:00.000Z",
  "updatedBy": "019525fd-56a8-7db4-8c3e-2a1b4d6f8e0c",
  "updatedAt": "2026-03-25T14:00:00.000Z"
}

Exemplos de Codigo

curl -X POST https://api.awsales.io/admin/fees \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "API Call Fee",
  "description": "Per-call fee for API usage",
  "eventName": "api_call",
  "currency": "BRL"
}'

Codigos de Erro

StatusCodigoDescricao
400validation_errorEntrada invalida ou campos obrigatorios ausentes
401unauthorizedAutenticacao ausente ou invalida
403forbiddenPermissoes insuficientes
409fee.event_name_already_existsFee event name is already in use
422fee.max_of_20_fees_active_reachedMaximum of 20 active fees reached
500internal_server_errorOcorreu um erro inesperado