Criar link de pagamento
A API de Link de Pagamentos fica disponível todos os dias da semana, 24 horas por dia.
Header
{
"authorization": "Bearer Token"
}Schema
account_id
stringIdentificador da conta.items:
amount
integerdescription
stringquantity
integer
customer:
name
string
payments:
amount
integerpayment_method
stringcheckout:
expires_in
integerskip_checkout_success_page
booleanbilling_address_editable
booleancustomer_editable
booleanaccepted_payment_methods
stringaccepted_multi_payment_methods
stringsuccess_url
stringcredit_card
capture
booleaninstallments
number
integertotal
integer
BODY REQUEST
{
"account_id": "e8f5-487c-b8e0-7b4929bee5db",
"items": [{
"amount": 3000,
"description": "Teste de Link de pagamento.",
"quantity": 1
}],
"customer": {
"name": "Cliente"
},
"closed": true,
"payments": [{
"amount": 3000,
"payment_method": "checkout",
"checkout": {
"expires_in": 10080,
"skip_checkout_success_page": true,
"billing_address_editable": false,
"customer_editable": true,
"accepted_payment_methods": [
"credit_card"
],
"accepted_multi_payment_methods": [],
"success_url": "https://sandbox.codetech.one/v2/api/sucesso",
"credit_card": {
"capture": true,
"installments": [{
"number": 1,
"total": 1000
},
{
"number": 2,
"total": 1000
},
{
"number": 3,
"total": 1000
}
]
}
}
}]
}Response
{
"amount": 3000,
"checkouts": [
{
"accepted_multi_payment_methods": [],
"accepted_payment_methods": [
"credit_card"
],
"amount": 3000,
"billing_address": {},
"billing_address_editable": true,
"created_at": "2023-11-08T16:54:31Z",
"credit_card": {
"authentication": {
"threed_secure": {},
"type": "none"
},
"capture": true,
"installments": [
{
"number": 1,
"total": 1000
},
{
"number": 2,
"total": 1000
},
{
"number": 3,
"total": 1000
}
]
},
"currency": "BRL",
"customer": {
"created_at": "2023-11-08T16:54:31Z",
"delinquent": false,
"id": "cus_GvMY2zgS7c9xYOXD",
"name": "Cliente Teste",
"phones": {},
"updated_at": "2023-11-08T16:54:31Z"
},
"customer_editable": true,
"expires_at": "2023-11-15T16:54:31Z",
"id": "chk_wM3RX3qceulyY6W9",
"metadata": {},
"payment_url": "https://urlPersonalizada.com/checkout/v1/orders/chk_wM3RX3qceulyY6W9",
"required_fields": [
"customer.email",
"customer.document",
"customer.mobile_phone",
"customer.name"
],
"shippable": false,
"skip_checkout_success_page": true,
"status": "open",
"success_url": "https://sandbox.codetech.one/v2/api/sucesso",
"updated_at": "2023-11-08T16:54:31Z"
}
],
"closed": false,
"code": "8N5YAPFG2O",
"created_at": "2023-11-08T16:54:31Z",
"currency": "BRL",
"customer": {
"created_at": "2023-11-08T16:54:31Z",
"delinquent": false,
"id": "cus_GvMY2zgS7c9xYOXD",
"name": "Bruno M R",
"phones": {},
"updated_at": "2023-11-08T16:54:31Z"
},
"id": "or_ALbmn7RhjAfyzdW7",
"items": [
{
"amount": 3000,
"created_at": "2023-11-08T16:54:31Z",
"description": "Teste de Link de pagamento.",
"id": "oi_x05Y7aPBipcLobae",
"quantity": 1,
"status": "active",
"type": "product",
"updated_at": "2023-11-08T16:54:31Z"
}
],
"session_id": "866e-419e-9d8e-ca1801dca662",
"status": "pending",
"updated_at": "2023-11-08T16:54:31Z"
}Last updated