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"
}
Criar uma nova taxa baseada em uso com configuracao de preco e unidade.
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"
}
fee:write.USD, BRL, EUR.{
"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"
}
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"
}'
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
409 | fee.event_name_already_exists | Fee event name is already in use |
422 | fee.max_of_20_fees_active_reached | Maximum of 20 active fees reached |
500 | internal_server_error | Ocorreu um erro inesperado |