Ir para o conteúdo
NimbusNexus

Faturamento

O faturamento é por workspace. Estes endpoints leem a situação da conta do workspace e mantêm os dados de faturamento dele:

  • GET /api/v1/billing/public/balances — as cobranças pós-pagas em aberto, o crédito promocional disponível e o saldo pré-pago em dinheiro, em um único retrato.
  • GET /api/v1/billing/public/accrued_charges — o total cobrado até agora que ainda não foi quitado.
  • GET /api/v1/billing/public/cash_balance — o saldo pré-pago em dinheiro, com o momento em que ele mudou pela última vez.
  • GET /api/v1/billing/public/promotion_grants — o crédito promocional ativo, com o que resta de cada concessão e quando ela expira.
  • GET e PATCH /api/v1/billing/public/billing_info — o endereço de faturamento, o nome da empresa e os endereços de e-mail que recebem extratos e recibos.

As faturas em si não estão disponíveis pela API.

Estas chamadas exigem uma sessão conectada, enviada como Authorization: Bearer ou pelo cookie da sessão. Uma chave de API não consegue fazê-las.

Próximos passos

Reference

GET/api/v1/billing/public/accrued_charges

Accrued Charges

Returns the total charges accrued by the current customer that have not yet been settled.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/billing/public/accrued_charges" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/billing/public/balances

Get Balances

Returns the customer's outstanding postpaid charges, available promotional credit, and prepaid cash balance in a single snapshot.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/billing/public/balances" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/billing/public/billing_info

Get Billing Info

Retrieves the billing address and notification email addresses for the current customer.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/billing/public/billing_info" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/billing/public/billing_info

Update Billing Info

Updates the billing address, company name, and notification email addresses for the current customer.

Request body

FieldTypeDescription
companystring | null—
addressAddressModel | null—
statement_emailstring | null—
receipt_emailstring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/billing/public/billing_info" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
GET/api/v1/billing/public/cash_balance

Get Cash Balance

Returns the current prepaid cash balance for the customer along with the timestamp it was last updated.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/billing/public/cash_balance" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/billing/public/promotion_grants

List Promotion Grants

Lists the customer's active promotional credit grants with their remaining amounts and expiration dates.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/billing/public/promotion_grants" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →