Skip to main content

kobana banking customer-subscriptions

Commands of kobana banking customer-subscriptions. Every global option (Global options) applies here.

CommandHTTPDescription
customer-subscriptions listGET /v1/customer_subscriptionsList Subscriptions
customer-subscriptions createPOST /v1/customer_subscriptionsCreate a Subscription
customer-subscriptions getGET /v1/customer_subscriptions/{id}Subscription Information
customer-subscriptions updatePUT /v1/customer_subscriptions/{id}Update Subscription
customer-subscriptions deleteDELETE /v1/customer_subscriptions/{id}Delete Subscription
customer-subscriptions next-chargePOST /v1/customer_subscriptions/{id}/next_chargeGenerate Next Charge

customer-subscriptions list​

List Subscriptions

kobana banking customer-subscriptions list [OPTIONS]

GET /v1/customer_subscriptions

List subscriptions.

Query parameters

NameTypeRequiredDescription
customer_person_namestringnoFilter by Name/Business Name.
customer_cnpj_cpfstringnoFilter by CPF/CNPJ of the subscription. Must be formatted with mask. Find all records whose field matches the string.
customer_emailstringnoFilter by customer email. Find all records whose field matches the string.
pageintegernoPage Number
per_pageintegernoNumber of records per page

Responses

HTTPDescription
200Success in listing subscriptions

customer-subscriptions create​

Create a Subscription

kobana banking customer-subscriptions create [OPTIONS]

POST /v1/customer_subscriptions

Creates a new recurring subscription for automatic collection of customers with bank billets.

Request body

