It is possible to create a recurring transaction with a credit card that is already stored (tokenized).
Payment method accepted: credit card.
Request
Environment | Method | Endpoint |
---|---|---|
Sandbox | post | https://apisandbox.cieloecommerce.cielo.com.br/1/sales/ |
Production | post | https://api.cieloecommerce.cielo.com.br/1/sales/ |
{
"MerchantOrderId": "Loja123456",
"Customer": {
"Name": "Aline de Souza"
},
"Payment": {
"Type": "CreditCard",
"Amount": 1500,
"Installments": 1,
"Capture": true,
"RecurrentPayment": {
"AuthorizeNow": "true",
"EndDate": "2030-10-01",
"Interval": "Monthly"
},
"CreditCard": {
"CardToken": "4086baad-a31c-48b9-830d-8596bfe9c33c",
"Brand": "Visa",
"SecurityCode": "123",
}
}
}
Parameters in header
Parameters in body
Parameter | Type | Size | Required | Description |
---|---|---|---|---|
MerchantOrderId | Order identification number. Warning: Allowed characters are a-z, A-Z, 0-9. Special characters and blank spaces are not allowed. | Text | 50 | Yes |
Customer.Name | Customer's name. | Text | 255 | Yes |
Payment.Type | Type of the payment method. | Text | 100 | Yes |
Payment.Amount | Order Amount (to be sent in cents). | Number | 15 | Yes |
Payment.Installments | Number of installments. If the transaction is a recurrence, the number of installments will be 1. | Number | 2 | Yes |
Payment.Capture | Boolean that identifies if the authorization should be done by Authomatic capture (true) or posterior capture (false). | Boolean | - | No (default: false) |
Payment.SoftDescriptor | The store's name that will be on the shopper's bank invoice. Does not allow special characters. | Text | 13 | No |
Payment.RecurrentPayment | Indicates that a transaction has its own recurrence. | Boolean | 5 | Yes* | |
CreditCard.CardNumber | Shopper's card number. | Text | 19 | Yes |
CreditCard.Holder | Name of the shopper that's printed on the card. | Text | 25 | Yes |
CreditCard.ExpirationDate | Expiration date printed on the card. Example: MM/AAAA. | Text | 7 | Yes |
CreditCard.SecurityCode | Security code printed on the back of the card. | Text | 4 | No |
CreditCard.Brand | Card brand. Possible values: Visa / Master / Amex / Elo / Aura / JCB / Diners / Discover / Hipercard / Hiper. | Text | 10 | Yes |
Response
{
"MerchantOrderId": "Loja123456",
"Customer": {
"Name": "Aline de Souza"
},
"Payment": {
"Installments": 1,
"Capture": true,
"CreditCard": {
"CardToken": "4086baad-a31c-48b9-830d-8596bfe9c33c",
"Brand": "Visa",
"SecurityCode": "123",
},
"ProofOfSale": "3827556",
"Tid": "0504043827555",
"AuthorizationCode": "149867",
"PaymentId": "737a8d9a-88fe-4f74-931f-acf81149f4a0",
"Type": "CreditCard",
"Amount": 1500,
"Currency": "BRL",
"Country": "BRA",
"Provider": "Simulado",
"ExtraDataCollection": [],
"Status": 1,
"ReturnCode": "4",
"ReturnMessage": "Operation Successful",
"RecurrentPayment": {
"RecurrentPaymentId": "61e5bd30-ec11-44b3-ba0a-56fbbc8274c5",
"NextRecurrency": "2025-03-04",
"EndDate": "2030-12-01",
"Interval": "Monthly",
"Link": {
"Method": "GET",
"Rel": "recurrentPayment",
"Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/RecurrentPayment/{RecurrentPaymentId}"
},
"AuthorizeNow": true
},
"Links": [
{
"Method": "GET",
"Rel": "self",
"Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/void"
}
]
}
}