{
  "openapi": "3.1.0",
  "info": {
    "title": "API DuckFy",
    "version": "1.0.0",
    "description": "API de pagamentos Pix. Base URL: https://api.redeutopia.com/v1. Autenticação com chave de API no cabeçalho Authorization: Bearer."
  },
  "servers": [
    {
      "url": "https://api.redeutopia.com"
    }
  ],
  "paths": {
    "/v1/balance": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "available_cents": {
                      "type": "integer"
                    },
                    "blocked_cents": {
                      "type": "integer"
                    },
                    "processing_cents": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "available_cents",
                    "blocked_cents",
                    "processing_cents"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Merchant balances: available, reserved for requests, blocked",
        "x-scope": "BALANCE:READ"
      }
    },
    "/v1/infractions": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "amount_cents": {
                            "type": "integer"
                          },
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "customer": {
                            "type": "string"
                          },
                          "due_at": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "payment_id": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount_cents",
                          "at",
                          "customer",
                          "due_at",
                          "id",
                          "kind",
                          "payment_id",
                          "reason",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Refunds and Pix infractions of a period, filtered (cursor pagination)",
        "x-scope": "INFRACTION:READ"
      }
    },
    "/v1/infractions/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "type": "integer"
                    },
                    "at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "customer": {
                      "type": "string"
                    },
                    "due_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "payment_id": {
                      "type": "string"
                    },
                    "pix_end_to_end_id": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "sale_amount_cents": {
                      "type": "integer"
                    },
                    "sale_method": {
                      "type": "string"
                    },
                    "sale_paid_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "timeline": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "event": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "at",
                          "event"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "amount_cents",
                    "at",
                    "customer",
                    "due_at",
                    "id",
                    "kind",
                    "payment_id",
                    "pix_end_to_end_id",
                    "reason",
                    "sale_amount_cents",
                    "sale_method",
                    "sale_paid_at",
                    "status",
                    "timeline"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "One refund or infraction with its sale and timeline",
        "x-scope": "INFRACTION:READ"
      }
    },
    "/v1/payments": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "amount_cents": {
                            "type": "integer"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "customer": {
                            "additionalProperties": false,
                            "properties": {
                              "document": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "document",
                              "name"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expires_at": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "external_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fee_cents": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "string"
                          },
                          "metadata": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "net_cents": {
                            "type": "integer"
                          },
                          "paid_at": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paid_late": {
                            "type": "boolean"
                          },
                          "payment_url": {
                            "type": "string"
                          },
                          "pix": {
                            "additionalProperties": false,
                            "properties": {
                              "copy_paste": {
                                "type": "string"
                              },
                              "qr_svg": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "copy_paste"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount_cents",
                          "created_at",
                          "customer",
                          "description",
                          "expires_at",
                          "external_id",
                          "fee_cents",
                          "id",
                          "metadata",
                          "net_cents",
                          "paid_at",
                          "paid_late",
                          "payment_url",
                          "pix",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List payments (filters: status, external_id; keyset cursor)",
        "x-scope": "PAYMENT:READ"
      },
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 8,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "amount_cents": {
                    "type": "integer"
                  },
                  "description": {
                    "type": "string"
                  },
                  "expires_in": {
                    "type": "integer"
                  },
                  "external_id": {
                    "type": "string"
                  },
                  "items": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "product_id": {
                          "type": "string"
                        },
                        "qty": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "product_id",
                        "qty"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "metadata": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "payer": {
                    "additionalProperties": false,
                    "properties": {
                      "document": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "document",
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "amount_cents",
                  "description",
                  "expires_in",
                  "external_id",
                  "items",
                  "metadata",
                  "payer"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "customer": {
                      "additionalProperties": false,
                      "properties": {
                        "document": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "document",
                        "name"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "external_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fee_cents": {
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    },
                    "metadata": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "net_cents": {
                      "type": "integer"
                    },
                    "paid_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "paid_late": {
                      "type": "boolean"
                    },
                    "payment_url": {
                      "type": "string"
                    },
                    "pix": {
                      "additionalProperties": false,
                      "properties": {
                        "copy_paste": {
                          "type": "string"
                        },
                        "qr_svg": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "copy_paste"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount_cents",
                    "created_at",
                    "customer",
                    "description",
                    "expires_at",
                    "external_id",
                    "fee_cents",
                    "id",
                    "metadata",
                    "net_cents",
                    "paid_at",
                    "paid_late",
                    "payment_url",
                    "pix",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a Pix payment (amount in cents, payer name and CPF/CNPJ; fee and status set by the server)",
        "x-scope": "PAYMENT:CREATE"
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "customer": {
                      "additionalProperties": false,
                      "properties": {
                        "document": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "document",
                        "name"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expires_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "external_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fee_cents": {
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    },
                    "metadata": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "net_cents": {
                      "type": "integer"
                    },
                    "paid_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "paid_late": {
                      "type": "boolean"
                    },
                    "payment_url": {
                      "type": "string"
                    },
                    "pix": {
                      "additionalProperties": false,
                      "properties": {
                        "copy_paste": {
                          "type": "string"
                        },
                        "qr_svg": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "copy_paste"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount_cents",
                    "created_at",
                    "customer",
                    "description",
                    "expires_at",
                    "external_id",
                    "fee_cents",
                    "id",
                    "metadata",
                    "net_cents",
                    "paid_at",
                    "paid_late",
                    "payment_url",
                    "pix",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Read one payment",
        "x-scope": "PAYMENT:READ"
      }
    },
    "/v1/payments/{id}/refunds": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 8,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "amount_cents": {
                    "type": "integer"
                  },
                  "description": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "amount_cents",
                  "description",
                  "reason"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "type": "integer"
                    },
                    "completed_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fee_returned_cents": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "id": {
                      "type": "string"
                    },
                    "payment_id": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount_cents",
                    "completed_at",
                    "created_at",
                    "decision_reason",
                    "description",
                    "fee_returned_cents",
                    "id",
                    "payment_id",
                    "reason",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Request a full or partial refund of a paid payment",
        "x-scope": "REFUND:CREATE"
      }
    },
    "/v1/payout-keys": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "key": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "created_at",
                          "id",
                          "key",
                          "status",
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Payout keys: the active one and a change waiting for review",
        "x-scope": "WITHDRAWAL:READ"
      },
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 8,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "key": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "id",
                    "key",
                    "status",
                    "type"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Register the payout key (a change waits for review)",
        "x-scope": "WITHDRAWAL:CREATE"
      }
    },
    "/v1/refunds": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "amount_cents": {
                            "type": "integer"
                          },
                          "completed_at": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "decision_reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "fee_returned_cents": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "payment_id": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount_cents",
                          "completed_at",
                          "created_at",
                          "decision_reason",
                          "description",
                          "fee_returned_cents",
                          "id",
                          "payment_id",
                          "reason",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List refunds (status, payment_id, cursor)",
        "x-scope": "REFUND:READ"
      }
    },
    "/v1/refunds/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "type": "integer"
                    },
                    "completed_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "decision_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "fee_returned_cents": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "id": {
                      "type": "string"
                    },
                    "payment_id": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount_cents",
                    "completed_at",
                    "created_at",
                    "decision_reason",
                    "description",
                    "fee_returned_cents",
                    "id",
                    "payment_id",
                    "reason",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Get one refund",
        "x-scope": "REFUND:READ"
      }
    },
    "/v1/withdrawals": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "amount_cents": {
                            "type": "integer"
                          },
                          "created_at": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "fee_cents": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "string"
                          },
                          "paid_at": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "payout_key": {
                            "type": "string"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount_cents",
                          "created_at",
                          "fee_cents",
                          "id",
                          "paid_at",
                          "payout_key",
                          "reason",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "next_cursor": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List withdrawals (status, cursor)",
        "x-scope": "WITHDRAWAL:READ"
      },
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 200,
              "minLength": 8,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "amount_cents": {
                    "type": "integer"
                  }
                },
                "required": [
                  "amount_cents"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "amount_cents": {
                      "type": "integer"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "fee_cents": {
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    },
                    "paid_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "payout_key": {
                      "type": "string"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount_cents",
                    "created_at",
                    "fee_cents",
                    "id",
                    "paid_at",
                    "payout_key",
                    "reason",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "error"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Request a withdrawal to the active payout key",
        "x-scope": "WITHDRAWAL:CREATE"
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "message": {
            "type": "string"
          },
          "support_code": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "description": "Merchant API key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}