Schedule a credit card recurrent split payment
Environment | Method | Endpoint |
---|---|---|
Sandbox | post | https://apisandbox.cieloecommerce.cielo.com.br/1/sales |
Production | post | https://api.cieloecommerce.cielo.com.br/1/sales |
To schedule the first transaction in the series of recurrences, pass the parameter
Payment.RecurrentPayment.AuthorizeNow
as "false" and add the parameterPayment.RecurrentPayment.StartDate.
Request
post https://apisandbox.cieloecommerce.cielo.com.br/1/sales
{
"MerchantOrderId": "2014113245231706",
"Customer": {
"Name": "Comprador rec programada"
},
"Payment": {
"Type": "SplittedCreditCard",
"Amount": 1500,
"Installments": 1,
"SoftDescriptor": "123456789ABCD",
"RecurrentPayment": {
"AuthorizeNow": false,
"StartDate":"2040-12-01",
"EndDate": "2040-12-30",
"Interval": "SemiAnnual"
},
"CreditCard": {
"CardNumber": "1234123412341231",
"Holder": "Teste Holder",
"ExpirationDate": "12/2030",
"SecurityCode": "262",
"SaveCard": false,
"Brand": "Visa"
}
},
"splitPayments": [
{
"subordinateMerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"amount": 500,
"fares": {
"mdr": 5,
"fee": 30
}
},
{
"subordinateMerchantId": "9140ca78-3955-44a5-bd44-793370afef94",
"amount": 1000,
"fares": {
"mdr": 4,
"fee": 15
}
}
]
}
Property | Description | Type | Size | Required |
---|---|---|---|---|
MerchantId | Store identifier in API E-commerce Cielo. | Guid | 6 | Yes |
MerchantKey | Public Key for Double Authentication in API E-commerce Cielo. | Text | 40 | Yes |
RequestId | Request identifier, used when the merchant uses different servers for each GET/POST/PUT. | Guid | 36 | No |
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 | Shopper'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. As this is a recurrence, the number of installments will be 1. | Number | 2 | Yes |
Payment.SoftDescriptor | Text that will be printed on the carrier's bank invoice - Available only for VISA/MASTER - does not allow special characters | Text | 13 | No |
Payment.RecurrentPayment.EndDate | End date for recurrence. | Text | 10 | No |
Payment.RecurrentPayment.StartDate | Start date of recurrence | Text | 10 | No |
Payment.RecurrentPayment.Interval | Recurrence interval.
| Text | 10 | No |
Payment.RecurrentPayment.AuthorizeNow | Boolean to know if the first recurrence is going to be Authorized or not. | Boolean | *** | Yes |
CreditCard.CardNumber | Shopper's Card Number. | Text | 19 | Yes |
CreditCard.Holder | Shopper's name printed on card. | Text | 25 | No |
CreditCard.ExpirationDate | Expiration date printed on card. | Text | 7 | Yes |
CreditCard.SecurityCode | Security code printed on back of card. | Text | 4 | No |
CreditCard.Brand | Card brand. | Text | 10 | Yes |
SplitPayments.SubordinateMerchantId | Subordinate MerchantId (Identifier). | Text | 36 | Yes |
SplitPayments.Amount | Subordinate’s part of transaction, in cents (BRL). | Text | *** | Yes |
SplitPayments.Fares.Mdr | Marketplace MDR(%) to be discounted from Subordinate’s part of transaction. | Text | *** | No |
SplitPayments.Fares.Fee | Fixed Fee (BRL), in cents, to be discounted from Subordinate’s part of transaction. | Number | *** | No |
Response
{
"MerchantOrderId": "2014113245231706",
"Customer": {
"Name": "Comprador rec programada"
},
"Payment": {
"ServiceTaxAmount": 0,
"Installments": 1,
"Interest": "ByMerchant",
"Capture": false,
"Authenticate": false,
"Recurrent": false,
"CreditCard": {
"CardNumber": "123412******1231",
"Holder": "Teste Holder",
"ExpirationDate": "12/2030",
"SaveCard": false,
"Brand": "Visa"
},
"ProofOfSale": "3827556",
"Tid": "0504043827555",
"AuthorizationCode": "149867",
"SoftDescriptor": "123456789ABCD",
"PaymentId": "737a8d9a-88fe-4f74-931f-acf81149f4a0",
"Type": "SplittedCreditCard",
"Amount": 1500,
"Currency": "BRL",
"Country": "BRA",
"Provider": "Simulado",
"ExtraDataCollection": [],
"Status": 1,
"ReturnCode": "4",
"ReturnMessage": "Operation Successful",
"RecurrentPayment": {
"RecurrentPaymentId": "61e5bd30-ec11-44b3-ba0a-56fbbc8274c5",
"NextRecurrency": "2040-11-04",
"EndDate": "2040-12-30",
"Interval": "SemiAnnual",
"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": "capture",
"Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/capture"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://apiquerysandbox.cieloecommerce.cielo.com.br/1/sales/{PaymentId}/void"
}
],
"SplitPayments": [
{
"SubordinateMerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"Amount": 6000,
"Fares": {
"Mdr": 5.0,
"Fee": 30
},
"Splits": [
{
"MerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"Amount": 5670
},
{
"MerchantId": "f43fca07-48ec-46b5-8b93-ce79b75a8f63",
"Amount": 330
}
]
},
{
"SubordinateMerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"Amount": 4000,
"Fares": {
"Mdr": 4.0,
"Fee": 15
},
"Splits": [
{
"MerchantId": "9140ca78-3955-44a5-bd44-793370afef94",
"Amount": 3825
},
{
"MerchantId": "f43fca07-48ec-46b5-8b93-ce79b75a8f63",
"Amount": 175
}
]
}
]
}
}
Property | Description | Type | Size | Format |
---|---|---|---|---|
RecurrentPaymentId | Next recurrence Identifier field. | Guid | 36 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
NextRecurrency | Date of next recurrence. | Text | 7 | 12/2030 (MM/YYYY) |
EndDate | End date of recurrence. | Text | 7 | 12/2030 (MM/YYYY) |
Interval | Interval between recurrences. | Text | 10 |
|
AuthorizeNow | Boolean to know if the first recurrence is about to be Authorized or not. | Boolean | *** | true ou false |