Customer Collection Accounts

Crear Customer Collection Account

Changed on

Registra la cuenta bancaria con la que se le cobrará a un Customer por PAC o domiciliación bancaria.

Es idempotente por Customer y Subscription: si ya existe una cuenta vigente para esa combinación, se actualiza con los datos enviados en vez de crearse otra. Omitir subscription apunta a la cuenta que no está asociada a ninguna Subscription. El número de cuenta se normaliza quitando todo carácter que no sea alfanumérico.

Cuando no se envía currency_code se usa la moneda por defecto del país de la organización, y cuando no se envía government_id se usa el del Customer. Responde 404 si el Customer o la Subscription no existen bajo la organización autenticada, y 422 cuando no se envía currency_code y el país de la organización no tiene una moneda por defecto.

post/customer-collection-accounts

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/customer-collection-accounts
  • Auth
    API key in header x-api-key

Headers

x-account-keystring

Llave de API de una Account, para operar sobre esa Account en lugar de la principal.

Request body

account_numberstring required

Número de la cuenta. Se normaliza quitando todo carácter que no sea alfanumérico.

account_type'checking_account' | 'sight_account' required

An enumeration.

currency_code'CLP' | 'CLF' | 'MXN' | 'BRL' | 'USD'

Moneda, en código ISO 4217. Cubre las monedas de los países donde Toku opera —CLP (peso chileno), MXN (peso mexicano) y BRL (real)— más USD y CLF, la Unidad de Fomento chilena. La moneda determina cuántos decimales admiten los montos: CLP no admite decimales, MXN, BRL y USD admiten dos, y CLF cuatro.

customerstring required

Customer al que se le cobrará desde esta cuenta.

government_idstring

Identificador tributario del titular de la cuenta. Si se omite, se usa el del Customer.

institution_id'mock' | 'cl_banco_bbva' | 'cl_banco_bci' | 'cl_banco_bci_direct' | 'cl_banco_bci_360' | 'cl_banco_bice' | 'cl_banco_consorcio' | 'cl_banco_coopeuch' | 'cl_banco_corpbanca' | 'cl_banco_de_chile' | 'cl_banco_deutsche' | 'cl_banco_estado' | 'cl_banco_falabella' | 'cl_banco_hsbc' | 'cl_banco_internacional' | 'cl_banco_itau' | 'cl_banco_ripley' | 'cl_banco_santander' | 'cl_banco_scotiabank' | 'cl_banco_security' | 'cl_banco_superdigital' | 'cl_copec_pay' | 'cl_demo_bank' | 'cl_mercado_pago' | 'cl_prepago_los_heroes' | 'cl_tapp_caja_los_andes' | 'cl_fintual' | 'cl_tenpo' | 'cl_banco_btg_pactual' | 'cl_banco_paris' | 'cl_banco_penta' | 'cl_rabobank' | 'cl_hsbc_bank' | 'cl_banco_do_brasil' | 'cl_china_construction_bank' | 'cl_the_bank_of_tokyo' | 'cl_banco_de_la_nacion_argentina' | 'cl_jp_morgan_chase_bank' | 'mx_abc_capital' | 'mx_american_express_bank' | 'mx_ban_coppel' | 'mx_banca_afirme' | 'mx_banca_mifel' | 'mx_banco_actinver' | 'mx_banco_autofin' | 'mx_banco_azteca' | 'mx_banco_bancrea' | 'mx_banco_base' | 'mx_banco_compartamos' | 'mx_banco_covalto' | 'mx_banco_credit_suisse' | 'mx_banco_forjadores' | 'mx_banco_inbursa' | 'mx_banco_inmobiliario_mexicano' | 'mx_banco_invex' | 'mx_banco_jp_morgan' | 'mx_banco_keb_hana' | 'mx_banco_monex' | 'mx_banco_multiva' | 'mx_banco_paga_todo' | 'mx_banco_regional_de_monterrey' | 'mx_banco_s3_caceis_mexico' | 'mx_banco_sabadell' | 'mx_banco_santander' | 'mx_banco_shinhan_de_mexico' | 'mx_banco_ve_por_mas' | 'mx_banco_de_inversion_afirme' | 'mx_banco_del_bajio' | 'mx_bankaool' | 'mx_bank_of_america' | 'mx_bank_of_china' | 'mx_banorte' | 'mx_bansi' | 'mx_barclays_bank' | 'mx_banco_bbva' | 'mx_banco_bbva_bancomer' | 'mx_bnp_paribas' | 'mx_ci_banco' | 'mx_citibanamex' | 'mx_consubanco' | 'mx_deutsche_bank_mexico' | 'mx_fundacion_donde_banco' | 'mx_banco_hsbc' | 'mx_industrial_and_commercial_bank_of_china' | 'mx_intercam_banco' | 'mx_mizuho_bank' | 'mx_mufg_bank' | 'mx_banco_scotiabank' | 'mx_akala' | 'mx_arcus' | 'mx_asp_integra_opc' | 'mx_babien' | 'mx_banco_mext' | 'mx_banobras' | 'mx_caja_pop_mexica' | 'mx_caja_telefonist' | 'mx_cb_intercam' | 'mx_ci_bolsa' | 'mx_cls' | 'mx_codi_valida' | 'mx_credicapital' | 'mx_cristobal_colon' | 'mx_finamex' | 'mx_fincomun' | 'mx_fomped' | 'mx_fondo_fira' | 'mx_gbm' | 'mx_hipotecaria_fed' | 'mx_indeval' | 'mx_invercap' | 'mx_kuspit' | 'mx_libertad' | 'mx_masari' | 'mx_monex_cb' | 'mx_multivida_casa_de_bolsa' | 'mx_nafin' | 'mx_operadora_de_pagos_moviles' | 'mx_profuturo' | 'mx_stp' | 'mx_tactiv_casa_de_bolsa' | 'mx_unagra' | 'mx_valmex' | 'mx_value' | 'mx_vector_casa_de_bolsa' | 'mx_volkswagen_bank' | 'mx_reforma' | 'mx_tesored' | 'mx_nvio' | 'mx_alternativos' | 'mx_banco_de_mexico' | 'mx_banjercito' | 'mx_mercado_pago' | 'mx_cuenca' | 'mx_fondeadora' required

