Pix Automático

Criar Pix Automatic Configuration

Changed on

Registra a configuração de cobrança do Pix Automático de uma Subscription.

post/brazil/pix_automatic_configuration

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/brazil/pix_automatic_configuration
  • Auth
    API key in header x-api-key

Request body

allow_retriesboolean nullable

Política de retentativas com que a recorrência é cadastrada: com true, até 3 retentativas em 7 dias. Alguns provedores cadastram sempre com retentativas, independentemente deste campo.

business_day_only_collectionboolean nullable

Quando true, a cobrança é enviada com o ajuste para dia útil, nos provedores que aceitam esse ajuste.

collection_dayinteger nullable

Dia do mês registrado na configuração. Hoje não é enviado ao banco nem usado no cálculo das cobranças.

collection_frequency'SEMANAL' | 'MENSAL' | 'TRIMESTRAL' | 'SEMESTRAL' | 'ANUAL'

Periodicidade da recorrência de uma cobrança do Pix Automático: de quanto em quanto tempo o banco do pagador autoriza o próximo débito. Os valores são os que o banco espera, por isso mantêm a nomenclatura em português.

days_between_retriesinteger nullable

Dias entre retentativas registrados na configuração. Hoje não é enviado ao banco nem usado no cálculo das cobranças.

final_datestring nullable

Data a partir da qual a recorrência deixa de valer, no formato YYYY-MM-DD. Quando ausente, a recorrência é cadastrada sem data de término.

first_payment_datestring nullable

Data da primeira cobrança, no formato YYYY-MM-DD. Quando ausente, o cadastro da recorrência usa a data do dia.

fixed_valuenumber nullable

Valor fixo de cada cobrança, em reais, enviado ao banco como valor da recorrência.

id_subscriptionstring required

Identificador da Subscription cuja cobrança está sendo configurada.

maximum_valuenumber nullable

Valor máximo registrado na configuração. Hoje não é enviado ao banco nem usado no cálculo das cobranças.

minimum_valuenumber nullable

Valor mínimo autorizado para cada cobrança, em reais.

Example request

{
  "allow_retries": true,
  "first_payment_date": "2028-07-01",
  "id_subscription": "sub_uSikDF1U0fD6SKR46_gTUU7Pbm4Odl22",
  "minimum_value": 10
}

Response

Configuração de cobrança registrada.

statusstring required

Resultado do processamento.

Example response

{
  "status": "success"
}

Changes

    • breaking

      request body became required

    • breaking

      removed the enum value ANUAL of the request property

    • breaking

      removed the enum value MENSAL of the request property

    • breaking

      removed the enum value SEMANAL of the request property

    • breaking

      removed the enum value SEMESTRAL of the request property

    • breaking

      removed the enum value TRIMESTRAL of the request property

    • breaking

      the request property type changed from string to no type

    • breaking

      removed the success response with the status

    • info

      api operation id obter-configuração-copy removed and replaced with create_pix_automatic_configuration

    • info

      api tag Pix Automático added

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added subschema #2 to the request property anyOf list

    • info

      the request property default value true was removed

    • info

      the request property default value false was removed

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the success response with the status