NameTypeRequiredDescription
customer_person_namestringyesCustomer name
customer_cnpj_cpfstringyesCustomer CPF/CNPJ
customer_zipcodestringyesZIP Code (format 99999999)
customer_addressstringyesAddress
customer_city_namestringyesCity (Name must be correct and complete)
customer_statestringyesState
customer_neighborhoodstringyesNeighborhood
bank_billet_account_idintegeryesCollection wallet ID. If not provided, it will use the default wallet.
amountnumberyesSubscription amount (R$)
idintegernoSubscription ID
customer_idintegernoCustomer ID. When this ID is passed, the fields customer_person_name, customer_cnpj_cpf, customer_zipcode, customer_address, customer_city_name, customer_state and customer_neighborhood are not required.
customer_nicknamestringnoNickname or trade name of the payer
customer_emailstring (email)noPayer's email
customer_email_ccstring (email)noAlternative payer email
customer_address_numberstringnoNumber
customer_address_complementstringnoComplement
customer_phone_numberstringnoPhone (with area code, international code is optional)
customer_person_typestringnoType of payer. * individual Individual * juridical Legal entity Values: individual, juridical.
customer_mobile_local_codestringnoMobile area code
customer_mobile_numberstringnoMobile phone
customer_notesstringnoPayer notes
customer_ignore_emailbooleannoNever send email to this customer
customer_ignore_smsbooleannoNever send SMS to this customer
customer_contact_personstringnoContact
customer_updatestringnoContact
cyclestringnoSubscription cycle. Default: monthly * biweekly Biweekly * bimonthly Bimonthly * monthly Monthly * quarterly Quarterly * semiannual Semiannual * annual Annual Values: biweekly, bimonthly, monthly, quarterly, semiannual, annual.
next_billingstring (date)noDate of first or next charge. If no date is sent, this field will be calculated to have the value of the day the subscription was created plus the chosen cycle. Ex.: Monthly (Today + 30 days)
end_atstring (date)noDate when you want to stop charging. If blank, charges will be generated automatically until you provide a date or delete the subscription.
descriptionstringnoProduct or service description
instructionsstringnoInstructions for cashier
days_in_advanceintegernoHow many days before the due date the charge will be generated. Default: 7.
fine_typeintegernoFine type: * 0 Non-existent (Default) * 1 For percentage of boleto amount * 2 For fixed amount Values: 0, 1, 2.
days_for_fineintegernoNumber of days after the due date when the fine will start to accrue. The default value is 1 day (the day after the due date).
fine_percentagenumbernoLate fee percentage Ex: 2% x R$ 250.00 = R$ 5.00. Required if fine_type equals 1
fine_valuenumbernoFine amount (R$). Required if fine_type equals 2.
interest_typeintegernoInterest/penalty type: * 0 Non-existent (Default) * 1 For daily percentage * 2 For daily amount Values: 0, 1, 2.
days_for_interestintegernoNumber of days after the due date when the penalty will start to accrue. The default value is 1 day (the day after the due date).
interest_percentagenumbernoDaily interest percentage. From 0.0 to 100.0 (Ex 1.5% = 1.5) Required if interest_type equals 1.
interest_valuenumbernoDaily interest amount (R$). Required if interest_type equals 2.
discount_typeintegernoDiscount type: The discount type will be the same for all three discounts, if they exist. : * 0 Non-existent (Default) * 1 For fixed amount * 2 For percentage of boleto amount Values: 0, 1, 2.
days_for_discountintegernoDays for discount. Required if discount_type is different from 0 (zero)
discount_percentagenumbernoPercentage of the boleto amount equivalent to the discount. Required if discount_type equals 2
discount_valuenumbernoDiscount amount (R$). Required if discount_type equals 1.
days_for_second_discountintegernoDays for second discount.
second_discount_percentagenumbernoPercentage of the boleto amount equivalent to the second discount.
second_discount_valuenumbernoSecond discount amount (R$).
days_for_third_discountintegernoDays for third discount.
third_discount_percentagenumbernoPercentage of the boleto amount equivalent to the third discount.
third_discount_valuenumbernoThird discount amount (R$).
bank_billet_layout_idintegernoBoleto template ID
notesstringnoNotes
tagsarray<string>noTags associated with the boleto
bank_billet_idsarray<integer>noIDs of boletos linked to the voucher
prevent_registrationbooleannoPrevent sending registration to bank: If true, prevents the boleto from being registered. To be used in cases where the boleto was already registered outside of Kobana but you want to include it in the system.
divergent_payment_typeintegernoType of divergent payment: Valid only for Itaú and Caixa. * 1 Accepts any divergent amount * 2 Accepts payments within a range of amounts or percentages * 3 Does not accept divergent amount payments * 4 Accepts payments above a minimum amount or percentage Values: null, 1, 2, 3, 4.
divergent_payment_value_typeintegernoType of value to consider for payment limits: Valid only for Itaú and Caixa. * 1 Reports divergent payments by amounts * 2 Reports divergent payments by percentages Values: null, 1, 2.
divergent_payment_maximum_valuenumbernoMaximum value for divergent payment range.
divergent_payment_minimum_valuenumbernoMinimum value for divergent payment range.
divergent_payment_maximum_percentagenumbernoMaximum percentage for divergent payment range.
divergent_payment_minimum_percentagenumbernoMinimum percentage for divergent payment range.
divergent_payment_limitintegernoNumber of payments allowed. Required if divergent payment data is provided. Used only by Caixa.
custom_attachment_namestringnoName to be used in boleto files sent to the customer in notifications. Accepts use of variables. If left empty, the default is the word "boleto" followed by the ID.
guarantor_namestringnoFinal beneficiary name (Drawer/Guarantor)
guarantor_cnpj_cpfstringnoFinal beneficiary CNPJ/CPF (Drawer/Guarantor)
guarantor_address_numberstringnoFinal beneficiary number (Drawer/Guarantor)
guarantor_neighborhoodstringnoFinal beneficiary neighborhood (Drawer/Guarantor)
guarantor_phone_numberstringnoFinal beneficiary phone (with area code) (Drawer/Guarantor)
guarantor_city_namestringnoCity (Name must be correct and complete) of final beneficiary (Drawer/Guarantor)
guarantor_statestringnoState of final beneficiary (Drawer/Guarantor)
guarantor_zipcodestringnoPostal code (format 99999999) of final beneficiary (Drawer/Guarantor)
guarantor_addressstringnoAddress of final beneficiary (Drawer/Guarantor)
guarantor_address_complementstringnoComplement of final beneficiary (Drawer/Guarantor)
days_for_revokeintegernoCalendar days for withdrawal/return: Null/Blank: Follows the bank's default. 0: Withdrawal/Return on the same day as maturity. 1 or more: Withdrawal/Return after maturity (Maturity + X calendar days).
days_for_negativationintegernoCalendar days for negative registry: Available only for the following banks and formats. * Bank | CNAB 240| CNAB 400 |Webservice * Bradesco | Yes | Yes | No * Itaú | No | Yes | No
days_for_sueintegernoCalendar days for protest
payment_countintegernoNumber of partial payments accepted for this boleto.
import_idintegernoImport ID
ignore_whatsappbooleannoNever send this subscription by WhatsApp
created_atstring (date-time)noDate and time of record creation
updated_atstring (date-time)noDate and time of last record update