Institución financiera, identificada por un código propio de Toku con el país como prefijo (cl_, mx_). Cubre bancos, cajas, corredoras y billeteras digitales de Chile y México. mock existe solo para pruebas y no corresponde a ninguna institución real.

Es un catálogo que crece al integrar instituciones nuevas, así que conviene leerlo como una lista abierta.

subscriptionstring

Subscription a la que aplica la cuenta. Si se omite, la cuenta queda registrada para todas las Subscriptions del Customer.

Example request

{
  "account_number": "123456789",
  "customer": "cus_Ht7Kd2vRq0XbNm4Y_3ZpLcJfW9Ee1AsU",
  "subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
}

Response

Successful Response

account_numberstring required

Número de la cuenta, sin guiones ni espacios.

account_typestring required

Tipo de la cuenta: checking_account es una cuenta corriente y sight_account una cuenta vista.

currency_code'CLP' | 'CLF' | 'MXN' | 'BRL' | 'USD' required

Moneda, en código ISO 4217. Cubre las monedas de los países donde Toku opera —CLP (peso chileno), MXN (peso mexicano) y BRL (real)— más USD y CLF, la Unidad de Fomento chilena. La moneda determina cuántos decimales admiten los montos: CLP no admite decimales, MXN, BRL y USD admiten dos, y CLF cuatro.

customerstring required

Customer dueño de la cuenta.

government_idstring

Identificador tributario del titular de la cuenta.

