Voucher

Para criar um pedido com voucher, devemos incluir o objeto voucher dentro do nó payment, assim como a propriedade "payment_method": "voucher". O objeto voucher contém as seguintes propriedades:

🚧

Funcionalidade disponível apenas para clientes Gateway

As funcionalidades apresentadas abaixo estão disponível apenas para clientes gateway.

🚧

Bandeiras

Possibilitamos a integração com as principais bandeiras do mercado: VR benefícios, Sodexo e Ticket.

Alelo: Devido ao término do contrato entre a Cielo e a Alelo, não é possível realizar novas integrações com essa bandeira de voucher.

AtributosTipoDescrição
statement_descriptorstringTexto exibido na fatura do cartão. Max: 22 caracteres.
card, card_id ou card_tokenobjectCartão de crédito.
card_id é o identificador do cartão de um cliente.
***card_token*** é o token do cartão gerado pelo checkout transparente. Saiba mais sobre cartões.
card.holder_documentstringNúmero do documento do portador do cartão. Este campo deverá ser enviado dentro do objeto card e é obrigatório para voucher.
metadataobjectObjeto chave/valor utilizado para armazenar informações adicionais sobre o pagamento.Saiba mais sobre metadata.
{
	"items": [{
			"amount": 2990,
			"description": "Chaveiro do Tesseract",
			"quantity": 1
		}
	],
	"customer": {
		"name": "Tony Stark",
		"email": "[email protected]"
	},
	"payments": [{
			"payment_method": "voucher",
			"voucher": {
				"statement_descriptor": "AVENGERS",
				"card": {
					"number": "4000000000000010",
					"holder_name": "Tony Stark",
					"holder_document": "93095135270",
					"exp_month": 1,
					"exp_year": 30,
					"cvv": "351",
					"billing_address": {
						"line_1": "10880, Malibu Point, Malibu Central",
						"zip_code": "90265",
						"city": "Malibu",
						"state": "CA",
						"country": "US"
					}
				}
			}
		}
	]
}
{
	"id": "or_rW4pw5yck1fwdD7O",
	"code": "0WX7TE6BJ6",
	"amount": 2990,
	"currency": "BRL",
	"closed": true,
	"items": [{
			"id": "oi_D3XEBzJuE9hABb1a",
			"description": "Chaveiro do Tesseract",
			"amount": 2990,
			"quantity": 1,
			"status": "active",
			"created_at": "2019-01-22T14:20:18Z",
			"updated_at": "2019-01-22T14:20:18Z",
			"order": {
				"id": "or_rW4pw5yck1fwdD7O",
				"code": "0WX7TE6BJ6",
				"amount": 2990,
				"closed": true,
				"created_at": "2019-01-22T14:20:18Z",
				"updated_at": "2019-01-22T14:20:19Z",
				"closed_at": "2019-01-22T14:20:18Z",
				"currency": "BRL",
				"status": "paid",
				"customer_id": "cus_n3bqEzdsZUmNA7Qp",
				"items": [{
						"id": "oi_D3XEBzJuE9hABb1a",
						"description": "Chaveiro do Tesseract",
						"amount": 2990,
						"quantity": 1,
						"status": "active"
					}
				]
			}
		}
	],
	"customer": {
		"id": "cus_n3bqEzdsZUmNA7Qp",
		"name": "Tony Stark",
		"email": "[email protected]",
		"delinquent": false,
		"address": {
			"id": "addr_yEd4rG0HJNupdX2m",
			"line_1": "375, Av. General Justo, Centro",
			"line_2": "8º andar",
			"zip_code": "20021130",
			"city": "Rio de Janeiro",
			"state": "RJ",
			"country": "BR",
			"status": "active",
			"created_at": "2019-01-21T18:44:17Z",
			"updated_at": "2019-01-21T18:44:17Z",
			"metadata": {
				"id": "my_address_id"
			}
		},
		"created_at": "2019-01-21T18:36:30Z",
		"updated_at": "2019-01-21T18:44:17Z",
		"phones": {}
	},
	"status": "paid",
	"created_at": "2019-01-22T14:20:18Z",
	"updated_at": "2019-01-22T14:20:19Z",
	"closed_at": "2019-01-22T14:20:18Z",
	"charges": [{
			"id": "ch_dZWwGNQIgCgXyO14",
			"code": "0WX7TE6BJ6",
			"amount": 2990,
			"paid_amount": 2990,
			"status": "paid",
			"currency": "BRL",
			"payment_method": "voucher",
			"paid_at": "2019-01-22T14:20:19Z",
			"created_at": "2019-01-22T14:20:18Z",
			"updated_at": "2019-01-22T14:20:18Z",
			"customer": {
				"id": "cus_n3bqEzdsZUmNA7Qp",
				"name": "Tony Stark",
				"email": "[email protected]",
				"delinquent": false,
				"address": {
					"id": "addr_yEd4rG0HJNupdX2m",
					"line_1": "375, Av. General Justo, Centro",
					"line_2": "8º andar",
					"zip_code": "20021130",
					"city": "Rio de Janeiro",
					"state": "RJ",
					"country": "BR",
					"status": "active",
					"created_at": "2019-01-21T18:44:17Z",
					"updated_at": "2019-01-21T18:44:17Z",
					"metadata": {
						"id": "my_address_id"
					}
				},
				"created_at": "2019-01-21T18:36:30Z",
				"updated_at": "2019-01-21T18:44:17Z",
				"phones": {}
			},
			"last_transaction": {
				"id": "tran_x30Ml3TVkUan61vl",
				"transaction_type": "voucher",
				"gateway_id": "abe20e9d-fc1f-4458-86c0-b5e21a172ed8",
				"amount": 2990,
				"status": "captured",
				"success": true,
				"statement_descriptor": "AVENGERS",
				"acquirer_tid": "f55f99cd-fdc0-4271-a8f8-5be39c496fce",
				"acquirer_nsu": "f55f99cd-fdc0-4271-a8f8-5be39c496fce",
				"acquirer_message": "Transação capturada com sucesso",
				"acquirer_return_code": "00",
				"operation_type": "auth_and_capture",
				"card": {
					"id": "card_apxQeXJsV2fGVwPL",
					"first_six_digits": "400000",
					"last_four_digits": "0010",
					"brand": "Visa",
					"holder_name": "Tony Stark",
					"holder_document": "93095135270",
					"exp_month": 1,
					"exp_year": 2030,
					"status": "active",
					"type": "credit",
					"created_at": "2019-01-21T18:37:48Z",
					"updated_at": "2019-01-22T14:20:18Z",
					"billing_address": {
						"zip_code": "90265",
						"city": "Malibu",
						"state": "CA",
						"country": "US",
						"line_1": "10880, Malibu Point, Malibu Central"
					},
					"customer": {
						"id": "cus_n3bqEzdsZUmNA7Qp",
						"name": "Tony Stark",
						"email": "[email protected]",
						"delinquent": false,
						"address": {
							"id": "addr_yEd4rG0HJNupdX2m",
							"line_1": "375, Av. General Justo, Centro",
							"line_2": "8º andar",
							"zip_code": "20021130",
							"city": "Rio de Janeiro",
							"state": "RJ",
							"country": "BR",
							"status": "active",
							"created_at": "2019-01-21T18:44:17Z",
							"updated_at": "2019-01-21T18:44:17Z",
							"metadata": {
								"id": "my_address_id"
							}
						},
						"created_at": "2019-01-21T18:36:30Z",
						"updated_at": "2019-01-21T18:44:17Z",
						"phones": {}
					}
				},
				"created_at": "2019-01-22T14:20:19Z",
				"updated_at": "2019-01-22T14:20:19Z",
				"gateway_response": {
					"code": "200"
				}
			}
		}
	],
	"checkouts": []
}

Status das transações de Voucher (Transaction)

As transações de Voucher podem possuir os seguintes status:

StatusDescrição
authorized_pending_captureAutorizada pendente de captura
not_authorizedNão autorizada
capturedCapturada
partial_captureCapturada parcialmente
refundedEstornada
voidedCancelada
partial_refundedEstornada parcialmente
partial_voidCancelada parcialemente
error_on_voidingErro no cancelamento
error_on_refundingErro no estorno
waiting_cancellationAguardando cancelamento
with_errorCom erro
failedFalha