Cobrar um cliente
POST/api/public/v1/charge
Cobrar um cliente
Request
- application/json
Body
required
Requisição para o endpoint de cobrança
- NewCustomerCharge
- ExistingCustomerCharge
oneOf
customer object
name stringrequired
Nome do cliente
email stringrequired
E-mail do cliente
document stringrequired
Documento do cliente
phone string
Telefone do cliente
card_token stringrequired
Token do cartão criado previamente
installments integerrequired
Quantidade de parcelas
offer_code stringrequired
Código da oferta
pid string
Código do afiliado
discount_amount integer
Valor do desconto em centavos
customer_code integerrequired
Código identificador do cliente
card_code stringrequired
Código identificador do cartão
installments integerrequired
Quantidade de parcelas
offer_code stringrequired
Código da oferta
pid string
Código do afiliado
discount_amount integer
Valor do desconto em centavos
Responses
- 200
- 400
Sucesso
- application/json
- Schema
- Example (from schema)
- Example
Schema
- Array [
- ]
- Array [
- ]
hash string
amount integer
discount integer
installments integer
customer object
name string
email string
document string
phone string
code string
items object[]
offer object
code string
name string
price integer
product object
code string
name string
description string
transactions object[]
status string
Possible values: [authorized, refused]
hash string
payment_method string
created_at date-time
card object
code string
brand string
last4 string
expiration_date string
installments_labels object
label string
amount number
value integer
created_at date-time
commissions object
type string
amount number
{
"hash": "string",
"amount": 0,
"discount": 0,
"installments": 0,
"customer": {
"name": "string",
"email": "string",
"document": "string",
"phone": "string",
"code": "string"
},
"items": [
{
"offer": {
"code": "string",
"name": "string",
"price": 0
},
"product": {
"code": "string",
"name": "string",
"description": "string"
}
}
],
"transactions": [
{
"status": "authorized",
"hash": "string",
"payment_method": "string",
"created_at": "2024-11-30T15:28:32.604Z",
"card": {
"code": "string",
"brand": "string",
"last4": "string",
"expiration_date": "string"
}
}
],
"installments_labels": {
"label": "string",
"amount": 0,
"value": 0
},
"created_at": "2024-11-30T15:28:32.604Z",
"commissions": {
"type": "string",
"amount": 0
}
}
{
"hash": "TOCAAF462411RDY43QQ",
"amount": 100000,
"discount": 0,
"installments": 6,
"customer": {
"name": "Elisa Rempel",
"email": "elisarempel@teste.com",
"document": "88411625893",
"phone": "1234567890",
"code": "U3F0DEA39"
},
"items": [
{
"offer": {
"code": "OFF022C8A",
"name": "Principal",
"price": 100000
},
"product": {
"code": "P8641C251",
"name": "Curso",
"description": "Produto teste."
}
}
],
"transactions": [
{
"status": "authorized",
"hash": "TPC6CBA6241140P79DUP",
"payment_method": "credit_card",
"created_at": "2023-11-24T14:46:40Z",
"card": {
"code": "TCD6CBA6241140P79DUP",
"brand": "mastercard",
"last4": "1111",
"expiration_date": "09/2026"
}
}
],
"installments_labels": {
"label": "6x de R$ R$ 166,67",
"amount": 16666,
"value": 6
},
"created_at": "2023-11-24T14:46:40Z",
"commissions": {
"type": "producer",
"amount": 1000
}
}
Erro
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"status": "error",
"message": "Erro"
}
{
"status": "error",
"message": "Erro"
}
Loading...