institution_id'mock' | 'cl_banco_bbva' | 'cl_banco_bci' | 'cl_banco_bci_direct' | 'cl_banco_bci_360' | 'cl_banco_bice' | 'cl_banco_consorcio' | 'cl_banco_coopeuch' | 'cl_banco_corpbanca' | 'cl_banco_de_chile' | 'cl_banco_deutsche' | 'cl_banco_estado' | 'cl_banco_falabella' | 'cl_banco_hsbc' | 'cl_banco_internacional' | 'cl_banco_itau' | 'cl_banco_ripley' | 'cl_banco_santander' | 'cl_banco_scotiabank' | 'cl_banco_security' | 'cl_banco_superdigital' | 'cl_copec_pay' | 'cl_demo_bank' | 'cl_mercado_pago' | 'cl_prepago_los_heroes' | 'cl_tapp_caja_los_andes' | 'cl_fintual' | 'cl_tenpo' | 'cl_banco_btg_pactual' | 'cl_banco_paris' | 'cl_banco_penta' | 'cl_rabobank' | 'cl_hsbc_bank' | 'cl_banco_do_brasil' | 'cl_china_construction_bank' | 'cl_the_bank_of_tokyo' | 'cl_banco_de_la_nacion_argentina' | 'cl_jp_morgan_chase_bank' | 'mx_abc_capital' | 'mx_american_express_bank' | 'mx_ban_coppel' | 'mx_banca_afirme' | 'mx_banca_mifel' | 'mx_banco_actinver' | 'mx_banco_autofin' | 'mx_banco_azteca' | 'mx_banco_bancrea' | 'mx_banco_base' | 'mx_banco_compartamos' | 'mx_banco_covalto' | 'mx_banco_credit_suisse' | 'mx_banco_forjadores' | 'mx_banco_inbursa' | 'mx_banco_inmobiliario_mexicano' | 'mx_banco_invex' | 'mx_banco_jp_morgan' | 'mx_banco_keb_hana' | 'mx_banco_monex' | 'mx_banco_multiva' | 'mx_banco_paga_todo' | 'mx_banco_regional_de_monterrey' | 'mx_banco_s3_caceis_mexico' | 'mx_banco_sabadell' | 'mx_banco_santander' | 'mx_banco_shinhan_de_mexico' | 'mx_banco_ve_por_mas' | 'mx_banco_de_inversion_afirme' | 'mx_banco_del_bajio' | 'mx_bankaool' | 'mx_bank_of_america' | 'mx_bank_of_china' | 'mx_banorte' | 'mx_bansi' | 'mx_barclays_bank' | 'mx_banco_bbva' | 'mx_banco_bbva_bancomer' | 'mx_bnp_paribas' | 'mx_ci_banco' | 'mx_citibanamex' | 'mx_consubanco' | 'mx_deutsche_bank_mexico' | 'mx_fundacion_donde_banco' | 'mx_banco_hsbc' | 'mx_industrial_and_commercial_bank_of_china' | 'mx_intercam_banco' | 'mx_mizuho_bank' | 'mx_mufg_bank' | 'mx_banco_scotiabank' | 'mx_akala' | 'mx_arcus' | 'mx_asp_integra_opc' | 'mx_babien' | 'mx_banco_mext' | 'mx_banobras' | 'mx_caja_pop_mexica' | 'mx_caja_telefonist' | 'mx_cb_intercam' | 'mx_ci_bolsa' | 'mx_cls' | 'mx_codi_valida' | 'mx_credicapital' | 'mx_cristobal_colon' | 'mx_finamex' | 'mx_fincomun' | 'mx_fomped' | 'mx_fondo_fira' | 'mx_gbm' | 'mx_hipotecaria_fed' | 'mx_indeval' | 'mx_invercap' | 'mx_kuspit' | 'mx_libertad' | 'mx_masari' | 'mx_monex_cb' | 'mx_multivida_casa_de_bolsa' | 'mx_nafin' | 'mx_operadora_de_pagos_moviles' | 'mx_profuturo' | 'mx_stp' | 'mx_tactiv_casa_de_bolsa' | 'mx_unagra' | 'mx_valmex' | 'mx_value' | 'mx_vector_casa_de_bolsa' | 'mx_volkswagen_bank' | 'mx_reforma' | 'mx_tesored' | 'mx_nvio' | 'mx_alternativos' | 'mx_banco_de_mexico' | 'mx_banjercito' | 'mx_mercado_pago' | 'mx_cuenca' | 'mx_fondeadora' required

Institución financiera, identificada por un código propio de Toku con el país como prefijo (cl_, mx_). Cubre bancos, cajas, corredoras y billeteras digitales de Chile y México. mock existe solo para pruebas y no corresponde a ninguna institución real.

Es un catálogo que crece al integrar instituciones nuevas, así que conviene leerlo como una lista abierta.

subscriptionstring

Subscription a la que aplica la cuenta. Es null cuando la cuenta vale para todas las Subscriptions del Customer.

Example response

{
  "customer": "cus_Ht7Kd2vRq0XbNm4Y_3ZpLcJfW9Ee1AsU",
  "subscription": "sub_Yx4Qb1oT8kFhLmN2_9AwZrJvE6Ss0uKd"
}

Changes

    • breaking

      request body became required

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      removed the enum value CLF of the request property

    • breaking

      removed the enum value CLP of the request property

    • breaking

      removed the enum value checking_account of the request property

    • breaking

      removed the enum value sight_account of the request property

    • breaking

      the request property type changed from string to no type

    • breaking

      the request property type changed from string to no type

    • breaking

      the request property type changed from string to no type

    • breaking

      the response's property type changed from string to no type for status

    • breaking

      the response's property type changed from string to no type for status

    • breaking

      the response's property type changed from no type to string for status

    • info

      api operation id crear-customer-collection-account removed and replaced with post_customer_collection_account_endpoint

    • info

      api tag Customer Collection Accounts added

    • info

      added the new optional header request parameter x-account-key

    • 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 to the response property allOf list for the response status

    • info

      added to the response property allOf list for the response status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status