{
    "openapi": "3.1.0",
    "info": {
        "title": "pixeway \u2014 documenta\u00e7\u00e3o",
        "version": "1.0.0",
        "description": "## API v1 (Pix)\n\nDocumenta\u00e7\u00e3o das rotas de **cobran\u00e7a Pix** e **saques Pix**. Autentica\u00e7\u00e3o: `Authorization: Bearer` com token de integra\u00e7\u00e3o (Sanctum).\n\nNo OpenAPI abaixo, as rotas aparecem em rela\u00e7\u00e3o ao servidor **\/api** (ex.: `GET \/v1\/payments` corresponde a `GET \/api\/v1\/payments` na aplica\u00e7\u00e3o).\n\n### Ambiente sandbox\n\nPara integra\u00e7\u00e3o e testes sem impacto em produ\u00e7\u00e3o, use o host p\u00fablico de sandbox **`https:\/\/sandbox.pixeway.com`**: a API fica em `https:\/\/sandbox.pixeway.com\/api` (mesmos caminhos que em produ\u00e7\u00e3o). No seletor de servidor da documenta\u00e7\u00e3o interativa, escolha a op\u00e7\u00e3o **Sandbox**.\n\n### Pagamentos\n\n- **POST** `\/api\/v1\/payments` \u2014 criar cobran\u00e7a\n- **GET** `\/api\/v1\/payments` \u2014 listar (pagina\u00e7\u00e3o; query `per_page`, m\u00e1x. 100)\n- **GET** `\/api\/v1\/payments\/{payment}` \u2014 recuperar uma\n- **POST** `\/api\/v1\/payments\/{payment}\/refund` \u2014 reembolsar cobran\u00e7a paga\n\nPermiss\u00f5es: `payments.create`, `payments.view`, `payments.refund`.\n\n### Saques (conta)\n\n- **POST** `\/api\/v1\/withdrawals` \u2014 solicitar saque\n- **GET** `\/api\/v1\/withdrawals` \u2014 listar saques da conta (`per_page`, m\u00e1x. 100)\n- **GET** `\/api\/v1\/withdrawals\/{withdrawal}` \u2014 detalhe de um saque\n- **POST** `\/api\/v1\/withdrawals\/{withdrawal}\/cancel` \u2014 cancelar saque pendente\n\nPermiss\u00f5es: cria\u00e7\u00e3o\/cancelamento com `payments.create`; listagem\/detalhe com `payments.view`."
    },
    "servers": [
        {
            "url": "https:\/\/pix-gateway-kc6qnagy.on-forge.com\/api",
            "description": "Produ\u00e7\u00e3o"
        },
        {
            "url": "https:\/\/sandbox.pixeway.com\/api",
            "description": "Sandbox (sandbox.pixeway.com)"
        }
    ],
    "tags": [
        {
            "name": "Pagamentos"
        },
        {
            "name": "Saques"
        }
    ],
    "paths": {
        "\/v1\/payments": {
            "post": {
                "operationId": "payment.store",
                "summary": "Cria\u00e7\u00e3o de pagamento",
                "tags": [
                    "Pagamentos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "method": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "credit_card",
                                            "pix",
                                            "boleto"
                                        ]
                                    },
                                    "amount": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100000000
                                    },
                                    "comment": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 140
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "metadata": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "simulate_status": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "pending",
                                            "paid",
                                            "expired",
                                            "canceled",
                                            "refunded"
                                        ]
                                    },
                                    "customer": {
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "maxLength": 255
                                            },
                                            "email": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "email",
                                                "maxLength": 128
                                            },
                                            "phone": {
                                                "type": "string",
                                                "maxLength": 20
                                            },
                                            "document": {
                                                "type": "string",
                                                "maxLength": 20
                                            },
                                            "ip": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "address": {
                                                "type": [
                                                    "object",
                                                    "null"
                                                ],
                                                "properties": {
                                                    "street": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 255
                                                    },
                                                    "number": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 10
                                                    },
                                                    "complement": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 255
                                                    },
                                                    "neighborhood": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 255
                                                    },
                                                    "city": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 255
                                                    },
                                                    "state": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 2
                                                    },
                                                    "zip_code": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "maxLength": 8
                                                    }
                                                }
                                            }
                                        },
                                        "required": [
                                            "name",
                                            "phone",
                                            "document"
                                        ]
                                    },
                                    "products": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string",
                                                    "maxLength": 255
                                                },
                                                "quantity": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 999999
                                                },
                                                "unit_price": {
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "maximum": 100000000
                                                },
                                                "sku": {
                                                    "type": "string",
                                                    "maxLength": 128
                                                },
                                                "link": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "uri",
                                                    "maxLength": 2048
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "quantity",
                                                "unit_price",
                                                "sku"
                                            ]
                                        },
                                        "maxItems": 100
                                    }
                                },
                                "required": [
                                    "amount",
                                    "customer"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "uuid": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "correlation_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "method": {
                                            "type": "string"
                                        },
                                        "amount": {
                                            "type": "integer"
                                        },
                                        "br_code": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "comment": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "customer": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "metadata": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "products": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "product_id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "quantity": {
                                                        "type": "integer"
                                                    },
                                                    "unit_price": {
                                                        "type": "integer"
                                                    },
                                                    "sku": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "link": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "product_id",
                                                    "name",
                                                    "quantity",
                                                    "unit_price",
                                                    "sku",
                                                    "link"
                                                ]
                                            }
                                        },
                                        "customer_ip": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        },
                                        "paid_at": {
                                            "type": "string"
                                        },
                                        "refunded_at": {
                                            "type": "string"
                                        },
                                        "created_at": {
                                            "type": "string"
                                        },
                                        "updated_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "uuid",
                                        "correlation_id",
                                        "status",
                                        "method",
                                        "amount",
                                        "br_code",
                                        "comment",
                                        "customer",
                                        "metadata",
                                        "products",
                                        "customer_ip",
                                        "expires_at",
                                        "paid_at",
                                        "refunded_at",
                                        "created_at",
                                        "updated_at"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "get": {
                "operationId": "payment.index",
                "summary": "Listagem de pagamentos",
                "tags": [
                    "Pagamentos"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "current_page": {
                                            "type": "integer",
                                            "minimum": 1
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/Payment"
                                            }
                                        },
                                        "first_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "from": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "minimum": 1
                                        },
                                        "last_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "last_page": {
                                            "type": "integer",
                                            "minimum": 1
                                        },
                                        "links": {
                                            "type": "array",
                                            "description": "Generated paginator links.",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "url": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "active": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "url",
                                                    "label",
                                                    "active"
                                                ]
                                            }
                                        },
                                        "next_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "path": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Base path for paginator generated URLs."
                                        },
                                        "per_page": {
                                            "type": "integer",
                                            "description": "Number of items shown per page.",
                                            "minimum": 0
                                        },
                                        "prev_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "to": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "description": "Number of the last item in the slice.",
                                            "minimum": 1
                                        },
                                        "total": {
                                            "type": "integer",
                                            "description": "Total number of items being paginated.",
                                            "minimum": 0
                                        }
                                    },
                                    "required": [
                                        "current_page",
                                        "data",
                                        "first_page_url",
                                        "from",
                                        "last_page_url",
                                        "last_page",
                                        "links",
                                        "next_page_url",
                                        "path",
                                        "per_page",
                                        "prev_page_url",
                                        "to",
                                        "total"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/payments\/{payment}": {
            "get": {
                "operationId": "payment.show",
                "summary": "Recupera\u00e7\u00e3o de pagamento",
                "tags": [
                    "Pagamentos"
                ],
                "parameters": [
                    {
                        "name": "payment",
                        "in": "path",
                        "required": true,
                        "description": "The payment UUID",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "uuid": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "correlation_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "method": {
                                            "type": "string"
                                        },
                                        "amount": {
                                            "type": "integer"
                                        },
                                        "br_code": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "comment": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "customer": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "metadata": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "products": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "product_id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "quantity": {
                                                        "type": "integer"
                                                    },
                                                    "unit_price": {
                                                        "type": "integer"
                                                    },
                                                    "sku": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "link": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "product_id",
                                                    "name",
                                                    "quantity",
                                                    "unit_price",
                                                    "sku",
                                                    "link"
                                                ]
                                            }
                                        },
                                        "customer_ip": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        },
                                        "paid_at": {
                                            "type": "string"
                                        },
                                        "refunded_at": {
                                            "type": "string"
                                        },
                                        "created_at": {
                                            "type": "string"
                                        },
                                        "updated_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "uuid",
                                        "correlation_id",
                                        "status",
                                        "method",
                                        "amount",
                                        "br_code",
                                        "comment",
                                        "customer",
                                        "metadata",
                                        "products",
                                        "customer_ip",
                                        "expires_at",
                                        "paid_at",
                                        "refunded_at",
                                        "created_at",
                                        "updated_at"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/payments\/{payment}\/refund": {
            "post": {
                "operationId": "payment.refund",
                "summary": "Reembolso de pagamento",
                "tags": [
                    "Pagamentos"
                ],
                "parameters": [
                    {
                        "name": "payment",
                        "in": "path",
                        "required": true,
                        "description": "The payment UUID",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "comment": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 140
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "uuid": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "correlation_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "method": {
                                            "type": "string"
                                        },
                                        "amount": {
                                            "type": "integer"
                                        },
                                        "br_code": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "comment": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "customer": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "metadata": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "products": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "product_id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "quantity": {
                                                        "type": "integer"
                                                    },
                                                    "unit_price": {
                                                        "type": "integer"
                                                    },
                                                    "sku": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "link": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "product_id",
                                                    "name",
                                                    "quantity",
                                                    "unit_price",
                                                    "sku",
                                                    "link"
                                                ]
                                            }
                                        },
                                        "customer_ip": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        },
                                        "paid_at": {
                                            "type": "string"
                                        },
                                        "refunded_at": {
                                            "type": "string"
                                        },
                                        "created_at": {
                                            "type": "string"
                                        },
                                        "updated_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "uuid",
                                        "correlation_id",
                                        "status",
                                        "method",
                                        "amount",
                                        "br_code",
                                        "comment",
                                        "customer",
                                        "metadata",
                                        "products",
                                        "customer_ip",
                                        "expires_at",
                                        "paid_at",
                                        "refunded_at",
                                        "created_at",
                                        "updated_at"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/withdrawals": {
            "get": {
                "operationId": "withdrawal.index",
                "summary": "Listagem de saques",
                "tags": [
                    "Saques"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "current_page": {
                                            "type": "integer",
                                            "minimum": 1
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/Withdrawal"
                                            }
                                        },
                                        "first_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "from": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "minimum": 1
                                        },
                                        "last_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "last_page": {
                                            "type": "integer",
                                            "minimum": 1
                                        },
                                        "links": {
                                            "type": "array",
                                            "description": "Generated paginator links.",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "url": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "active": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "url",
                                                    "label",
                                                    "active"
                                                ]
                                            }
                                        },
                                        "next_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "path": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "description": "Base path for paginator generated URLs."
                                        },
                                        "per_page": {
                                            "type": "integer",
                                            "description": "Number of items shown per page.",
                                            "minimum": 0
                                        },
                                        "prev_page_url": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "to": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "description": "Number of the last item in the slice.",
                                            "minimum": 1
                                        },
                                        "total": {
                                            "type": "integer",
                                            "description": "Total number of items being paginated.",
                                            "minimum": 0
                                        }
                                    },
                                    "required": [
                                        "current_page",
                                        "data",
                                        "first_page_url",
                                        "from",
                                        "last_page_url",
                                        "last_page",
                                        "links",
                                        "next_page_url",
                                        "path",
                                        "per_page",
                                        "prev_page_url",
                                        "to",
                                        "total"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            },
            "post": {
                "operationId": "withdrawal.store",
                "summary": "Solicita\u00e7\u00e3o de saque (Pix)",
                "tags": [
                    "Saques"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreWithdrawalRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "amount": {
                                            "type": "integer"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "pix_key": {
                                            "type": "string"
                                        },
                                        "payout_meta": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "amount",
                                        "status",
                                        "pix_key",
                                        "payout_meta"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": "N\u00e3o foi poss\u00edvel criar o saque."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/withdrawals\/{withdrawal}": {
            "get": {
                "operationId": "withdrawal.show",
                "summary": "Recupera\u00e7\u00e3o de saque",
                "tags": [
                    "Saques"
                ],
                "parameters": [
                    {
                        "name": "withdrawal",
                        "in": "path",
                        "required": true,
                        "description": "The withdrawal ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "amount": {
                                            "type": "integer"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "pix_key": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "payout_meta": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {}
                                        },
                                        "analysis_note": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "decided_at": {
                                            "type": "string"
                                        },
                                        "created_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "amount",
                                        "status",
                                        "pix_key",
                                        "payout_meta",
                                        "analysis_note",
                                        "decided_at",
                                        "created_at"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/withdrawals\/{withdrawal}\/cancel": {
            "post": {
                "operationId": "withdrawal.cancel",
                "summary": "Cancelamento de saque",
                "tags": [
                    "Saques"
                ],
                "parameters": [
                    {
                        "name": "withdrawal",
                        "in": "path",
                        "required": true,
                        "description": "The withdrawal ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Saque cancelado."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Este saque n\u00e3o pode ser cancelado."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Payment": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "uuid": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "account_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "acquirer_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "user_id": {
                        "type": "integer"
                    },
                    "correlation_id": {
                        "type": "string"
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/PaymentStatus"
                    },
                    "method": {
                        "$ref": "#\/components\/schemas\/PaymentMethod"
                    },
                    "woovi_charge_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "br_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "comment": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "customer": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "customer_ip": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "paid_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "refunded_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "refund_correlation_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "uuid",
                    "account_id",
                    "acquirer_account_id",
                    "user_id",
                    "correlation_id",
                    "amount",
                    "status",
                    "method",
                    "woovi_charge_id",
                    "br_code",
                    "comment",
                    "customer",
                    "metadata",
                    "customer_ip",
                    "expires_at",
                    "paid_at",
                    "refunded_at",
                    "refund_correlation_id",
                    "created_at",
                    "updated_at"
                ],
                "title": "Payment"
            },
            "PaymentMethod": {
                "type": "string",
                "enum": [
                    "credit_card",
                    "pix",
                    "boleto"
                ],
                "title": "PaymentMethod"
            },
            "PaymentStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "paid",
                    "expired",
                    "canceled",
                    "refunded"
                ],
                "title": "PaymentStatus"
            },
            "StoreWithdrawalRequest": {
                "type": "object",
                "properties": {
                    "amount": {
                        "type": "integer",
                        "minimum": 1000,
                        "maximum": 100000000
                    },
                    "pix_key": {
                        "type": "string",
                        "maxLength": 77
                    },
                    "currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 16
                    },
                    "customerId": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "payout_meta": {
                        "type": "object",
                        "properties": {
                            "holder_name": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 255
                            },
                            "tax_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 32
                            },
                            "pix_key_type": {
                                "type": "string",
                                "enum": [
                                    "cpf",
                                    "cnpj",
                                    "email",
                                    "phone",
                                    "random"
                                ]
                            },
                            "customer_id": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 128
                            },
                            "currency": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 16
                            }
                        },
                        "required": [
                            "pix_key_type"
                        ]
                    }
                },
                "required": [
                    "amount",
                    "pix_key",
                    "payout_meta"
                ],
                "title": "StoreWithdrawalRequest"
            },
            "Withdrawal": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "account_id": {
                        "type": "integer"
                    },
                    "requested_by": {
                        "type": "integer"
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/WithdrawalStatus"
                    },
                    "pix_key": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "payout_meta": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "analysis_note": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "decided_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "decided_by": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "account_id",
                    "requested_by",
                    "amount",
                    "status",
                    "pix_key",
                    "payout_meta",
                    "analysis_note",
                    "decided_at",
                    "decided_by",
                    "created_at",
                    "updated_at"
                ],
                "title": "Withdrawal"
            },
            "WithdrawalStatus": {
                "type": "string",
                "enum": [
                    "created",
                    "in_analysis",
                    "approved",
                    "refused",
                    "cancelled",
                    "awaiting_approval"
                ],
                "title": "WithdrawalStatus"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}