---
agentTools:
  projectIndex: https://geopagos.readme.io/llms.txt
---

# Cadastrar um Merchant

Requisição de criação de uma nova `company`.A autenticação utilizada deve referir-se a uma `company` com permissão de cadastro de merchants (Ou seja, um `parent_merchant`). Caso contrário, a requisição irá falhar com status HTTP 403. A nova company será criada como um merchant associado à company criadora.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Geopagos API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.{dev}.geopagos.com.br",
      "variables": {
        "dev": {
          "default": "dev"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/children/companies": {
      "post": {
        "summary": "Cadastrar um Merchant",
        "description": "Requisição de criação de uma nova `company`.A autenticação utilizada deve referir-se a uma `company` com permissão de cadastro de merchants (Ou seja, um `parent_merchant`). Caso contrário, a requisição irá falhar com status HTTP 403. A nova company será criada como um merchant associado à company criadora.",
        "operationId": "cadastrar-um-merchant",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "document_number",
                  "name",
                  "full_name",
                  "email",
                  "bank_account",
                  "contact",
                  "address",
                  "shipping_address",
                  "mcc",
                  "transfer_configurations",
                  "default_payment_provider",
                  "anticipation_type",
                  "anticipation_days_interval"
                ],
                "properties": {
                  "document_number": {
                    "type": "string",
                    "description": "CPF/CNPJ do cadastro sendo criado"
                  },
                  "name": {
                    "type": "string",
                    "description": "Nome fantasia do cadastro sendo criado.",
                    "default": "John Doe 99999999911 MEI"
                  },
                  "full_name": {
                    "type": "string",
                    "description": "Razão social do cadastro sendo criado. Em caso de pessoa física, esse campo deve ser preenchido com nome completo do usuário.",
                    "default": "John Doe 99999999911 MEI"
                  },
                  "email": {
                    "type": "string"
                  },
                  "bank_account": {
                    "type": "object",
                    "required": [
                      "bank_code",
                      "agencia",
                      "conta",
                      "conta_dv",
                      "legal_name",
                      "document_number"
                    ],
                    "properties": {
                      "bank_code": {
                        "type": "string"
                      },
                      "agencia": {
                        "type": "string"
                      },
                      "agencia_dv": {
                        "type": "string"
                      },
                      "conta": {
                        "type": "string"
                      },
                      "conta_dv": {
                        "type": "string"
                      },
                      "legal_name": {
                        "type": "string"
                      },
                      "document_number": {
                        "type": "string"
                      }
                    }
                  },
                  "contact": {
                    "type": "object",
                    "required": [
                      "name",
                      "phone",
                      "email"
                    ],
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string",
                        "description": "Telefone do usuário de contato"
                      },
                      "email": {
                        "type": "string",
                        "description": "Email do usuário de contato"
                      }
                    }
                  },
                  "address": {
                    "type": "object",
                    "description": "Endereço principal de operação",
                    "required": [
                      "street",
                      "street_number",
                      "zipcode",
                      "neighborhood",
                      "state",
                      "city",
                      "country"
                    ],
                    "properties": {
                      "street": {
                        "type": "string"
                      },
                      "street_number": {
                        "type": "string"
                      },
                      "zipcode": {
                        "type": "string"
                      },
                      "neighborhood": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      }
                    }
                  },
                  "shipping_address": {
                    "type": "object",
                    "description": "Endereço para entrega de terminais",
                    "required": [
                      "street",
                      "street_number",
                      "zipcode",
                      "neighborhood",
                      "state",
                      "city",
                      "country"
                    ],
                    "properties": {
                      "street": {
                        "type": "string"
                      },
                      "street_number": {
                        "type": "string"
                      },
                      "zipcode": {
                        "type": "string"
                      },
                      "neighborhood": {
                        "type": "string"
                      },
                      "state": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      }
                    }
                  },
                  "estimated_monthly_tpv": {
                    "type": "integer",
                    "description": "Volume total transacionado (TPV) mensal estimado processo pelo cadastro (em centavos)",
                    "default": 100000,
                    "format": "int32"
                  },
                  "mcc": {
                    "type": "string",
                    "description": "Um Merchant Category Code (MCC) é um número de quatro dígitos, conforme especificado na ISO 18245. O MCC é usado para classificar o negócio pelo tipo fornecido de bens ou serviços, de forma semelhante aos códigos da CNAE no Brasil.",
                    "default": "5211"
                  },
                  "transfer_configurations": {
                    "type": "object",
                    "required": [
                      "automatic_transfer_enabled",
                      "transfer_frequency"
                    ],
                    "properties": {
                      "automatic_transfer_enabled": {
                        "type": "boolean",
                        "default": true
                      },
                      "transfer_frequency": {
                        "type": "string",
                        "description": "Opções: daily, weekly e monthly",
                        "default": "daily",
                        "enum": [
                          "daily",
                          "weekly",
                          "monthly"
                        ]
                      },
                      "transfer_date": {
                        "type": "integer",
                        "description": "Data de pagamento",
                        "default": 1,
                        "format": "int32"
                      }
                    }
                  },
                  "default_payment_provider": {
                    "type": "string"
                  },
                  "anticipation_type": {
                    "type": "string",
                    "description": "Define o tipo de antecipação desse cadastro. Opções: 'automatic', 'spot' (pontual). Sendo 'spot' o valor default.",
                    "default": "spot",
                    "enum": [
                      "automatic",
                      "spot"
                    ]
                  },
                  "anticipation_days_interval": {
                    "type": "integer",
                    "description": "Quantidade de dias após a data da criação da transação para a qual os recebíveis serão antecipados caso a antecipação automática esteja habilitada. Valores aceitos: de 1 até 30",
                    "default": 1,
                    "format": "int32"
                  },
                  "metadata": {
                    "type": "string",
                    "description": "Um objeto chave/valor para se guardar qualquer tipo de informação atrelada ao merchant. Por exemplo um ID de um sistema externo.",
                    "default": "{\"exemplo\":\"valor 1\", \"internal_id\": \"123456789\"}",
                    "format": "json"
                  },
                  "email_configurations": {
                    "type": "object",
                    "required": [
                      "custom_domain_enabled",
                      "send_activation_email"
                    ],
                    "properties": {
                      "custom_domain_enabled": {
                        "type": "boolean",
                        "default": false
                      },
                      "send_activation_email": {
                        "type": "boolean",
                        "default": false
                      }
                    }
                  },
                  "main_capture_method": {
                    "type": "string",
                    "default": "pos",
                    "enum": [
                      "pos",
                      "ecommerce"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "ChildCompanyAlreadyExistsError": {
                    "value": "{\n  \"errors\": [\n    {\n      \"type\": \"ChildCompanyAlreadyExistsError\",\n      \"message\": \"Já existe um cadastro com esse número de documento.\"\n    }\n  ],\n  \"url\": \"/children/companies\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "example": "ChildCompanyAlreadyExistsError"
                          },
                          "message": {
                            "type": "string",
                            "example": "Já existe um cadastro com esse número de documento."
                          }
                        }
                      }
                    },
                    "url": {
                      "type": "string",
                      "example": "/children/companies"
                    }
                  }
                }
              },
              "text/plain": {
                "examples": {
                  "ValidationError - document_number": {
                    "value": "{\n  \"errors\": [\n    {\n      \"type\": \"ValidationError\",\n      \"parameter_name\": \"document_number\",\n      \"message\": \"O formato do paramêtro document_number é inválido.\"\n    }\n  ],\n  \"url\": \"/children/companies\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "example": "ValidationError"
                          },
                          "parameter_name": {
                            "type": "string",
                            "example": "document_number"
                          },
                          "message": {
                            "type": "string",
                            "example": "O formato do paramêtro document_number é inválido."
                          }
                        }
                      }
                    },
                    "url": {
                      "type": "string",
                      "example": "/children/companies"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "646d75355a394d07dc8d3bbc:646d7c10a8e61b003b2c3855"
}
```