More fields and nested objects: kobana schema banking.customer-subscriptions.create.

Responses

HTTPDescription
201Subscription created
422Invalid subscription

customer-subscriptions get​

Subscription Information

kobana banking customer-subscriptions get [ID] [OPTIONS]

GET /v1/customer_subscriptions/{id}

Query specific information from a Subscription.

Path arguments: id

Responses

HTTPDescription
200Subscription found
404Subscription not found

customer-subscriptions update​

Update Subscription

kobana banking customer-subscriptions update [ID] [OPTIONS]

PUT /v1/customer_subscriptions/{id}

Updates specific information of a Subscription

Path arguments: id

Request body

NameTypeRequiredDescription
customer_person_namestringyesCustomer name
customer_cnpj_cpfstringyesCustomer CPF/CNPJ
customer_zipcodestringyesZIP Code (format 99999999)
customer_addressstringyesAddress
customer_city_namestringyesCity (Name must be correct and complete)
customer_statestringyesState
customer_neighborhoodstringyesNeighborhood
bank_billet_account_idintegeryesCollection wallet ID. If not provided, it will use the default wallet.
amountnumberyesSubscription amount (R$)
idintegernoSubscription ID
customer_idintegernoCustomer ID. When this ID is passed, the fields customer_person_name, customer_cnpj_cpf, customer_zipcode, customer_address, customer_city_name, customer_state and customer_neighborhood are not required.
customer_nicknamestringnoNickname or trade name of the payer
customer_emailstring (email)noPayer's email
customer_email_ccstring (email)noAlternative payer email
customer_address_numberstringnoNumber
customer_address_complementstringnoComplement
customer_phone_numberstringnoPhone (with area code, international code is optional)
customer_person_typestringnoType of payer. * individual Individual * juridical Legal entity Values: individual, juridical.
customer_mobile_local_codestringnoMobile area code
customer_mobile_numberstringnoMobile phone
customer_notesstringnoPayer notes
customer_ignore_emailbooleannoNever send email to this customer
customer_ignore_smsbooleannoNever send SMS to this customer
customer_contact_personstringnoContact
customer_updatestringnoContact
cyclestringnoSubscription cycle. Default: monthly * biweekly Biweekly * bimonthly Bimonthly * monthly Monthly * quarterly Quarterly * semiannual Semiannual * annual Annual Values: biweekly, bimonthly, monthly, quarterly, semiannual, annual.
next_billingstring (date)noDate of first or next charge. If no date is sent, this field will be calculated to have the value of the day the subscription was created plus the chosen cycle. Ex.: Monthly (Today + 30 days)
end_atstring (date)noDate when you want to stop charging. If blank, charges will be generated automatically until you provide a date or delete the subscription.
descriptionstringnoProduct or service description
instructionsstringnoInstructions for cashier
days_in_advanceintegernoHow many days before the due date the charge will be generated. Default: 7.
fine_typeintegernoFine type: * 0 Non-existent (Default) * 1 For percentage of boleto amount * 2 For fixed amount Values: 0, 1, 2.
days_for_fineintegernoNumber of days after the due date when the fine will start to accrue. The default value is 1 day (the day after the due date).
fine_percentagenumbernoLate fee percentage Ex: 2% x R$ 250.00 = R$ 5.00. Required if fine_type equals 1
fine_valuenumbernoFine amount (R$). Required if fine_type equals 2.
interest_typeintegernoInterest/penalty type: * 0 Non-existent (Default) * 1 For daily percentage * 2 For daily amount Values: 0, 1, 2.
days_for_interestintegernoNumber of days after the due date when the penalty will start to accrue. The default value is 1 day (the day after the due date).
interest_percentagenumbernoDaily interest percentage. From 0.0 to 100.0 (Ex 1.5% = 1.5) Required if interest_type equals 1.
interest_valuenumbernoDaily interest amount (R$). Required if interest_type equals 2.
discount_typeintegernoDiscount type: The discount type will be the same for all three discounts, if they exist. : * 0 Non-existent (Default) * 1 For fixed amount * 2 For percentage of boleto amount Values: 0, 1, 2.
days_for_discountintegernoDays for discount. Required if discount_type is different from 0 (zero)
discount_percentagenumbernoPercentage of the boleto amount equivalent to the discount. Required if discount_type equals 2
discount_valuenumbernoDiscount amount (R$). Required if discount_type equals 1.
days_for_second_discountintegernoDays for second discount.
second_discount_percentagenumbernoPercentage of the boleto amount equivalent to the second discount.
second_discount_valuenumbernoSecond discount amount (R$).
days_for_third_discountintegernoDays for third discount.
third_discount_percentagenumbernoPercentage of the boleto amount equivalent to the third discount.
third_discount_valuenumbernoThird discount amount (R$).
bank_billet_layout_idintegernoBoleto template ID
notesstringnoNotes
tagsarray<string>noTags associated with the boleto
bank_billet_idsarray<integer>noIDs of boletos linked to the voucher
prevent_registrationbooleannoPrevent sending registration to bank: If true, prevents the boleto from being registered. To be used in cases where the boleto was already registered outside of Kobana but you want to include it in the system.
divergent_payment_typeintegernoType of divergent payment: Valid only for Itaú and Caixa. * 1 Accepts any divergent amount * 2 Accepts payments within a range of amounts or percentages * 3 Does not accept divergent amount payments * 4 Accepts payments above a minimum amount or percentage Values: null, 1, 2, 3, 4.
divergent_payment_value_typeintegernoType of value to consider for payment limits: Valid only for Itaú and Caixa. * 1 Reports divergent payments by amounts * 2 Reports divergent payments by percentages Values: null, 1, 2.
divergent_payment_maximum_valuenumbernoMaximum value for divergent payment range.
divergent_payment_minimum_valuenumbernoMinimum value for divergent payment range.
divergent_payment_maximum_percentagenumbernoMaximum percentage for divergent payment range.
divergent_payment_minimum_percentagenumbernoMinimum percentage for divergent payment range.
divergent_payment_limitintegernoNumber of payments allowed. Required if divergent payment data is provided. Used only by Caixa.
custom_attachment_namestringnoName to be used in boleto files sent to the customer in notifications. Accepts use of variables. If left empty, the default is the word "boleto" followed by the ID.
guarantor_namestringnoFinal beneficiary name (Drawer/Guarantor)
guarantor_cnpj_cpfstringnoFinal beneficiary CNPJ/CPF (Drawer/Guarantor)
guarantor_address_numberstringnoFinal beneficiary number (Drawer/Guarantor)
guarantor_neighborhoodstringnoFinal beneficiary neighborhood (Drawer/Guarantor)
guarantor_phone_numberstringnoFinal beneficiary phone (with area code) (Drawer/Guarantor)
guarantor_city_namestringnoCity (Name must be correct and complete) of final beneficiary (Drawer/Guarantor)
guarantor_statestringnoState of final beneficiary (Drawer/Guarantor)
guarantor_zipcodestringnoPostal code (format 99999999) of final beneficiary (Drawer/Guarantor)
guarantor_addressstringnoAddress of final beneficiary (Drawer/Guarantor)
guarantor_address_complementstringnoComplement of final beneficiary (Drawer/Guarantor)
days_for_revokeintegernoCalendar days for withdrawal/return: Null/Blank: Follows the bank's default. 0: Withdrawal/Return on the same day as maturity. 1 or more: Withdrawal/Return after maturity (Maturity + X calendar days).
days_for_negativationintegernoCalendar days for negative registry: Available only for the following banks and formats. * Bank | CNAB 240| CNAB 400 |Webservice * Bradesco | Yes | Yes | No * Itaú | No | Yes | No
days_for_sueintegernoCalendar days for protest
payment_countintegernoNumber of partial payments accepted for this boleto.
import_idintegernoImport ID
ignore_whatsappbooleannoNever send this subscription by WhatsApp
created_atstring (date-time)noDate and time of record creation
updated_atstring (date-time)noDate and time of last record update

More fields and nested objects: kobana schema banking.customer-subscriptions.update.

Responses

HTTPDescription
204Subscription updated
404Subscription not found

customer-subscriptions delete​

Delete Subscription

kobana banking customer-subscriptions delete [ID] [OPTIONS]

DELETE /v1/customer_subscriptions/{id}

Deletes a Subscription.

Path arguments: id

Responses

HTTPDescription
204Subscription deleted
404Subscription not found

customer-subscriptions next-charge​

Generate Next Charge

kobana banking customer-subscriptions next-charge [ID] [OPTIONS]

POST /v1/customer_subscriptions/{id}/next_charge

Generates the next charge.

Path arguments: id

Responses

HTTPDescription
201Next charge generated
404Subscription not found