{
  "openapi": "3.1.0",
  "info": {
    "title": "CashPago API",
    "version": "2026-12-01",
    "description": "PIX, boleto, cartão, link de pagamento, split, webhooks assinados e sandbox com simuladores. Documentação: https://docs.cashpago.com.br"
  },
  "servers": [
    {
      "url": "https://sandbox.cashpago.com.br",
      "description": "Sandbox"
    },
    {
      "url": "https://api.cashpago.com.br",
      "description": "Produção"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "client_id:client_secret (apenas /oauth/token)"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Token de /oauth/token (300 s)"
      }
    }
  },
  "tags": [
    {
      "name": "Autenticação"
    },
    {
      "name": "Conta digital"
    },
    {
      "name": "PIX"
    },
    {
      "name": "Boleto"
    },
    {
      "name": "Cartão"
    },
    {
      "name": "Link de pagamento"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Simuladores do sandbox"
    },
    {
      "name": "Planos (beta)"
    },
    {
      "name": "Assinaturas (beta)"
    }
  ],
  "webhooks": {
    "chargePaid": {
      "post": {
        "summary": "charge.paid",
        "description": "Aviso assinado (X-CashPago-Signature).",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "id": "evt_34e90531093e1d1944074ca7",
                "type": "charge.paid",
                "created_at": "2026-11-30T18:14:06-03:00",
                "api_version": "2026-12-01",
                "livemode": false,
                "data": {
                  "object": "charge",
                  "uuid": "4422c689-1516-4734-9d8e-be757affe468",
                  "transacao_id": "mensalidade-2026-12-l",
                  "tipo": "link",
                  "status": "paid",
                  "valor": 350,
                  "valor_pago": 350,
                  "taxa": 0,
                  "valor_liquido": 350,
                  "forma_pagamento": "cartao",
                  "cod_forma_pagamento": 2,
                  "parcelas": 3,
                  "cartao": {
                    "bandeira": "visa",
                    "final": "1111"
                  },
                  "txid": null,
                  "end_to_end_id": null,
                  "nosso_numero": null,
                  "vencimento": null,
                  "criado_em": "2026-11-30T18:14:06-03:00",
                  "pago_em": "2026-11-30T18:14:06-03:00",
                  "valor_estornado": null,
                  "motivo_recusa": null,
                  "split": null,
                  "assinatura_id": null,
                  "fatura_id": null,
                  "sandbox": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Responda 2xx em até 10 s"
          }
        }
      }
    }
  },
  "paths": {
    "/oauth/token": {
      "post": {
        "operationId": "oauth",
        "summary": "Gerar token de acesso",
        "description": "Troca `client_id` e `client_secret` por um token Bearer válido por **300 segundos**. Envie `Authorization: Basic base64(client_id:client_secret)` e corpo vazio.\n\n- Gere um novo token quando faltar menos de 30 s para expirar (a collection faz isso sozinha).\n\n- Credencial inválida responde HTTP 200 com `{\"success\": false, \"error\": \"Unauthorized Access!\"}`: valide sempre o campo `success`.",
        "tags": [
          "Autenticação"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "Bearer"
                        },
                        "access_token": {
                          "type": "string",
                          "example": "<omitido>"
                        },
                        "expiration": {
                          "type": "integer",
                          "example": 300
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "type": "Bearer",
                    "access_token": "<omitido>",
                    "expiration": 300
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    },
    "/account/create": {
      "post": {
        "operationId": "conta-criar",
        "summary": "Criar conta digital",
        "description": "Cria (ou retorna, se já existir para o documento) a conta digital de um recebedor do seu parceiro. O `uuid` é usado no **split** de PIX, cartão e assinaturas.\n\n- `tipo`: 1 = pessoa física, 2 = pessoa jurídica.\n\n- Se já existir conta para o documento no seu parceiro, a resposta é `{\"success\": false, \"error\": \"Conta já existe!\", \"uuid\": \"<uuid existente>\"}` — use o `uuid` devolvido.",
        "tags": [
          "Conta digital"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "507624dd-5680-45cb-bcf5-43752863a5f0"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "507624dd-5680-45cb-bcf5-43752863a5f0"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tipo": {
                    "type": "integer",
                    "example": 1
                  },
                  "nome": {
                    "type": "string",
                    "example": "Professor Exemplo"
                  },
                  "documento": {
                    "type": "string",
                    "example": "12345678909"
                  },
                  "email": {
                    "type": "string",
                    "example": "professor@exemplo.com"
                  },
                  "celular": {
                    "type": "string",
                    "example": "61999990000"
                  }
                }
              },
              "example": {
                "tipo": 1,
                "nome": "Professor Exemplo",
                "documento": "12345678909",
                "email": "professor@exemplo.com",
                "celular": "61999990000"
              }
            }
          }
        }
      }
    },
    "/account/balance/{uuid}": {
      "post": {
        "operationId": "conta-saldo",
        "summary": "Saldo da conta digital",
        "description": "Saldo disponível da conta digital. Envie o `uuid` também no corpo.",
        "tags": [
          "Conta digital"
        ],
        "x-disponibilidade": "todos",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "uuid da conta digital (ex.: o account partner)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "saldo": {
                      "type": "integer",
                      "example": 0
                    }
                  }
                },
                "example": {
                  "success": true,
                  "saldo": 0
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "example": "{{account_partner}}"
                  }
                }
              },
              "example": {
                "uuid": "{{account_partner}}"
              }
            }
          }
        }
      }
    },
    "/account/statement/{uuid}": {
      "post": {
        "operationId": "conta-extrato",
        "summary": "Extrato da conta digital",
        "description": "Lançamentos da conta digital.",
        "tags": [
          "Conta digital"
        ],
        "x-disponibilidade": "todos",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "uuid da conta digital",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "extrato": {
                      "type": "array",
                      "items": {}
                    },
                    "saldo": {
                      "type": "integer",
                      "example": 0
                    }
                  }
                },
                "example": {
                  "success": true,
                  "extrato": [],
                  "saldo": 0
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "example": "{{account_partner}}"
                  }
                }
              },
              "example": {
                "uuid": "{{account_partner}}"
              }
            }
          }
        }
      }
    },
    "/pix/transaction": {
      "post": {
        "operationId": "pix-criar",
        "summary": "Criar cobrança PIX",
        "description": "Gera um PIX com QR Code (copia e cola em `textoQrcode`). Use `vencimento` (dd/mm/aaaa) para manter o QR válido até 23:59:59 do dia — por exemplo, mensalidade gerada no dia 1 com vencimento no dia 20. Sem `vencimento`, a validade é de 5 dias.\n\n- `transacao_id` é o seu identificador (único por cobrança) e volta no webhook.\n\n- `split` é opcional: a soma deve ser igual a `valor` e ao menos um item precisa de `cobrar_taxa: true`.\n\n- O vencimento longo vale também em produção (cobrança imediata com expiração estendida, sem juros/multa).",
        "tags": [
          "PIX"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "91815cc2-de78-4b73-b1be-1570995d7d2b"
                    },
                    "txid": {
                      "type": "string",
                      "example": "e676213d995353e01eadcf8b536269e5"
                    },
                    "textoQrcode": {
                      "type": "string",
                      "example": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e55204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***6304E5DF"
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "91815cc2-de78-4b73-b1be-1570995d7d2b",
                  "txid": "e676213d995353e01eadcf8b536269e5",
                  "textoQrcode": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e55204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***6304E5DF",
                  "sandbox": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cliente": {
                    "type": "object",
                    "properties": {
                      "nome": {
                        "type": "string",
                        "example": "Maria Exemplo"
                      },
                      "cpf_cnpj": {
                        "type": "string",
                        "example": "52998224725"
                      }
                    }
                  },
                  "valor": {
                    "type": "string",
                    "example": "350.00"
                  },
                  "transacao_id": {
                    "type": "string",
                    "example": "mensalidade-2026-12"
                  },
                  "vencimento": {
                    "type": "string",
                    "example": "20/12/2026"
                  },
                  "descricao": {
                    "type": "string",
                    "example": "Mensalidade dezembro"
                  },
                  "split": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "example": "{{account_partner}}"
                        },
                        "valor": {
                          "type": "integer",
                          "example": 70
                        },
                        "cobrar_taxa": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "cliente": {
                  "nome": "Maria Exemplo",
                  "cpf_cnpj": "52998224725"
                },
                "valor": "350.00",
                "transacao_id": "mensalidade-2026-12",
                "vencimento": "20/12/2026",
                "descricao": "Mensalidade dezembro",
                "split": [
                  {
                    "uuid": "{{account_partner}}",
                    "valor": 70,
                    "cobrar_taxa": true
                  },
                  {
                    "uuid": "{{account_professor}}",
                    "valor": 280,
                    "cobrar_taxa": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/pix/find/{txid}": {
      "get": {
        "operationId": "pix-consultar",
        "summary": "Consultar PIX",
        "description": "Consulta no formato da API Pix do Bacen. `status`: `ATIVA` (aguardando) ou `CONCLUIDA` (paga, com `pix[].endToEndId`).",
        "tags": [
          "PIX"
        ],
        "x-disponibilidade": "todos",
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "description": "txid devolvido na criação",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "calendario": {
                      "type": "object",
                      "properties": {
                        "criacao": {
                          "type": "string",
                          "example": "2026-11-30T18:14:06-03:00"
                        },
                        "expiracao": {
                          "type": "integer",
                          "example": 1748753
                        }
                      }
                    },
                    "txid": {
                      "type": "string",
                      "example": "e676213d995353e01eadcf8b536269e5"
                    },
                    "revisao": {
                      "type": "integer",
                      "example": 0
                    },
                    "loc": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "location": {
                          "type": "string",
                          "example": "sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e5"
                        },
                        "tipoCob": {
                          "type": "string",
                          "example": "cob"
                        }
                      }
                    },
                    "location": {
                      "type": "string",
                      "example": "sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e5"
                    },
                    "status": {
                      "type": "string",
                      "example": "CONCLUIDA"
                    },
                    "devedor": {
                      "type": "object",
                      "properties": {
                        "cpf": {
                          "type": "string",
                          "example": "52998224725"
                        },
                        "nome": {
                          "type": "string",
                          "example": "Maria Exemplo"
                        }
                      }
                    },
                    "valor": {
                      "type": "object",
                      "properties": {
                        "original": {
                          "type": "string",
                          "example": "350.00"
                        }
                      }
                    },
                    "chave": {
                      "type": "string",
                      "example": "sandbox@cashpago.com.br"
                    },
                    "solicitacaoPagador": {
                      "type": "string",
                      "example": "SANDBOX - mensalidade-2026-12"
                    },
                    "pixCopiaECola": {
                      "type": "string",
                      "example": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e55204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***6304E5DF"
                    },
                    "pix": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "endToEndId": {
                            "type": "string",
                            "example": "E000000002026113018148C3A5D3B23C"
                          },
                          "txid": {
                            "type": "string",
                            "example": "e676213d995353e01eadcf8b536269e5"
                          },
                          "valor": {
                            "type": "string",
                            "example": "350.00"
                          },
                          "horario": {
                            "type": "string",
                            "example": "2026-11-30T18:14:07-03:00"
                          },
                          "infoPagador": {
                            "type": "string",
                            "example": "Pagamento simulado (sandbox)"
                          }
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "calendario": {
                    "criacao": "2026-11-30T18:14:06-03:00",
                    "expiracao": 1748753
                  },
                  "txid": "e676213d995353e01eadcf8b536269e5",
                  "revisao": 0,
                  "loc": {
                    "id": 1,
                    "location": "sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e5",
                    "tipoCob": "cob"
                  },
                  "location": "sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e5",
                  "status": "CONCLUIDA",
                  "devedor": {
                    "cpf": "52998224725",
                    "nome": "Maria Exemplo"
                  },
                  "valor": {
                    "original": "350.00"
                  },
                  "chave": "sandbox@cashpago.com.br",
                  "solicitacaoPagador": "SANDBOX - mensalidade-2026-12",
                  "pixCopiaECola": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/e676213d995353e01eadcf8b536269e55204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***6304E5DF",
                  "pix": [
                    {
                      "endToEndId": "E000000002026113018148C3A5D3B23C",
                      "txid": "e676213d995353e01eadcf8b536269e5",
                      "valor": "350.00",
                      "horario": "2026-11-30T18:14:07-03:00",
                      "infoPagador": "Pagamento simulado (sandbox)"
                    }
                  ],
                  "sandbox": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/boleto/transaction": {
      "post": {
        "operationId": "boleto-criar",
        "summary": "Criar boleto",
        "description": "Emite boleto registrado (no sandbox, estruturalmente válido e não registrado). Retorna linha digitável, código de barras e PIX do boleto híbrido.",
        "tags": [
          "Boleto"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "71e73430-f6d4-43f6-9a79-5b5e17b62566"
                    },
                    "numero": {
                      "type": "string",
                      "example": "00031285570565683907"
                    },
                    "linhaDigitavel": {
                      "type": "string",
                      "example": "00190000090312855705965683907177416660000035000"
                    },
                    "codigoBarraNumerico": {
                      "type": "string",
                      "example": "00194166600000350000000003128557056568390717"
                    },
                    "url": {
                      "type": "string",
                      "example": "https://sandbox.cashpago.com.br/sandbox/boleto/71e73430-f6d4-43f6-9a79-5b5e17b62566"
                    },
                    "pix": {
                      "type": "string",
                      "example": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/0af13322a6e95cd5e57bde0a1a95cf745204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***63048E1B"
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "71e73430-f6d4-43f6-9a79-5b5e17b62566",
                  "numero": "00031285570565683907",
                  "linhaDigitavel": "00190000090312855705965683907177416660000035000",
                  "codigoBarraNumerico": "00194166600000350000000003128557056568390717",
                  "url": "https://sandbox.cashpago.com.br/sandbox/boleto/71e73430-f6d4-43f6-9a79-5b5e17b62566",
                  "pix": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/0af13322a6e95cd5e57bde0a1a95cf745204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***63048E1B",
                  "sandbox": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cliente": {
                    "type": "object",
                    "properties": {
                      "nome": {
                        "type": "string",
                        "example": "Maria Exemplo"
                      },
                      "cpf_cnpj": {
                        "type": "string",
                        "example": "52998224725"
                      }
                    }
                  },
                  "endereco": {
                    "type": "object",
                    "properties": {
                      "logradouro": {
                        "type": "string",
                        "example": "Rua A"
                      },
                      "numero": {
                        "type": "string",
                        "example": "10"
                      },
                      "bairro": {
                        "type": "string",
                        "example": "Centro"
                      },
                      "cidade": {
                        "type": "string",
                        "example": "Brasilia"
                      },
                      "uf": {
                        "type": "string",
                        "example": "DF"
                      },
                      "cep": {
                        "type": "string",
                        "example": "70040010"
                      }
                    }
                  },
                  "valor": {
                    "type": "string",
                    "example": "350.00"
                  },
                  "transacao_id": {
                    "type": "string",
                    "example": "mensalidade-2026-12-b"
                  },
                  "vencimento": {
                    "type": "string",
                    "example": "20/12/2026"
                  }
                }
              },
              "example": {
                "cliente": {
                  "nome": "Maria Exemplo",
                  "cpf_cnpj": "52998224725"
                },
                "endereco": {
                  "logradouro": "Rua A",
                  "numero": "10",
                  "bairro": "Centro",
                  "cidade": "Brasilia",
                  "uf": "DF",
                  "cep": "70040010"
                },
                "valor": "350.00",
                "transacao_id": "mensalidade-2026-12-b",
                "vencimento": "20/12/2026"
              }
            }
          }
        }
      }
    },
    "/card/tokenizar": {
      "post": {
        "operationId": "cartao-tokenizar",
        "summary": "Tokenizar cartão",
        "description": "Guarda o cartão de forma segura e devolve um `token` reutilizável. Nunca armazene o número do cartão no seu sistema.",
        "tags": [
          "Cartão"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "token": {
                      "type": "string",
                      "example": "<omitido>"
                    },
                    "brand": {
                      "type": "string",
                      "example": "visa"
                    },
                    "final": {
                      "type": "string",
                      "example": "1111"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "token": "<omitido>",
                  "brand": "visa",
                  "final": "1111"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "titular": {
                    "type": "string",
                    "example": "MARIA EXEMPLO"
                  },
                  "numero": {
                    "type": "string",
                    "example": "4111111111111111"
                  },
                  "expiracao": {
                    "type": "string",
                    "example": "12/2030"
                  }
                }
              },
              "example": {
                "titular": "MARIA EXEMPLO",
                "numero": "4111111111111111",
                "expiracao": "12/2030"
              }
            }
          }
        }
      }
    },
    "/card/transaction": {
      "post": {
        "operationId": "cartao-transacao",
        "summary": "Transação com cartão",
        "description": "Autoriza e captura na hora. Em caso de recusa, `success: false` e a mensagem da adquirente.",
        "tags": [
          "Cartão"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "0afbdabd-9542-4c1f-9404-08227658013e"
                    },
                    "tId": {
                      "type": "string",
                      "example": "3C049CAEA3F612BFAE0C"
                    },
                    "paymentId": {
                      "type": "string",
                      "example": "10713f49-78d7-4d61-ad7c-8781e5d188ee"
                    },
                    "cod_status": {
                      "type": "integer",
                      "example": 2
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "0afbdabd-9542-4c1f-9404-08227658013e",
                  "tId": "3C049CAEA3F612BFAE0C",
                  "paymentId": "10713f49-78d7-4d61-ad7c-8781e5d188ee",
                  "cod_status": 2,
                  "sandbox": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "valor": {
                    "type": "string",
                    "example": "150.00"
                  },
                  "transacao_id": {
                    "type": "string",
                    "example": "pedido-1001"
                  },
                  "tokenCard": {
                    "type": "string",
                    "example": "{{card_token}}"
                  },
                  "cvv": {
                    "type": "string",
                    "example": "123"
                  },
                  "parcelas": {
                    "type": "integer",
                    "example": 3
                  }
                }
              },
              "example": {
                "valor": "150.00",
                "transacao_id": "pedido-1001",
                "tokenCard": "{{card_token}}",
                "cvv": "123",
                "parcelas": 3
              }
            }
          }
        }
      }
    },
    "/card/transactionSplit": {
      "post": {
        "operationId": "cartao-split",
        "summary": "Transação com cartão e split",
        "description": "Igual à transação com cartão, dividindo o valor entre contas digitais do seu parceiro.",
        "tags": [
          "Cartão"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "0afbdabd-9542-4c1f-9404-08227658013e"
                    },
                    "tId": {
                      "type": "string",
                      "example": "3C049CAEA3F612BFAE0C"
                    },
                    "paymentId": {
                      "type": "string",
                      "example": "10713f49-78d7-4d61-ad7c-8781e5d188ee"
                    },
                    "cod_status": {
                      "type": "integer",
                      "example": 2
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "0afbdabd-9542-4c1f-9404-08227658013e",
                  "tId": "3C049CAEA3F612BFAE0C",
                  "paymentId": "10713f49-78d7-4d61-ad7c-8781e5d188ee",
                  "cod_status": 2,
                  "sandbox": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "valor": {
                    "type": "string",
                    "example": "350.00"
                  },
                  "transacao_id": {
                    "type": "string",
                    "example": "pedido-1002"
                  },
                  "tokenCard": {
                    "type": "string",
                    "example": "{{card_token}}"
                  },
                  "cvv": {
                    "type": "string",
                    "example": "123"
                  },
                  "parcelas": {
                    "type": "integer",
                    "example": 1
                  },
                  "split": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "example": "{{account_partner}}"
                        },
                        "valor": {
                          "type": "integer",
                          "example": 70
                        },
                        "cobrar_taxa": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "valor": "350.00",
                "transacao_id": "pedido-1002",
                "tokenCard": "{{card_token}}",
                "cvv": "123",
                "parcelas": 1,
                "split": [
                  {
                    "uuid": "{{account_partner}}",
                    "valor": 70,
                    "cobrar_taxa": true
                  },
                  {
                    "uuid": "{{account_professor}}",
                    "valor": 280,
                    "cobrar_taxa": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/card/bin/{bin}": {
      "get": {
        "operationId": "cartao-bin",
        "summary": "Consultar BIN",
        "description": "Bandeira, tipo e emissor pelos 6 primeiros dígitos.",
        "tags": [
          "Cartão"
        ],
        "x-disponibilidade": "todos",
        "parameters": [
          {
            "name": "bin",
            "in": "path",
            "required": true,
            "description": "6 primeiros dígitos",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "Status": {
                          "type": "string",
                          "example": "00"
                        },
                        "Provider": {
                          "type": "string",
                          "example": "visa"
                        },
                        "CardType": {
                          "type": "string",
                          "example": "CREDITO"
                        },
                        "ForeignCard": {
                          "type": "boolean",
                          "example": false
                        },
                        "Prepaid": {
                          "type": "boolean",
                          "example": false
                        },
                        "CorporateCard": {
                          "type": "boolean",
                          "example": false
                        },
                        "Issuer": {
                          "type": "string",
                          "example": "BANCO SANDBOX"
                        },
                        "IssuerCode": {
                          "type": "string",
                          "example": "001"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "Status": "00",
                    "Provider": "visa",
                    "CardType": "CREDITO",
                    "ForeignCard": false,
                    "Prepaid": false,
                    "CorporateCard": false,
                    "Issuer": "BANCO SANDBOX",
                    "IssuerCode": "001"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/card/validate": {
      "post": {
        "operationId": "cartao-validar",
        "summary": "Validar cartão",
        "description": "Valida número (Luhn), bandeira e validade sem cobrar.",
        "tags": [
          "Cartão"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "isValid": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "isValid": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "titular": {
                    "type": "string",
                    "example": "MARIA EXEMPLO"
                  },
                  "numero": {
                    "type": "string",
                    "example": "4111111111111111"
                  },
                  "expiracao": {
                    "type": "string",
                    "example": "12/2030"
                  }
                }
              },
              "example": {
                "titular": "MARIA EXEMPLO",
                "numero": "4111111111111111",
                "expiracao": "12/2030"
              }
            }
          }
        }
      }
    },
    "/link/transaction": {
      "post": {
        "operationId": "link-criar",
        "summary": "Criar link de pagamento",
        "description": "Link em que o pagador escolhe PIX, cartão ou boleto. No webhook, `forma_pagamento` informa como foi pago.\n\n- No sandbox a resposta traz `sandbox_url`, uma página para simular o pagamento por PIX, cartão ou boleto.",
        "tags": [
          "Link de pagamento"
        ],
        "x-disponibilidade": "todos",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "4422c689-1516-4734-9d8e-be757affe468"
                    },
                    "sandbox_url": {
                      "type": "string",
                      "example": "https://sandbox.cashpago.com.br/sandbox/link/4422c689-1516-4734-9d8e-be757affe468"
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "4422c689-1516-4734-9d8e-be757affe468",
                  "sandbox_url": "https://sandbox.cashpago.com.br/sandbox/link/4422c689-1516-4734-9d8e-be757affe468",
                  "sandbox": true
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cliente": {
                    "type": "object",
                    "properties": {
                      "nome": {
                        "type": "string",
                        "example": "Maria Exemplo"
                      },
                      "cpf_cnpj": {
                        "type": "string",
                        "example": "52998224725"
                      }
                    }
                  },
                  "valor": {
                    "type": "string",
                    "example": "350.00"
                  },
                  "transacao_id": {
                    "type": "string",
                    "example": "mensalidade-2026-12-l"
                  },
                  "vencimento": {
                    "type": "string",
                    "example": "20/12/2026"
                  }
                }
              },
              "example": {
                "cliente": {
                  "nome": "Maria Exemplo",
                  "cpf_cnpj": "52998224725"
                },
                "valor": "350.00",
                "transacao_id": "mensalidade-2026-12-l",
                "vencimento": "20/12/2026"
              }
            }
          }
        }
      }
    },
    "/sandbox/webhook-inspector": {
      "post": {
        "operationId": "sim-inspetor",
        "summary": "Criar inspetor de webhooks",
        "description": "Gera uma URL pública de recebimento. Cadastre-a como webhook e veja cada aviso recebido, com a assinatura já validada — útil antes de ter o seu endpoint pronto.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "inspector_id": {
                          "type": "string",
                          "example": "<inspector_id>"
                        },
                        "url": {
                          "type": "string",
                          "example": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>"
                        },
                        "ver": {
                          "type": "string",
                          "example": "https://sandbox.cashpago.com.br/sandbox/webhook-inspector/<inspector_id>"
                        },
                        "dica": {
                          "type": "string",
                          "example": "Cadastre a url com PUT /partner/webhooks {\"urls\":{\"default\":\"<url>\"}} e consulte os avisos em GET <ver>."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "inspector_id": "<inspector_id>",
                    "url": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>",
                    "ver": "https://sandbox.cashpago.com.br/sandbox/webhook-inspector/<inspector_id>",
                    "dica": "Cadastre a url com PUT /partner/webhooks {\"urls\":{\"default\":\"<url>\"}} e consulte os avisos em GET <ver>."
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/sandbox/webhook-inspector/{inspector_id}": {
      "get": {
        "operationId": "sim-inspetor-ver",
        "summary": "Ver avisos recebidos",
        "description": "Últimos 50 avisos recebidos pelo inspetor.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [
          {
            "name": "inspector_id",
            "in": "path",
            "required": true,
            "description": "id do inspetor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "recebido_em": {
                            "type": "string",
                            "example": "2026-11-30T18:14:07-03:00"
                          },
                          "assinatura_valida": {
                            "type": "boolean",
                            "example": true
                          },
                          "verificacao": {
                            "type": "string",
                            "example": "assinatura valida"
                          },
                          "headers": {
                            "type": "object",
                            "properties": {
                              "X-CashPago-Event": {
                                "type": "string",
                                "example": "webhook.test"
                              },
                              "X-CashPago-Event-Id": {
                                "type": "string",
                                "example": "evt_b2144c012f8f2ae04c82d7ee"
                              },
                              "X-CashPago-Delivery-Id": {
                                "type": "string",
                                "example": "dlv_1ec4e03c5a72e168c6f33786"
                              },
                              "X-CashPago-Attempt": {
                                "type": "string",
                                "example": "1"
                              },
                              "X-CashPago-Timestamp": {
                                "type": "string",
                                "example": "1796073247"
                              },
                              "X-CashPago-Signature": {
                                "type": "string",
                                "example": "t=1796073247,v1=48df7124a4dbc6da79a55facf93c0587bf4943eaef2b82d2c7de5435669a4c24,v1=e70e7094fac779684958ff06f4feb03cfac78683db141a446d2a6a871b566666"
                              },
                              "User-Agent": {
                                "type": "string",
                                "example": "CashPago-Webhooks/2.0"
                              },
                              "Content-Type": {
                                "type": "string",
                                "example": "application/json"
                              },
                              "Authorization": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            }
                          },
                          "corpo": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "evt_b2144c012f8f2ae04c82d7ee"
                              },
                              "type": {
                                "type": "string",
                                "example": "webhook.test"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2026-11-30T18:14:07-03:00"
                              },
                              "api_version": {
                                "type": "string",
                                "example": "2026-12-01"
                              },
                              "livemode": {
                                "type": "boolean",
                                "example": false
                              },
                              "data": {
                                "type": "object",
                                "properties": {
                                  "object": {
                                    "type": "string",
                                    "example": "test"
                                  },
                                  "canal": {
                                    "type": "string",
                                    "example": "default"
                                  },
                                  "mensagem": {
                                    "type": "string",
                                    "example": "Evento de teste da CashPago. Responda 2xx."
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "recebido_em": "2026-11-30T18:14:07-03:00",
                      "assinatura_valida": true,
                      "verificacao": "assinatura valida",
                      "headers": {
                        "X-CashPago-Event": "webhook.test",
                        "X-CashPago-Event-Id": "evt_b2144c012f8f2ae04c82d7ee",
                        "X-CashPago-Delivery-Id": "dlv_1ec4e03c5a72e168c6f33786",
                        "X-CashPago-Attempt": "1",
                        "X-CashPago-Timestamp": "1796073247",
                        "X-CashPago-Signature": "t=1796073247,v1=48df7124a4dbc6da79a55facf93c0587bf4943eaef2b82d2c7de5435669a4c24,v1=e70e7094fac779684958ff06f4feb03cfac78683db141a446d2a6a871b566666",
                        "User-Agent": "CashPago-Webhooks/2.0",
                        "Content-Type": "application/json",
                        "Authorization": null
                      },
                      "corpo": {
                        "id": "evt_b2144c012f8f2ae04c82d7ee",
                        "type": "webhook.test",
                        "created_at": "2026-11-30T18:14:07-03:00",
                        "api_version": "2026-12-01",
                        "livemode": false,
                        "data": {
                          "object": "test",
                          "canal": "default",
                          "mensagem": "Evento de teste da CashPago. Responda 2xx."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/partner/webhooks": {
      "get": {
        "operationId": "wh-get",
        "summary": "Consultar configuração de webhooks",
        "description": "URLs por canal, segredo de assinatura (mascarado), eventos e canais disponíveis.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string",
                          "example": "2026-12-01"
                        },
                        "urls": {
                          "type": "object",
                          "properties": {
                            "default": {
                              "type": "string",
                              "example": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>"
                            },
                            "pix": {
                              "type": "string",
                              "example": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>"
                            },
                            "boleto": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "link": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "cartao": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "assinatura": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "segredo": {
                          "type": "string",
                          "example": "whsec_…a1B2"
                        },
                        "assinatura": {
                          "type": "string",
                          "example": "X-CashPago-Signature: t=<unix>,v1=<hex HMAC-SHA256(segredo, \"<t>.<corpo cru>\")>"
                        },
                        "canais": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "default"
                          }
                        },
                        "eventos": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "charge.paid"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "api_version": "2026-12-01",
                    "urls": {
                      "default": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>",
                      "pix": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>",
                      "boleto": null,
                      "link": null,
                      "cartao": null,
                      "assinatura": null
                    },
                    "segredo": "whsec_…a1B2",
                    "assinatura": "X-CashPago-Signature: t=<unix>,v1=<hex HMAC-SHA256(segredo, \"<t>.<corpo cru>\")>",
                    "canais": [
                      "default",
                      "pix",
                      "boleto",
                      "link",
                      "cartao",
                      "assinatura"
                    ],
                    "eventos": [
                      "charge.paid",
                      "charge.expired",
                      "charge.canceled",
                      "charge.refunded",
                      "charge.failed",
                      "subscription.created",
                      "subscription.updated",
                      "subscription.canceled",
                      "invoice.created",
                      "invoice.paid",
                      "invoice.payment_failed",
                      "webhook.test"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "operationId": "wh-put",
        "summary": "Cadastrar ou alterar URLs de webhook",
        "description": "Atualização parcial por canal: `default`, `pix`, `boleto`, `link`, `cartao`, `assinatura`. `null` remove o canal; sem URL própria, o canal usa a `default`. Na primeira configuração a resposta traz `segredo_completo` **uma única vez**.\n\n- Regras da URL: `https`, domínio (não IP) com IP público, sem usuário/senha nem `#`, até 255 caracteres.\n\n- Erros: 400 URL inválida (detalhe por canal), 401 sem token.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string",
                          "example": "2026-12-01"
                        },
                        "urls": {
                          "type": "object",
                          "properties": {
                            "default": {
                              "type": "string",
                              "example": "https://seu-sistema.com.br/webhooks/cashpago"
                            },
                            "pix": {
                              "type": "string",
                              "example": "https://seu-sistema.com.br/webhooks/cashpago/pix"
                            },
                            "boleto": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "link": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "cartao": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "assinatura": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        },
                        "segredo": {
                          "type": "string",
                          "example": "whsec_…a1B2"
                        },
                        "segredo_completo": {
                          "type": "string",
                          "example": "whsec_<exibido uma vez>"
                        }
                      }
                    },
                    "aviso": {
                      "type": "string",
                      "example": "Guarde o segredo agora: ele nao sera exibido de novo."
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "api_version": "2026-12-01",
                    "urls": {
                      "default": "https://seu-sistema.com.br/webhooks/cashpago",
                      "pix": "https://seu-sistema.com.br/webhooks/cashpago/pix",
                      "boleto": null,
                      "link": null,
                      "cartao": null,
                      "assinatura": null
                    },
                    "segredo": "whsec_…a1B2",
                    "segredo_completo": "whsec_<exibido uma vez>"
                  },
                  "aviso": "Guarde o segredo agora: ele nao sera exibido de novo."
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "urls": {
                    "type": "object",
                    "properties": {
                      "default": {
                        "type": "string",
                        "example": "https://seu-sistema.com.br/webhooks/cashpago"
                      },
                      "pix": {
                        "type": "string",
                        "example": "https://seu-sistema.com.br/webhooks/cashpago/pix"
                      },
                      "boleto": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              },
              "example": {
                "urls": {
                  "default": "https://seu-sistema.com.br/webhooks/cashpago",
                  "pix": "https://seu-sistema.com.br/webhooks/cashpago/pix",
                  "boleto": null
                }
              }
            }
          }
        }
      }
    },
    "/partner/webhooks/secret": {
      "post": {
        "operationId": "wh-secret",
        "summary": "Gerar novo segredo de assinatura",
        "description": "Rotaciona o segredo. Por 24 h os avisos saem com duas assinaturas `v1` (nova e anterior) para você trocar sem perder eventos.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "segredo_completo": {
                          "type": "string",
                          "example": "whsec_<exibido uma vez>"
                        },
                        "segredo_anterior_valido_ate": {
                          "type": "string",
                          "example": "2026-12-01T18:00:00-03:00"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "segredo_completo": "whsec_<exibido uma vez>",
                    "segredo_anterior_valido_ate": "2026-12-01T18:00:00-03:00"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/partner/webhooks/test": {
      "post": {
        "operationId": "wh-test",
        "summary": "Enviar evento de teste",
        "description": "Envia `webhook.test` assinado para a URL do canal (ou a default). Limite de 10 por minuto.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "enviado": {
                          "type": "boolean",
                          "example": true
                        },
                        "entrega_id": {
                          "type": "string",
                          "example": "dlv_1ec4e03c5a72e168c6f33786"
                        },
                        "status": {
                          "type": "string",
                          "example": "entregue"
                        },
                        "tentativa": {
                          "type": "integer",
                          "example": 1
                        },
                        "http_status": {
                          "type": "integer",
                          "example": 200
                        },
                        "duracao_ms": {
                          "type": "integer",
                          "example": 40
                        },
                        "evento_id": {
                          "type": "string",
                          "example": "evt_b2144c012f8f2ae04c82d7ee"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "enviado": true,
                    "entrega_id": "dlv_1ec4e03c5a72e168c6f33786",
                    "status": "entregue",
                    "tentativa": 1,
                    "http_status": 200,
                    "duracao_ms": 40,
                    "evento_id": "evt_b2144c012f8f2ae04c82d7ee"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "canal": {
                    "type": "string",
                    "example": "pix"
                  }
                }
              },
              "example": {
                "canal": "pix"
              }
            }
          }
        }
      }
    },
    "/partner/webhooks/deliveries": {
      "get": {
        "operationId": "wh-entregas",
        "summary": "Histórico de entregas",
        "description": "Últimas entregas com status (`entregue`, `pendente`, `falhou`), código HTTP do seu servidor, tentativas e próxima tentativa.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "pendente | entregue | falhou",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "description": "filtra por evento",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1 a 100 (padrão 50)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "dlv_a498a09ec4163804165f54c4"
                          },
                          "evento_id": {
                            "type": "string",
                            "example": "evt_b48b411005eb05d00f74db54"
                          },
                          "evento": {
                            "type": "string",
                            "example": "charge.expired"
                          },
                          "canal": {
                            "type": "string",
                            "example": "boleto"
                          },
                          "recurso": {
                            "type": "string",
                            "example": "71e73430-f6d4-43f6-9a79-5b5e17b62566"
                          },
                          "url": {
                            "type": "string",
                            "example": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>"
                          },
                          "status": {
                            "type": "string",
                            "example": "entregue"
                          },
                          "tentativas": {
                            "type": "integer",
                            "example": 1
                          },
                          "http_status": {
                            "type": "integer",
                            "example": 200
                          },
                          "erro": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "duracao_ms": {
                            "type": "integer",
                            "example": 41
                          },
                          "proxima_tentativa": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created": {
                            "type": "string",
                            "example": "2026-11-30 18:14:07"
                          },
                          "updated": {
                            "type": "string",
                            "example": "2026-11-30 18:14:07"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": "dlv_a498a09ec4163804165f54c4",
                      "evento_id": "evt_b48b411005eb05d00f74db54",
                      "evento": "charge.expired",
                      "canal": "boleto",
                      "recurso": "71e73430-f6d4-43f6-9a79-5b5e17b62566",
                      "url": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>",
                      "status": "entregue",
                      "tentativas": 1,
                      "http_status": 200,
                      "erro": null,
                      "duracao_ms": 41,
                      "proxima_tentativa": null,
                      "created": "2026-11-30 18:14:07",
                      "updated": "2026-11-30 18:14:07"
                    },
                    {
                      "id": "dlv_a07e51170813c406824aeecc",
                      "evento_id": "evt_2feb23a3ba1d8f918fdafd50",
                      "evento": "charge.paid",
                      "canal": "pix",
                      "recurso": "91815cc2-de78-4b73-b1be-1570995d7d2b",
                      "url": "https://sandbox.cashpago.com.br/sandbox/inbox/<inspector_id>",
                      "status": "entregue",
                      "tentativas": 1,
                      "http_status": 200,
                      "erro": null,
                      "duracao_ms": 42,
                      "proxima_tentativa": null,
                      "created": "2026-11-30 18:14:07",
                      "updated": "2026-11-30 18:14:07"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/partner/webhooks/events/{event_id}": {
      "get": {
        "operationId": "wh-evento",
        "summary": "Consultar evento",
        "description": "Corpo exato do evento (o mesmo enviado em todas as tentativas).",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "description": "evt_…",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "evt_b2144c012f8f2ae04c82d7ee"
                        },
                        "type": {
                          "type": "string",
                          "example": "webhook.test"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:07-03:00"
                        },
                        "api_version": {
                          "type": "string",
                          "example": "2026-12-01"
                        },
                        "livemode": {
                          "type": "boolean",
                          "example": false
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "object": {
                              "type": "string",
                              "example": "test"
                            },
                            "canal": {
                              "type": "string",
                              "example": "default"
                            },
                            "mensagem": {
                              "type": "string",
                              "example": "Evento de teste da CashPago. Responda 2xx."
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": "evt_b2144c012f8f2ae04c82d7ee",
                    "type": "webhook.test",
                    "created_at": "2026-11-30T18:14:07-03:00",
                    "api_version": "2026-12-01",
                    "livemode": false,
                    "data": {
                      "object": "test",
                      "canal": "default",
                      "mensagem": "Evento de teste da CashPago. Responda 2xx."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/partner/webhooks/deliveries/{delivery_id}/resend": {
      "post": {
        "operationId": "wh-reenviar",
        "summary": "Reenviar evento",
        "description": "Reenvia o mesmo evento (mesmo `id`) para a URL atual do canal.",
        "tags": [
          "Webhooks"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "description": "dlv_…",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "enviado": {
                          "type": "boolean",
                          "example": true
                        },
                        "entrega_id": {
                          "type": "string",
                          "example": "dlv_…"
                        },
                        "status": {
                          "type": "string",
                          "example": "entregue"
                        },
                        "tentativa": {
                          "type": "integer",
                          "example": 1
                        },
                        "http_status": {
                          "type": "integer",
                          "example": 200
                        },
                        "duracao_ms": {
                          "type": "integer",
                          "example": 45
                        },
                        "evento_id": {
                          "type": "string",
                          "example": "evt_…"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "enviado": true,
                    "entrega_id": "dlv_…",
                    "status": "entregue",
                    "tentativa": 1,
                    "http_status": 200,
                    "duracao_ms": 45,
                    "evento_id": "evt_…"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/sandbox/simulate/payment": {
      "post": {
        "operationId": "sim-pagar",
        "summary": "Simular pagamento",
        "description": "Marca PIX, boleto ou link como pago e dispara `charge.paid`. Identifique por `uuid`, `txid`, `numero` ou `linhaDigitavel`. No link, informe `forma_pagamento` (`pix`, `cartao`, `boleto`) e, para cartão, `parcelas`.",
        "tags": [
          "Simuladores do sandbox"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "4422c689-1516-4734-9d8e-be757affe468"
                    },
                    "status": {
                      "type": "string",
                      "example": "PAGO"
                    },
                    "pago_em": {
                      "type": "string",
                      "example": "2026-11-30T18:14:06-03:00"
                    },
                    "forma_pagamento": {
                      "type": "string",
                      "example": "cartao"
                    },
                    "webhook": {
                      "type": "object",
                      "properties": {
                        "enviado": {
                          "type": "boolean",
                          "example": true
                        },
                        "entrega_id": {
                          "type": "string",
                          "example": "dlv_20c749a91dad13b35bb836af"
                        },
                        "status": {
                          "type": "string",
                          "example": "entregue"
                        },
                        "tentativa": {
                          "type": "integer",
                          "example": 1
                        },
                        "http_status": {
                          "type": "integer",
                          "example": 200
                        },
                        "duracao_ms": {
                          "type": "integer",
                          "example": 42
                        },
                        "evento_id": {
                          "type": "string",
                          "example": "evt_34e90531093e1d1944074ca7"
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "4422c689-1516-4734-9d8e-be757affe468",
                  "status": "PAGO",
                  "pago_em": "2026-11-30T18:14:06-03:00",
                  "forma_pagamento": "cartao",
                  "webhook": {
                    "enviado": true,
                    "entrega_id": "dlv_20c749a91dad13b35bb836af",
                    "status": "entregue",
                    "tentativa": 1,
                    "http_status": 200,
                    "duracao_ms": 42,
                    "evento_id": "evt_34e90531093e1d1944074ca7"
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "example": "{{link_uuid}}"
                  },
                  "forma_pagamento": {
                    "type": "string",
                    "example": "cartao"
                  },
                  "parcelas": {
                    "type": "integer",
                    "example": 3
                  }
                }
              },
              "example": {
                "uuid": "{{link_uuid}}",
                "forma_pagamento": "cartao",
                "parcelas": 3
              }
            }
          }
        }
      }
    },
    "/sandbox/simulate/expire": {
      "post": {
        "operationId": "sim-vencer",
        "summary": "Simular vencimento",
        "description": "Vence uma cobrança pendente e dispara `charge.expired`. PIX vencido não pode mais ser pago; boleto vencido ainda pode.",
        "tags": [
          "Simuladores do sandbox"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "71e73430-f6d4-43f6-9a79-5b5e17b62566"
                    },
                    "status": {
                      "type": "string",
                      "example": "VENCIDO"
                    },
                    "webhook": {
                      "type": "object",
                      "properties": {
                        "enviado": {
                          "type": "boolean",
                          "example": true
                        },
                        "entrega_id": {
                          "type": "string",
                          "example": "dlv_a498a09ec4163804165f54c4"
                        },
                        "status": {
                          "type": "string",
                          "example": "entregue"
                        },
                        "tentativa": {
                          "type": "integer",
                          "example": 1
                        },
                        "http_status": {
                          "type": "integer",
                          "example": 200
                        },
                        "duracao_ms": {
                          "type": "integer",
                          "example": 41
                        },
                        "evento_id": {
                          "type": "string",
                          "example": "evt_b48b411005eb05d00f74db54"
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "71e73430-f6d4-43f6-9a79-5b5e17b62566",
                  "status": "VENCIDO",
                  "webhook": {
                    "enviado": true,
                    "entrega_id": "dlv_a498a09ec4163804165f54c4",
                    "status": "entregue",
                    "tentativa": 1,
                    "http_status": 200,
                    "duracao_ms": 41,
                    "evento_id": "evt_b48b411005eb05d00f74db54"
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "example": "{{boleto_uuid}}"
                  }
                }
              },
              "example": {
                "uuid": "{{boleto_uuid}}"
              }
            }
          }
        }
      }
    },
    "/sandbox/simulate/cancel": {
      "post": {
        "operationId": "sim-cancelar",
        "summary": "Simular cancelamento",
        "description": "Cancela uma cobrança não paga e dispara `charge.canceled`.",
        "tags": [
          "Simuladores do sandbox"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "…"
                    },
                    "status": {
                      "type": "string",
                      "example": "CANCELADO"
                    },
                    "webhook": {
                      "type": "object",
                      "properties": {
                        "enviado": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "…",
                  "status": "CANCELADO",
                  "webhook": {
                    "enviado": true
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "example": "{{pix_uuid}}"
                  }
                }
              },
              "example": {
                "uuid": "{{pix_uuid}}"
              }
            }
          }
        }
      }
    },
    "/sandbox/simulate/refund": {
      "post": {
        "operationId": "sim-estornar",
        "summary": "Simular estorno",
        "description": "Estorna total ou parcialmente (`valor`) uma cobrança paga e dispara `charge.refunded`.",
        "tags": [
          "Simuladores do sandbox"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "uuid": {
                      "type": "string",
                      "example": "…"
                    },
                    "status": {
                      "type": "string",
                      "example": "ESTORNADO"
                    },
                    "valor_estornado": {
                      "type": "string",
                      "example": "50.00"
                    },
                    "webhook": {
                      "type": "object",
                      "properties": {
                        "enviado": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "uuid": "…",
                  "status": "ESTORNADO",
                  "valor_estornado": "50.00",
                  "webhook": {
                    "enviado": true
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid": {
                    "type": "string",
                    "example": "{{link_uuid}}"
                  },
                  "valor": {
                    "type": "integer",
                    "example": 50
                  }
                }
              },
              "example": {
                "uuid": "{{link_uuid}}",
                "valor": 50
              }
            }
          }
        }
      }
    },
    "/sandbox/transactions/{id}": {
      "get": {
        "operationId": "sim-consultar",
        "summary": "Consultar transação simulada",
        "description": "Estado de qualquer cobrança do sandbox por uuid, txid, número, linha digitável ou tId.",
        "tags": [
          "Simuladores do sandbox"
        ],
        "x-disponibilidade": "sandbox",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "uuid, txid, numero…",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "tipo": {
                          "type": "string",
                          "example": "link"
                        },
                        "uuid": {
                          "type": "string",
                          "example": "…"
                        },
                        "status": {
                          "type": "string",
                          "example": "PAGO"
                        },
                        "valor": {
                          "type": "string",
                          "example": "350.00"
                        },
                        "cod_forma_pagamento": {
                          "type": "integer",
                          "example": 2
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "tipo": "link",
                    "uuid": "…",
                    "status": "PAGO",
                    "valor": "350.00",
                    "cod_forma_pagamento": 2
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/plan/create": {
      "post": {
        "operationId": "plano-criar",
        "summary": "Criar plano",
        "description": "`interval`: day, week, month ou year; `interval_count` multiplica o intervalo (mensal = month + 1).",
        "tags": [
          "Planos (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plan_id": {
                          "type": "string",
                          "example": "44832fb9-2df3-40b0-9c59-178aa69ccbee"
                        },
                        "ref": {
                          "type": "string",
                          "example": "plano-exemplo-cbed"
                        },
                        "name": {
                          "type": "string",
                          "example": "Mensalidade"
                        },
                        "description": {
                          "type": "string",
                          "example": "Plano mensal"
                        },
                        "interval": {
                          "type": "string",
                          "example": "month"
                        },
                        "interval_count": {
                          "type": "integer",
                          "example": 1
                        },
                        "trial_period_days": {
                          "type": "integer",
                          "example": 0
                        },
                        "payment_methods": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "credit_card"
                          }
                        },
                        "price": {
                          "type": "number",
                          "example": 350.0
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:10-03:00"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:10-03:00"
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "plan_id": "44832fb9-2df3-40b0-9c59-178aa69ccbee",
                    "ref": "plano-exemplo-cbed",
                    "name": "Mensalidade",
                    "description": "Plano mensal",
                    "interval": "month",
                    "interval_count": 1,
                    "trial_period_days": 0,
                    "payment_methods": [
                      "credit_card",
                      "pix",
                      "boleto"
                    ],
                    "price": 350.0,
                    "status": "active",
                    "created_at": "2026-11-30T18:14:10-03:00",
                    "updated_at": "2026-11-30T18:14:10-03:00"
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "string",
                    "example": "mensalidade-{{$timestamp}}"
                  },
                  "name": {
                    "type": "string",
                    "example": "Mensalidade"
                  },
                  "description": {
                    "type": "string",
                    "example": "Plano mensal"
                  },
                  "interval": {
                    "type": "string",
                    "example": "month"
                  },
                  "interval_count": {
                    "type": "integer",
                    "example": 1
                  },
                  "trial_period_days": {
                    "type": "integer",
                    "example": 0
                  },
                  "payment_methods": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "example": "credit_card"
                    }
                  },
                  "price": {
                    "type": "number",
                    "example": 350.0
                  }
                }
              },
              "example": {
                "ref": "mensalidade-{{$timestamp}}",
                "name": "Mensalidade",
                "description": "Plano mensal",
                "interval": "month",
                "interval_count": 1,
                "trial_period_days": 0,
                "payment_methods": [
                  "credit_card",
                  "pix",
                  "boleto"
                ],
                "price": 350.0
              }
            }
          }
        }
      }
    },
    "/plan/edit": {
      "post": {
        "operationId": "plano-editar",
        "summary": "Alterar plano",
        "description": "Atualização parcial. Assinaturas existentes usam o novo valor a partir do próximo ciclo.",
        "tags": [
          "Planos (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plan_id": {
                          "type": "string",
                          "example": "…"
                        },
                        "ref": {
                          "type": "string",
                          "example": "mensalidade-1796073246"
                        },
                        "name": {
                          "type": "string",
                          "example": "Mensalidade 2027"
                        },
                        "price": {
                          "type": "number",
                          "example": 350.0
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "plan_id": "…",
                    "ref": "mensalidade-1796073246",
                    "name": "Mensalidade 2027",
                    "price": 350.0
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "example": "{{plan_id}}"
                  },
                  "name": {
                    "type": "string",
                    "example": "Mensalidade 2027"
                  },
                  "description": {
                    "type": "string",
                    "example": "Plano mensal (ano letivo 2027)"
                  }
                }
              },
              "example": {
                "plan_id": "{{plan_id}}",
                "name": "Mensalidade 2027",
                "description": "Plano mensal (ano letivo 2027)"
              }
            }
          }
        }
      }
    },
    "/plan/list": {
      "get": {
        "operationId": "plano-listar",
        "summary": "Listar planos",
        "description": "Planos do parceiro.",
        "tags": [
          "Planos (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "active | inactive",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "plan_id": {
                            "type": "string",
                            "example": "44832fb9-2df3-40b0-9c59-178aa69ccbee"
                          },
                          "ref": {
                            "type": "string",
                            "example": "plano-exemplo-cbed"
                          },
                          "name": {
                            "type": "string",
                            "example": "Mensalidade"
                          },
                          "description": {
                            "type": "string",
                            "example": "Plano mensal"
                          },
                          "interval": {
                            "type": "string",
                            "example": "month"
                          },
                          "interval_count": {
                            "type": "integer",
                            "example": 1
                          },
                          "trial_period_days": {
                            "type": "integer",
                            "example": 0
                          },
                          "payment_methods": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "credit_card"
                            }
                          },
                          "price": {
                            "type": "number",
                            "example": 350.0
                          },
                          "status": {
                            "type": "string",
                            "example": "active"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-11-30T18:14:10-03:00"
                          },
                          "updated_at": {
                            "type": "string",
                            "example": "2026-11-30T18:14:10-03:00"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "plan_id": "44832fb9-2df3-40b0-9c59-178aa69ccbee",
                      "ref": "plano-exemplo-cbed",
                      "name": "Mensalidade",
                      "description": "Plano mensal",
                      "interval": "month",
                      "interval_count": 1,
                      "trial_period_days": 0,
                      "payment_methods": [
                        "credit_card",
                        "pix",
                        "boleto"
                      ],
                      "price": 350.0,
                      "status": "active",
                      "created_at": "2026-11-30T18:14:10-03:00",
                      "updated_at": "2026-11-30T18:14:10-03:00"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/plan/details/{plan_id}": {
      "get": {
        "operationId": "plano-detalhar",
        "summary": "Consultar plano",
        "description": "Detalhe do plano.",
        "tags": [
          "Planos (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [
          {
            "name": "plan_id",
            "in": "path",
            "required": true,
            "description": "uuid ou ref",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plan_id": {
                          "type": "string",
                          "example": "44832fb9-2df3-40b0-9c59-178aa69ccbee"
                        },
                        "ref": {
                          "type": "string",
                          "example": "plano-exemplo-cbed"
                        },
                        "name": {
                          "type": "string",
                          "example": "Mensalidade"
                        },
                        "description": {
                          "type": "string",
                          "example": "Plano mensal"
                        },
                        "interval": {
                          "type": "string",
                          "example": "month"
                        },
                        "interval_count": {
                          "type": "integer",
                          "example": 1
                        },
                        "trial_period_days": {
                          "type": "integer",
                          "example": 0
                        },
                        "payment_methods": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "credit_card"
                          }
                        },
                        "price": {
                          "type": "number",
                          "example": 350.0
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:10-03:00"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:10-03:00"
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "plan_id": "44832fb9-2df3-40b0-9c59-178aa69ccbee",
                    "ref": "plano-exemplo-cbed",
                    "name": "Mensalidade",
                    "description": "Plano mensal",
                    "interval": "month",
                    "interval_count": 1,
                    "trial_period_days": 0,
                    "payment_methods": [
                      "credit_card",
                      "pix",
                      "boleto"
                    ],
                    "price": 350.0,
                    "status": "active",
                    "created_at": "2026-11-30T18:14:10-03:00",
                    "updated_at": "2026-11-30T18:14:10-03:00"
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/subscription/create": {
      "post": {
        "operationId": "ass-criar",
        "summary": "Criar assinatura",
        "description": "Assina um plano. Sem período de teste, o 1º ciclo é cobrado na hora: cartão aprova/recusa; PIX/boleto gera fatura em aberto (`invoices[0]`). Boleto exige `customer.address`.",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "example": "subscription"
                        },
                        "subscription_id": {
                          "type": "string",
                          "example": "68c536c3-0758-4b38-be2d-1a63bea7de9c"
                        },
                        "ref": {
                          "type": "string",
                          "example": "aluno-cbed"
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "plan_id": {
                          "type": "string",
                          "example": "44832fb9-2df3-40b0-9c59-178aa69ccbee"
                        },
                        "plan_ref": {
                          "type": "string",
                          "example": "plano-exemplo-cbed"
                        },
                        "price": {
                          "type": "number",
                          "example": 350.0
                        },
                        "interval": {
                          "type": "string",
                          "example": "month"
                        },
                        "interval_count": {
                          "type": "integer",
                          "example": 1
                        },
                        "trial_period_days": {
                          "type": "integer",
                          "example": 0
                        },
                        "payment_method": {
                          "type": "string",
                          "example": "pix"
                        },
                        "card": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customer": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "Joao Responsavel"
                            },
                            "document": {
                              "type": "string",
                              "example": "52998224725"
                            },
                            "email": {
                              "type": "string",
                              "example": "joao@exemplo.com"
                            },
                            "phone": {
                              "type": "string",
                              "example": "61999990000"
                            }
                          }
                        },
                        "split": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "start_payment": {
                          "type": "string",
                          "example": "2026-11-30"
                        },
                        "next_payment": {
                          "type": "string",
                          "example": "2026-12-30"
                        },
                        "cycle": {
                          "type": "integer",
                          "example": 1
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:10-03:00"
                        },
                        "invoices": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "object": {
                                "type": "string",
                                "example": "invoice"
                              },
                              "invoice_id": {
                                "type": "string",
                                "example": "0e041999-186b-4166-9895-0386a2e8973b"
                              },
                              "subscription_id": {
                                "type": "string",
                                "example": "68c536c3-0758-4b38-be2d-1a63bea7de9c"
                              },
                              "cycle": {
                                "type": "integer",
                                "example": 1
                              },
                              "amount": {
                                "type": "number",
                                "example": 350.0
                              },
                              "due_date": {
                                "type": "string",
                                "example": "2026-11-30"
                              },
                              "payment_method": {
                                "type": "string",
                                "example": "pix"
                              },
                              "status": {
                                "type": "string",
                                "example": "open"
                              },
                              "charge_uuid": {
                                "type": "string",
                                "example": "f70d7ad4-81af-4483-8d97-2522809399cf"
                              },
                              "pix": {
                                "type": "object",
                                "properties": {
                                  "txid": {
                                    "type": "string",
                                    "example": "cd4e88363a5427e776ce9660c542ccb8"
                                  },
                                  "copia_e_cola": {
                                    "type": "string",
                                    "example": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/cd4e88363a5427e776ce9660c542ccb85204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***630478E4"
                                  }
                                }
                              },
                              "boleto": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "failure": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "paid_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2026-11-30T18:14:10-03:00"
                              }
                            }
                          }
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "object": "subscription",
                    "subscription_id": "68c536c3-0758-4b38-be2d-1a63bea7de9c",
                    "ref": "aluno-cbed",
                    "status": "active",
                    "plan_id": "44832fb9-2df3-40b0-9c59-178aa69ccbee",
                    "plan_ref": "plano-exemplo-cbed",
                    "price": 350.0,
                    "interval": "month",
                    "interval_count": 1,
                    "trial_period_days": 0,
                    "payment_method": "pix",
                    "card": null,
                    "customer": {
                      "name": "Joao Responsavel",
                      "document": "52998224725",
                      "email": "joao@exemplo.com",
                      "phone": "61999990000"
                    },
                    "split": null,
                    "start_payment": "2026-11-30",
                    "next_payment": "2026-12-30",
                    "cycle": 1,
                    "canceled_at": null,
                    "created_at": "2026-11-30T18:14:10-03:00",
                    "invoices": [
                      {
                        "object": "invoice",
                        "invoice_id": "0e041999-186b-4166-9895-0386a2e8973b",
                        "subscription_id": "68c536c3-0758-4b38-be2d-1a63bea7de9c",
                        "cycle": 1,
                        "amount": 350.0,
                        "due_date": "2026-11-30",
                        "payment_method": "pix",
                        "status": "open",
                        "charge_uuid": "f70d7ad4-81af-4483-8d97-2522809399cf",
                        "pix": {
                          "txid": "cd4e88363a5427e776ce9660c542ccb8",
                          "copia_e_cola": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/cd4e88363a5427e776ce9660c542ccb85204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***630478E4"
                        },
                        "boleto": null,
                        "failure": null,
                        "paid_at": null,
                        "created_at": "2026-11-30T18:14:10-03:00"
                      }
                    ]
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "string",
                    "example": "aluno-{{$timestamp}}"
                  },
                  "plan_id": {
                    "type": "string",
                    "example": "{{plan_id}}"
                  },
                  "customer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "example": "Joao Responsavel"
                      },
                      "document": {
                        "type": "string",
                        "example": "52998224725"
                      },
                      "email": {
                        "type": "string",
                        "example": "joao@exemplo.com"
                      },
                      "phone": {
                        "type": "string",
                        "example": "61999990000"
                      }
                    }
                  },
                  "payment_method": {
                    "type": "string",
                    "example": "credit_card"
                  },
                  "card": {
                    "type": "object",
                    "properties": {
                      "token": {
                        "type": "string",
                        "example": "{{card_token}}"
                      },
                      "cvv": {
                        "type": "string",
                        "example": "123"
                      }
                    }
                  },
                  "split": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "account_uuid": {
                          "type": "string",
                          "example": "{{account_partner}}"
                        },
                        "value": {
                          "type": "integer",
                          "example": 70
                        },
                        "pay_fee": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "ref": "aluno-{{$timestamp}}",
                "plan_id": "{{plan_id}}",
                "customer": {
                  "name": "Joao Responsavel",
                  "document": "52998224725",
                  "email": "joao@exemplo.com",
                  "phone": "61999990000"
                },
                "payment_method": "credit_card",
                "card": {
                  "token": "{{card_token}}",
                  "cvv": "123"
                },
                "split": [
                  {
                    "account_uuid": "{{account_partner}}",
                    "value": 70,
                    "pay_fee": true
                  },
                  {
                    "account_uuid": "{{account_professor}}",
                    "value": 280,
                    "pay_fee": false
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/sandbox/simulate/subscription/renew": {
      "post": {
        "operationId": "sim-renovar",
        "summary": "Antecipar ciclo de assinatura",
        "description": "Relógio de teste: cobra o próximo ciclo da assinatura agora (cartão aprova/recusa na hora; PIX/boleto gera fatura em aberto).",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "subscription": {
                          "type": "object",
                          "properties": {
                            "subscription_id": {
                              "type": "string",
                              "example": "…"
                            },
                            "status": {
                              "type": "string",
                              "example": "active"
                            },
                            "cycle": {
                              "type": "integer",
                              "example": 2
                            }
                          }
                        },
                        "invoice": {
                          "type": "object",
                          "properties": {
                            "invoice_id": {
                              "type": "string",
                              "example": "…"
                            },
                            "cycle": {
                              "type": "integer",
                              "example": 2
                            },
                            "status": {
                              "type": "string",
                              "example": "paid"
                            }
                          }
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "subscription": {
                      "subscription_id": "…",
                      "status": "active",
                      "cycle": 2
                    },
                    "invoice": {
                      "invoice_id": "…",
                      "cycle": 2,
                      "status": "paid"
                    }
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscription_id": {
                    "type": "string",
                    "example": "{{subscription_id}}"
                  }
                }
              },
              "example": {
                "subscription_id": "{{subscription_id}}"
              }
            }
          }
        }
      }
    },
    "/subscriptions/edit": {
      "post": {
        "operationId": "ass-editar",
        "summary": "Alterar assinatura",
        "description": "Troca plano, forma de pagamento, cartão, cliente ou split.",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "subscription_id": {
                          "type": "string",
                          "example": "…"
                        },
                        "payment_method": {
                          "type": "string",
                          "example": "pix"
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "subscription_id": "…",
                    "payment_method": "pix",
                    "status": "active"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscription_id": {
                    "type": "string",
                    "example": "{{subscription_id}}"
                  },
                  "payment_method": {
                    "type": "string",
                    "example": "pix"
                  }
                }
              },
              "example": {
                "subscription_id": "{{subscription_id}}",
                "payment_method": "pix"
              }
            }
          }
        }
      }
    },
    "/subscription/delete": {
      "post": {
        "operationId": "ass-cancelar",
        "summary": "Cancelar assinatura",
        "description": "Cancela a assinatura e as faturas em aberto.",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "subscription_id": {
                          "type": "string",
                          "example": "…"
                        },
                        "status": {
                          "type": "string",
                          "example": "canceled"
                        },
                        "canceled_at": {
                          "type": "string",
                          "example": "2026-12-01T10:00:00-03:00"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "subscription_id": "…",
                    "status": "canceled",
                    "canceled_at": "2026-12-01T10:00:00-03:00"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscription_id": {
                    "type": "string",
                    "example": "{{subscription_id}}"
                  }
                }
              },
              "example": {
                "subscription_id": "{{subscription_id}}"
              }
            }
          }
        }
      }
    },
    "/subscriptions/list": {
      "get": {
        "operationId": "ass-listar",
        "summary": "Listar assinaturas",
        "description": "Assinaturas do parceiro.",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "trialing | active | past_due | canceled",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "plan_id",
            "in": "query",
            "required": false,
            "description": "uuid ou ref do plano",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "object": {
                            "type": "string",
                            "example": "subscription"
                          },
                          "subscription_id": {
                            "type": "string",
                            "example": "68c536c3-0758-4b38-be2d-1a63bea7de9c"
                          },
                          "ref": {
                            "type": "string",
                            "example": "aluno-cbed"
                          },
                          "status": {
                            "type": "string",
                            "example": "active"
                          },
                          "plan_id": {
                            "type": "string",
                            "example": "44832fb9-2df3-40b0-9c59-178aa69ccbee"
                          },
                          "plan_ref": {
                            "type": "string",
                            "example": "plano-exemplo-cbed"
                          },
                          "price": {
                            "type": "number",
                            "example": 350.0
                          },
                          "interval": {
                            "type": "string",
                            "example": "month"
                          },
                          "interval_count": {
                            "type": "integer",
                            "example": 1
                          },
                          "trial_period_days": {
                            "type": "integer",
                            "example": 0
                          },
                          "payment_method": {
                            "type": "string",
                            "example": "pix"
                          },
                          "card": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "Joao Responsavel"
                              },
                              "document": {
                                "type": "string",
                                "example": "52998224725"
                              },
                              "email": {
                                "type": "string",
                                "example": "joao@exemplo.com"
                              },
                              "phone": {
                                "type": "string",
                                "example": "61999990000"
                              }
                            }
                          },
                          "split": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "start_payment": {
                            "type": "string",
                            "example": "2026-11-30"
                          },
                          "next_payment": {
                            "type": "string",
                            "example": "2026-12-30"
                          },
                          "cycle": {
                            "type": "integer",
                            "example": 1
                          },
                          "canceled_at": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2026-11-30T18:14:10-03:00"
                          },
                          "invoices": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "object": {
                                  "type": "string",
                                  "example": "invoice"
                                },
                                "invoice_id": {
                                  "type": "string",
                                  "example": "0e041999-186b-4166-9895-0386a2e8973b"
                                },
                                "subscription_id": {
                                  "type": "string",
                                  "example": "68c536c3-0758-4b38-be2d-1a63bea7de9c"
                                },
                                "cycle": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "amount": {
                                  "type": "number",
                                  "example": 350.0
                                },
                                "due_date": {
                                  "type": "string",
                                  "example": "2026-11-30"
                                },
                                "payment_method": {
                                  "type": "string",
                                  "example": "pix"
                                },
                                "status": {
                                  "type": "string",
                                  "example": "open"
                                },
                                "charge_uuid": {
                                  "type": "string",
                                  "example": "f70d7ad4-81af-4483-8d97-2522809399cf"
                                },
                                "pix": {
                                  "type": "object",
                                  "properties": {
                                    "txid": {
                                      "type": "string",
                                      "example": "cd4e88363a5427e776ce9660c542ccb8"
                                    },
                                    "copia_e_cola": {
                                      "type": "string",
                                      "example": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/cd4e88363a5427e776ce9660c542ccb85204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***630478E4"
                                    }
                                  }
                                },
                                "boleto": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "failure": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "paid_at": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "created_at": {
                                  "type": "string",
                                  "example": "2026-11-30T18:14:10-03:00"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "object": "subscription",
                      "subscription_id": "68c536c3-0758-4b38-be2d-1a63bea7de9c",
                      "ref": "aluno-cbed",
                      "status": "active",
                      "plan_id": "44832fb9-2df3-40b0-9c59-178aa69ccbee",
                      "plan_ref": "plano-exemplo-cbed",
                      "price": 350.0,
                      "interval": "month",
                      "interval_count": 1,
                      "trial_period_days": 0,
                      "payment_method": "pix",
                      "card": null,
                      "customer": {
                        "name": "Joao Responsavel",
                        "document": "52998224725",
                        "email": "joao@exemplo.com",
                        "phone": "61999990000"
                      },
                      "split": null,
                      "start_payment": "2026-11-30",
                      "next_payment": "2026-12-30",
                      "cycle": 1,
                      "canceled_at": null,
                      "created_at": "2026-11-30T18:14:10-03:00",
                      "invoices": [
                        {
                          "object": "invoice",
                          "invoice_id": "0e041999-186b-4166-9895-0386a2e8973b",
                          "subscription_id": "68c536c3-0758-4b38-be2d-1a63bea7de9c",
                          "cycle": 1,
                          "amount": 350.0,
                          "due_date": "2026-11-30",
                          "payment_method": "pix",
                          "status": "open",
                          "charge_uuid": "f70d7ad4-81af-4483-8d97-2522809399cf",
                          "pix": {
                            "txid": "cd4e88363a5427e776ce9660c542ccb8",
                            "copia_e_cola": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/cd4e88363a5427e776ce9660c542ccb85204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***630478E4"
                          },
                          "boleto": null,
                          "failure": null,
                          "paid_at": null,
                          "created_at": "2026-11-30T18:14:10-03:00"
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/subscriptions/details/{subscription_id}": {
      "get": {
        "operationId": "ass-detalhar",
        "summary": "Consultar assinatura",
        "description": "Assinatura com as faturas (`invoices`).",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "required": true,
            "description": "uuid ou ref",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "example": "subscription"
                        },
                        "subscription_id": {
                          "type": "string",
                          "example": "68c536c3-0758-4b38-be2d-1a63bea7de9c"
                        },
                        "ref": {
                          "type": "string",
                          "example": "aluno-cbed"
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "plan_id": {
                          "type": "string",
                          "example": "44832fb9-2df3-40b0-9c59-178aa69ccbee"
                        },
                        "plan_ref": {
                          "type": "string",
                          "example": "plano-exemplo-cbed"
                        },
                        "price": {
                          "type": "number",
                          "example": 350.0
                        },
                        "interval": {
                          "type": "string",
                          "example": "month"
                        },
                        "interval_count": {
                          "type": "integer",
                          "example": 1
                        },
                        "trial_period_days": {
                          "type": "integer",
                          "example": 0
                        },
                        "payment_method": {
                          "type": "string",
                          "example": "pix"
                        },
                        "card": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "customer": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "Joao Responsavel"
                            },
                            "document": {
                              "type": "string",
                              "example": "52998224725"
                            },
                            "email": {
                              "type": "string",
                              "example": "joao@exemplo.com"
                            },
                            "phone": {
                              "type": "string",
                              "example": "61999990000"
                            }
                          }
                        },
                        "split": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "start_payment": {
                          "type": "string",
                          "example": "2026-11-30"
                        },
                        "next_payment": {
                          "type": "string",
                          "example": "2026-12-30"
                        },
                        "cycle": {
                          "type": "integer",
                          "example": 1
                        },
                        "canceled_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2026-11-30T18:14:10-03:00"
                        },
                        "invoices": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "object": {
                                "type": "string",
                                "example": "invoice"
                              },
                              "invoice_id": {
                                "type": "string",
                                "example": "0e041999-186b-4166-9895-0386a2e8973b"
                              },
                              "subscription_id": {
                                "type": "string",
                                "example": "68c536c3-0758-4b38-be2d-1a63bea7de9c"
                              },
                              "cycle": {
                                "type": "integer",
                                "example": 1
                              },
                              "amount": {
                                "type": "number",
                                "example": 350.0
                              },
                              "due_date": {
                                "type": "string",
                                "example": "2026-11-30"
                              },
                              "payment_method": {
                                "type": "string",
                                "example": "pix"
                              },
                              "status": {
                                "type": "string",
                                "example": "open"
                              },
                              "charge_uuid": {
                                "type": "string",
                                "example": "f70d7ad4-81af-4483-8d97-2522809399cf"
                              },
                              "pix": {
                                "type": "object",
                                "properties": {
                                  "txid": {
                                    "type": "string",
                                    "example": "cd4e88363a5427e776ce9660c542ccb8"
                                  },
                                  "copia_e_cola": {
                                    "type": "string",
                                    "example": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/cd4e88363a5427e776ce9660c542ccb85204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***630478E4"
                                  }
                                }
                              },
                              "boleto": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "failure": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "paid_at": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "created_at": {
                                "type": "string",
                                "example": "2026-11-30T18:14:10-03:00"
                              }
                            }
                          }
                        }
                      }
                    },
                    "sandbox": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "object": "subscription",
                    "subscription_id": "68c536c3-0758-4b38-be2d-1a63bea7de9c",
                    "ref": "aluno-cbed",
                    "status": "active",
                    "plan_id": "44832fb9-2df3-40b0-9c59-178aa69ccbee",
                    "plan_ref": "plano-exemplo-cbed",
                    "price": 350.0,
                    "interval": "month",
                    "interval_count": 1,
                    "trial_period_days": 0,
                    "payment_method": "pix",
                    "card": null,
                    "customer": {
                      "name": "Joao Responsavel",
                      "document": "52998224725",
                      "email": "joao@exemplo.com",
                      "phone": "61999990000"
                    },
                    "split": null,
                    "start_payment": "2026-11-30",
                    "next_payment": "2026-12-30",
                    "cycle": 1,
                    "canceled_at": null,
                    "created_at": "2026-11-30T18:14:10-03:00",
                    "invoices": [
                      {
                        "object": "invoice",
                        "invoice_id": "0e041999-186b-4166-9895-0386a2e8973b",
                        "subscription_id": "68c536c3-0758-4b38-be2d-1a63bea7de9c",
                        "cycle": 1,
                        "amount": 350.0,
                        "due_date": "2026-11-30",
                        "payment_method": "pix",
                        "status": "open",
                        "charge_uuid": "f70d7ad4-81af-4483-8d97-2522809399cf",
                        "pix": {
                          "txid": "cd4e88363a5427e776ce9660c542ccb8",
                          "copia_e_cola": "00020101021226850014br.gov.bcb.pix2563sandbox.cashpago.com.br/pix/qr/cd4e88363a5427e776ce9660c542ccb85204000053039865406350.005802BR5916CASHPAGO SANDBOX6008BRASILIA62070503***630478E4"
                        },
                        "boleto": null,
                        "failure": null,
                        "paid_at": null,
                        "created_at": "2026-11-30T18:14:10-03:00"
                      }
                    ]
                  },
                  "sandbox": true
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/plan/delete": {
      "post": {
        "operationId": "plano-excluir",
        "summary": "Inativar plano",
        "description": "Inativa o plano (não aceita novas assinaturas; as existentes continuam).",
        "tags": [
          "Assinaturas (beta)"
        ],
        "x-disponibilidade": "beta",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "plan_id": {
                          "type": "string",
                          "example": "…"
                        },
                        "status": {
                          "type": "string",
                          "example": "inactive"
                        },
                        "assinaturas_ativas": {
                          "type": "integer",
                          "example": 12
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "plan_id": "…",
                    "status": "inactive",
                    "assinaturas_ativas": 12
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "example": "{{plan_id}}"
                  }
                }
              },
              "example": {
                "plan_id": "{{plan_id}}"
              }
            }
          }
        }
      }
    }
  }
}