Create a Contract
This endpoint allows the creation of a new contract. If needed, it also permits the creation of a new customer and a new payment account or the provision of existing customer and payment account IDs to sync the new contract with them.
Provide a new customer and a new payment account to create a new contract for the new customer and payment account.
New Customer details.
External identifier for the customer.
The name of the customer.
New Payment Account details.
The legal business name of the payment account holder.
The trade or "doing business as" name of the payment account holder.
The tax identification number (CNPJ) of the payment account holder.
The contact email address for the payment account.
The physical address associated with the payment account.
The postal code (CEP) of the address.
The street number of the address.
The street name of the address.
The neighborhood or district of the address.
The city name of the address.
The state abbreviation of the address.
The country code of the address.
Additional address information like apartment number, floor, etc.
Existing customer ID. If provided, a new customer will not be created.
Note: You cannot provide both a customerId
and a new customer
object at the same time.
Existing payment account ID. If provided, a new payment account will not be created.
Note: You cannot provide both a paymentAccountId
and a new paymentAccount
object at the same time.
New Contract details.
Date when the contract becomes active.
Optional date when the contract expires. If null, the contract has no end date.
Day of the month when the billing cycle ends (1-31).
List of plan IDs to be associated with the contract.
Schema defining payment gateway settings for a contract. Required if payment gateway is enabled.
The specific day of the month when the payment will be scheduled. For example, a value of 1 means the payment will be scheduled on the 1st day of the month. A value of 31 represents the last day of the month, regardless of whether the month has 28, 30, or 31 days.
Number of days after the payment start date until payment is due (minimum of 5 days).
Body
Provide a new customer and a new payment account to create a new contract for the new customer and payment account.
New Payment Account details.
The legal business name of the payment account holder.
1
The trade or "doing business as" name of the payment account holder.
1
The tax identification number (CNPJ) of the payment account holder.
The contact email address for the payment account.
The physical address associated with the payment account.
The postal code (CEP) of the address.
8
The street number of the address.
1
The street name of the address.
1
The neighborhood or district of the address.
1
The city name of the address.
1
The state abbreviation of the address.
AC
, AL
, AP
, AM
, BA
, CE
, DF
, ES
, GO
, MA
, MT
, MS
, MG
, PA
, PB
, PR
, PE
, PI
, RJ
, RN
, RS
, RO
, RR
, SC
, SP
, SE
, TO
The country code of the address.
Brasil
Additional address information like apartment number, floor, etc.
New Contract details.
Date when the contract becomes active.
Optional date when the contract expires. If null, the contract has no end date.
Day of the month when the billing cycle ends (1-31).
1 < x < 31
List of plan IDs to be associated with the contract.
Schema defining payment gateway settings for a contract. Required if payment gateway is enabled.
The specific day of the month when the payment will be scheduled. For example, a value of 1 means the payment will be scheduled on the 1st day of the month. A value of 31 represents the last day of the month, regardless of whether the month has 28, 30, or 31 days.
1 < x < 31
Number of days after the payment start date until payment is due (minimum of 5 days).
x > 5
Existing customer ID. If provided, a new customer will not be created.
Note: You cannot provide both a customerId
and a new customer
object at the same time.
Existing payment account ID. If provided, a new payment account will not be created.
Note: You cannot provide both a paymentAccountId
and a new paymentAccount
object at the same time.
Response
The request was successfully processed, and the contract has been created. As well as new customer and/or a new payment account if they were part of the request.
Schema defining the contract details.
Unique identifier for the contract.
Date when the contract becomes active.
Optional date when the contract expires. If null, the contract has no end date.
Day of the month when the billing cycle ends (1-31).
1 < x < 31
Current status of the contract.
active
, canceled
, completed
Schema defining payment gateway settings for a contract. Required if payment gateway is enabled.
The specific day of the month when the payment will be scheduled. For example, a value of 1 means the payment will be scheduled on the 1st day of the month. A value of 31 represents the last day of the month, regardless of whether the month has 28, 30, or 31 days.
1 < x < 31
Number of days after the payment start date until payment is due (minimum of 5 days).
x > 5
Schema representing a payment account.
The unique identifier of the payment account.
The legal business name of the payment account holder.
1
The trade or "doing business as" name of the payment account holder.
1
The tax identification number (CNPJ) of the payment account holder.
The contact email address for the payment account.
The physical address associated with the payment account.
The postal code (CEP) of the address.
8
The street number of the address.
1
The street name of the address.
1
The neighborhood or district of the address.
1
The city name of the address.
1
The state abbreviation of the address.
AC
, AL
, AP
, AM
, BA
, CE
, DF
, ES
, GO
, MA
, MT
, MS
, MG
, PA
, PB
, PR
, PE
, PI
, RJ
, RN
, RS
, RO
, RR
, SC
, SP
, SE
, TO
The country code of the address.
Brasil
Additional address information like apartment number, floor, etc.