- Autenticação
- Fatura
- Clientes
- Merchant
- Produtos
- Webhooks & Gatilhos
- Utilidades
- Login Admin CopyPOST
- Create Merchant CopyPOST
Capturar Fatura para Cartão de Crédito
POST
http://{{app_url}}/api/v1/invoices/capture/2329167a-29d8-41f6-bea5-305461430d7c
Requisição
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Exemplo:
Authorization: Bearer ********************
Parâmetros Bodyapplication/json
method
string
requerido
payment
object
requerido
card
object
requerido
Exemplo
{
"method": "credit_card",
"payment": {
"card": {
"holder": "Jorge Tadeu",
"holder_document": "07120188917",
"number": "5502093769921690",
"expiry": "0131",
"cvv": "411",
"brand": "mastercard",
"installment": 10
}
}
}
Exemplos de Requisição
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://{{app_url}}/api/v1/invoices/capture/2329167a-29d8-41f6-bea5-305461430d7c' \
--header 'Content-Type: application/json' \
--data-raw '{
"method": "credit_card",
"payment": {
"card": {
"holder": "Jorge Tadeu",
"holder_document": "07120188917",
"number": "5502093769921690",
"expiry": "0131",
"cvv": "411",
"brand": "mastercard",
"installment": 10
}
}
}'
Respostas
🟢200Capturar Fatura para Cartão de Crédito
application/json
Body
id
string
requerido
ref
string
requerido
description
null
requerido
status
string
requerido
subtotal_amount
string
requerido
total_amount
string
requerido
tax_amount
null
requerido
discount_amount
null
requerido
link_token
string
requerido
link
string
requerido
customer
object
requerido
id
string
requerido
name
string
requerido
email
string
requerido
description
null
requerido
cellphone
string
requerido
cpfcnpj
string
requerido
address
object
requerido
items
array [object {4}]
requerido
id
string
opcional
product
object
opcional
quantity
integer
opcional
total
string
opcional
payment
object
requerido
id
string
requerido
status
string
requerido
method
string
requerido
interest_amount
string
requerido
fee_amount
string
requerido
discount_amount
string
requerido
total_amount
string
requerido
transaction
object
requerido
next_withdraw_available
string
requerido
withdraw_agenda
object
requerido
paid_at
string
requerido
payable_with
object
requerido
pix
boolean
requerido
boleto
boolean
requerido
credit_card
boolean
requerido
credit_card_with_interest
boolean
requerido
shipping
null
requerido
due_date
string
requerido
paid_at
null
requerido
notification_url
null
requerido
created_at
string
requerido
notifications
array [object {5}]
requerido
title
string
opcional
message
string
opcional
type
string
opcional
created_at
string
opcional
meta
array
opcional
Exemplo
{
"id": "2329167a-29d8-41f6-bea5-305461430d7c",
"ref": "5",
"description": null,
"status": "paid",
"subtotal_amount": "100,00",
"total_amount": "100,00",
"tax_amount": null,
"discount_amount": null,
"link_token": "hQ27CHiPXxHmC6fImMoS1ysCTq6te8",
"link": "http://localhost:5180/hapo-code-ltda./public/fatura/hQ27CHiPXxHmC6fImMoS1ysCTq6te8",
"customer": {
"id": "da55e5ed-c073-4dce-b649-14e4fe382a11",
"name": "João da Silva",
"email": "joao@testeste.com.br",
"description": null,
"cellphone": "11999999999",
"cpfcnpj": "07120188917",
"address": {
"street": "Rua Reverendo Paulo Hecke",
"number": "123",
"complement": "Sala 1",
"neighborhood": "Ahú",
"city": "Curitiba",
"state": "PR",
"zipcode": "82200-300"
}
},
"items": [
{
"id": "53cdf70d-8bb0-4736-b235-dace860d2316",
"product": {
"id": "8c214358-46c3-4d90-991e-e12708deb114",
"name": "Produto redondo",
"description": "Desc",
"price": "50,00"
},
"quantity": 2,
"total": "100,00"
}
],
"payment": {
"id": "81229670-0875-4f34-b18c-7ba77988a81b",
"status": "paid",
"method": "credit_card",
"interest_amount": "0",
"fee_amount": "2600",
"discount_amount": "0",
"total_amount": "10000",
"transaction": {
"card_brand": "MasterCard",
"card_last_four": null,
"card_holder": "Daniel Leal dos Santos",
"card_holder_cpf": "07120188917",
"card_installments": "10"
},
"next_withdraw_available": "24/05/2023",
"withdraw_agenda": {
"2023-05-24": {
"amount": "1000",
"fee_amount": "260"
},
"2023-06-23": {
"amount": "1000",
"fee_amount": "260"
},
"2023-07-23": {
"amount": "1000",
"fee_amount": "260"
},
"2023-08-22": {
"amount": "1000",
"fee_amount": "260"
},
"2023-09-21": {
"amount": "1000",
"fee_amount": "260"
},
"2023-10-21": {
"amount": "1000",
"fee_amount": "260"
},
"2023-11-20": {
"amount": "1000",
"fee_amount": "260"
},
"2023-12-20": {
"amount": "1000",
"fee_amount": "260"
},
"2024-01-19": {
"amount": "1000",
"fee_amount": "260"
},
"2024-02-18": {
"amount": "1000",
"fee_amount": "260"
}
},
"paid_at": "2023-04-24 15:09:38"
},
"payable_with": {
"pix": true,
"boleto": true,
"credit_card": true,
"credit_card_with_interest": true
},
"shipping": null,
"due_date": "27/04/2023",
"paid_at": null,
"notification_url": null,
"created_at": "24/04/2023",
"notifications": [
{
"title": "Nova fatura criada",
"message": "Fatura com id: 2329167a-29d8-41f6-bea5-305461430d7c criada com sucesso.",
"type": "success",
"created_at": "24/04/2023 15:09",
"meta": []
}
]
}
Modified at 2024-12-17 14:37:19