curl --request POST \
--url https://api-sandbox.fortalpay.tech/v1/checkouts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 1
}
]
}
'{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "PENDING_PAYMENT",
"total": 10000,
"availablePaymentMethods": [
"PIX"
],
"checkoutUrl": "https://pay.fortalpay.com.br/pay/3fa85f64-5717-4562-b3fc-2c963f66afa6",
"completionUrl": "https://seusite.com/sucesso",
"returnUrl": "https://seusite.com/voltar",
"externalId": "pedido-45891",
"metadata": {
"origem": "mobile"
},
"customer": {
"name": "Maria Silva",
"email": "maria@email.com",
"document": "***.***.***-25",
"phone": "85999999999"
},
"items": [
{
"productName": "Produto de exemplo",
"unitPrice": 10000,
"quantity": 1,
"total": 10000
}
]
},
"success": true,
"error": null
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Criar checkout
Cria uma página de pagamento hospedada com cliente opcional.
POST
/
checkouts
curl --request POST \
--url https://api-sandbox.fortalpay.tech/v1/checkouts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 1
}
]
}
'{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "PENDING_PAYMENT",
"total": 10000,
"availablePaymentMethods": [
"PIX"
],
"checkoutUrl": "https://pay.fortalpay.com.br/pay/3fa85f64-5717-4562-b3fc-2c963f66afa6",
"completionUrl": "https://seusite.com/sucesso",
"returnUrl": "https://seusite.com/voltar",
"externalId": "pedido-45891",
"metadata": {
"origem": "mobile"
},
"customer": {
"name": "Maria Silva",
"email": "maria@email.com",
"document": "***.***.***-25",
"phone": "85999999999"
},
"items": [
{
"productName": "Produto de exemplo",
"unitPrice": 10000,
"quantity": 1,
"total": 10000
}
]
},
"success": true,
"error": null
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Somente
items é obrigatório. Informe customerId para associar um cliente existente.Authorizations
Todas as requisições devem incluir sua API key no cabeçalho Authorization
usando o formato ApiKey <sua_api_key>. Não use o esquema Bearer.
Sem esse cabeçalho, a requisição será rejeitada.
Use fpay_sk_test_... no ambiente de teste e fpay_sk_live_... em produção.
Saiba como criar e usar uma API key.
Body
application/json
Minimum array length:
1Show child attributes
Show child attributes
UUIDs dos cupons disponibilizados no checkout hospedado.
Quando omitido, utiliza PIX. Atualmente, apenas PIX é suportado.
Available options:
PIX UUID de um cliente existente.
Maximum string length:
255