Follow the question structure recommended by Dev Bot before submitting your integration questions.
🛂 The EVO permission that grants access to this endpoint is Sales - Edit.
NOTE. Available for use with a branch access key and also with a General ADM access key.
🚧 Attention! The totalInstallmentsof thecardDataobject is valid only for payment type 1 (Credit card).Include in the request Header the culturefield with the valuept-BR. This parameter tells the API that responses must be returned in Brazilian Portuguese, ensuring that texts such as messages, descriptions and statuses come in pt-BR.
curl --location --request POST 'https://evo-integracao-api.w12app.com.br/api/v2/sales' \
--header 'Content-Type: application/json-patch+json' \
--header 'Authorization: Basic Og==' \
--header 'culture: pt-BR' \ 👈👈👈
--data-raw '{
"idBranch": 0,
"idBranchToken": "string",
"idMembership": 0,
...
}'| Parameter | Type | Required | Description |
|---|---|---|---|
idBranch | int32 | No | Identifier of the branch where the sale was made. If the system is multi-branch, fill in with the ID of the specific unit. Otherwise, it will be the value generated by the token. |
idBranchToken | string | No | Branch token, used to identify the unit when the system is multi-branch. |
idMembership | int32 | No | Identifier of the membership contract acquired (if applicable). |
membershipValue | double | No | Final value of the contract. |
additionalMemberships | arrayobject | No | List of optional additional contracts that will be sold. See more below. |
idService | int32 | No | Identifier of the service or trial class acquired. |
serviceValue | double | No | Final value of the service. |
idProduct | int32 | No | ID of the product related to the sale. Accepts only one product per call. See the Product sale section below. |
productValue | double | No | Field currently not used in the calculation. The product value is always the registered sale price multiplied by productAmount. If sent, it is received and ignored, without error. |
productAmount | int32 | No | Quantity of the product related to the sale. Required and greater than zero when idProduct is provided. |
memberData | object | Yes | Member data (if the customer is already a member). Contains the idMember field. |
cardData | object | No | Credit card data, if the transaction is made by card. |
idProspect | int32 | No | Identifier of the prospect acquiring the service. |
idProspectToken | string | No | Prospect token, used to validate the transaction and ensure the prospect is converted into a member after the purchase. |
idMemberToken | string | No | Member token (if it is a registered customer). |
voucher | string | No | Discount voucher code, in case the customer uses one to get a discount. Valid only for plan or service sales. See the Product sale section below. |
idVoucherToken | int32 | No | Discount voucher token (if applicable). |
idCardMember | int32 | No | Member card identifier (if applicable). |
idMemberCardToken | string | No | Member card token (if applicable). |
membershipStart | string | No | Start date of the contract / membership. |
totalInstallments | int32 | Yes | Number of installments for installment payment. For payment in full, it will be 0 or 1. |
payment | int32 | Yes | Payment type: 5 for installments (with zero value for trial classes) and 6 for payment in full. |
sessionId | string | No | Session identifier, used to track the transaction during the sale process. |
paymentData | object | No | Payment data accepted when the payment type is external payment = 16 or 17. |
additionalMemberships Object Structure| Parameter | Type | Required | Description |
|---|---|---|---|
idMembership | int32 | Yes | ID of the optional additional contract that will be sold. The additional must be previously linked as Optional to the main contract. |
membershipValue | number (double) | No | Final value of the additional contract provided by the integration. When provided, it overrides the default value defined by EVO and is not multiplied again by the validity period. When not provided, EVO uses the default sale value applicable to the link. |
🚧 NOTE. The additionalMembershipsfield allows you to provide one or more optional additional contracts in the same operation.Only additional contracts previously linked as Optionalto the main contract can be provided.Additional contracts of type Fixedmust not be sent by the integration, as they are automatically included when the main contract is sold.When membershipValueis not provided, EVO will use the default sale value of the link, as configured in the contract and returned in thedefaultSaleValuefield of theGET /api/v3/membershipendpoint.When membershipValueis provided, the value will be considered final for the additional and will not be multiplied again by the validity period.When additionalMembershipsis not provided or is sent empty, only the main contract and itsFixedadditionals will be sold.Optionaladditionals are never included automatically.
memberData Object Structure| Parameter | Type | Required | Description |
|---|---|---|---|
idMember | int32 | Yes | Unique identifier of the member. |
document | string | No | Member identification document, such as CPF or CNPJ. |
zipCode | string | No | Postal code (ZIP) of the member's address. |
address | string | No | Member's address. |
number | string | No | Member's address number. |
complement | string | No | Member's address complement, such as apartment or block. |
neighborhood | string | No | Member's neighborhood. |
city | string | No | Member's city. |
idState | int32 | No | Identifier of the state where the member lives. |
cardData Object Structure| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | No | Unique identifier for the card. |
temporaryToken | string | No | Temporary token associated with the card, if applicable. |
branchToken | string | No | Branch token to identify a unit when the system is multi-branch. |
totalInstallments | int32 | No | Total number of installments of the payment, applicable to installment transactions. |
truncatedCardNumber | string | No | Truncated card number, showing only the last 4 real digits for security. (****1234) |
brand | string | No | Card brand (example: Visa, MasterCard, etc.). |
cardHolderName | string | No | Cardholder name. |
cardExpirationYear | int32 | No | Card expiration year. |
cardExpirationMonth | int32 | No | Card expiration month. |
payment Enum| Code | Payment Type | Description |
|---|---|---|
| null | LinkCheckout | If the payment value is null, it is treated as LinkCheckout. |
1 | Credit Card | Payment made with a credit card. (You must generate the card token using Evo Pay) |
2 | Boleto | Payment made via bank slip (boleto). |
3 | Sale Credits | Payment made with sale credits. |
4 | Transfer | Payment made by bank transfer. |
5 | ValorZerado | Used for zero-value transactions, such as trial classes. |
6 | LinkCheckout | Payment made via checkout link (generated externally). |
7 | Pix | Payment made via Pix. |
13 | Transferência | Payment made via bank transfer. |
14 | Cash | Payment made in cash. |
15 | GiftCard | Payment made via gift card. |
16 | ExternalCreditCard | Payment made via external credit card. |
17 | ExternalDebitCard | Payment made via external debit card. |
paymentData Object Structure| Parameter | Type | Required | Description |
|---|---|---|---|
tid | string | No | Transaction identifier. |
nsu | string | No | Transaction NSU. |
authorization | string | No | Authorization code. |
brand | string | No | Card brand (example: Visa, MasterCard, etc.). |
acquirer | string | No | Acquirer responsible for the transaction. |
idProduct and productAmount.idProduct must exist, be active and be sellable.productAmount is required and must be greater than zero.🚧 NOTE. A product cannot be combined with a plan or service in the same call. The API returns 200 without error, but sells only one type of item: plan + product sells only the plan, and service + product sells only the product. Only one idProductper call is supported. To sell several products, make one sale per product.productValueis ignored. The product value is always the registered sale price multiplied byproductAmount.The voucheronly works if it is registered, enabled for the sales site, within its validity period and has balance. It is valid only for plan or service sales. In a product-only sale, the API rejects it with the message "voucher inválido para o item selecionado" (message in pt-BR). There is no free-form discount.
idMembership identifies the first additional contract and the additionalMemberships field can be used to provide the other additionals of the same operation.{
"idBranch": 1,
"idMembership": 200, // First additional contract of the sale
"membershipValue": 45.00,
"memberData": {
"idMember": 123
},
"payment": 14,
"additionalMemberships": [
{
"idMembership": 201, // Second additional contract of the sale
"membershipValue": 30.00
}
]
}🚧 NOTE. This operation is available only for members. Each additional must have an eligible main contract already belonging to the member. When different additionals are eligible for different main contracts of the member, each additional will be linked to the respective eligible main contract.