API
Skip to main content

Embedding on a web page

POST /checkouts

Creation of the checkout with the following data:

{
"payment": {
"amount": 500,
"code": "REFPRODUTO_1",
"summary": "Computador",
"availableMethods": [
// <== Métodos de pagamento a serem disponibilizados para realizar o pagamento
{
"code": "CC"
},
{
"code": "MB"
},
{
"code": "MW"
}
]
},
"page": {
"language": "PT",
"layout": "web"
},
"redirects": [
{
"type": "success",
"url": "https://www.url-apos-sucesso.dominio"
},
{
"type": "cancel",
"url": "https://www.url-apos-cancelamento.dominio"
},
{
"type": "back",
"url": "https://www.url-voltar.dominio"
}
]
}

The response returns the id which identifies the checkout to the API. The checkoutUrl is the link to access the page and make the payment. The paymentId is the id that identifies the payment.

Accessing the checkoutUrl displays the following page:

Checkout CC