---
agentTools:
  projectIndex: https://partnerhubapi.stone.com.br/llms.txt
---

# Criar Conta Stone

Cria a conta Stone do lojista

## Estrutura do Request

[block:parameters]
{
  "data": {
    "h-0": "Campo",
    "h-1": "Tipo",
    "h-2": "Descrição",
    "0-0": "`account_type`",
    "0-1": "`number`",
    "0-2": "Tipo da conta  \n1 = Conta Corrente  \n**(Obs: Conta Stone somente 1)**",
    "1-0": "`business_unity_id`",
    "1-1": "`string`",
    "1-2": "Identificador da unidade de negócio.",
    "2-0": "`document`",
    "2-1": "`string`",
    "2-2": "Documento da empresa (CNPJ).",
    "3-0": "`trade_name`",
    "3-1": "`string`",
    "3-2": "Nome Fantasia da empresa.",
    "4-0": "`company_name`",
    "4-1": "`string`",
    "4-2": "Razão Social da empresa.",
    "5-0": "`merchant_responsible_document`",
    "5-1": "`string`",
    "5-2": "Documento (CPF) do responsável pela empresa.",
    "6-0": "`merchant_responsible_name`",
    "6-1": "`string`",
    "6-2": "Nome completo do responsável.",
    "7-0": "`email`",
    "7-1": "`string`",
    "7-2": "E-mail principal de contato."
  },
  "cols": 3,
  "rows": 8,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

> 🚧 Campos Obrigatórios
>
> Todos os campos do Request são obrigatórios para a criação da Conta Stone.

***

## Estrutura Principal do Response

| Campo      | Tipo      | Descrição                                                                              |
| :--------- | :-------- | :------------------------------------------------------------------------------------- |
| `success`  | `boolean` | Indica se a requisição foi bem-sucedida.                                               |
| `metadata` | `object`  | Contém os dados de paginação da resposta. Veja a tabela abaixo.                        |
| `data`     | `array`   | Lista contendo os objetos de dados. Veja a tabela de **Estrutura do Objeto de Dados**. |

***

## Estrutura do Objeto `metadata`

| Campo         | Tipo     | Descrição                            |
| :------------ | :------- | :----------------------------------- |
| `size`        | `number` | Quantidade de itens na página atual. |
| `total_items` | `number` | Número total de itens disponíveis.   |
| `page`        | `number` | O número da página atual retornada.  |
| `total_pages` | `number` | Número total de páginas existentes.  |

***

## Estrutura do Objeto de Dados (dentro do array `data`)

[block:parameters]
{
  "data": {
    "h-0": "Campo",
    "h-1": "Tipo",
    "h-2": "Descrição",
    "0-0": "`account_type`",
    "0-1": "`number`",
    "0-2": "Tipo da conta.  \n1 = Conta Corrente",
    "1-0": "`document`",
    "1-1": "`string`",
    "1-2": "Documento da empresa (CNPJ).",
    "2-0": "`trade_name`",
    "2-1": "`string`",
    "2-2": "Nome Fantasia da empresa.",
    "3-0": "`company_name`",
    "3-1": "`string`",
    "3-2": "Razão Social da empresa.",
    "4-0": "`merchant_responsible_document`",
    "4-1": "`string`",
    "4-2": "Documento (CPF) do sócio responsável.",
    "5-0": "`merchant_responsible_name`",
    "5-1": "`string`",
    "5-2": "Nome do sócio responsável.",
    "6-0": "`email`",
    "6-1": "`string`",
    "6-2": "E-mail de contato principal.",
    "7-0": "`account`",
    "7-1": "`string`",
    "7-2": "Número da conta. (O ultimo digito é o digito verificador)",
    "8-0": "`accountId`",
    "8-1": "`string`",
    "8-2": "ID único da conta.",
    "9-0": "**`user`**",
    "9-1": "**`object`**",
    "9-2": "**Informações do usuário associado à conta.**",
    "10-0": "`user.status.id`",
    "10-1": "`number`",
    "10-2": "ID do status do usuário.",
    "11-0": "`user.status.status`",
    "11-1": "`string`",
    "11-2": "Nome do status do usuário (ex: \"ATIVO\").",
    "12-0": "`user.status.description`",
    "12-1": "`string`",
    "12-2": "Descrição do status do usuário.",
    "13-0": "`user.migrated`",
    "13-1": "`boolean`",
    "13-2": "Indica se o usuário foi migrado de outro sistema.",
    "14-0": "**`org`**",
    "14-1": "**`object`**",
    "14-2": "**Informações da organização (empresa).**",
    "15-0": "`org.status.id`",
    "15-1": "`number`",
    "15-2": "ID do status da organização.",
    "16-0": "`org.status.status`",
    "16-1": "`string`",
    "16-2": "Nome do status da organização.",
    "17-0": "`org.status.description`",
    "17-1": "`string`",
    "17-2": "Descrição do status da organização.",
    "18-0": "**`pixKeys`**",
    "18-1": "**`array`**",
    "18-2": "**Lista de chaves Pix associadas à conta.**",
    "19-0": "`pixKeys[].account_id`",
    "19-1": "`string`",
    "19-2": "ID da conta à qual a chave Pix pertence.",
    "20-0": "`pixKeys[].type`",
    "20-1": "`string`",
    "20-2": "Tipo da chave Pix (ex: \"CNPJ\", \"EVP\").",
    "21-0": "`pixKeys[].status`",
    "21-1": "`string`",
    "21-2": "Status da chave Pix (ex: \"ACTIVE\").",
    "22-0": "`pixKeys[].createdAt`",
    "22-1": "`string`",
    "22-2": "Data de criação da chave (formato ISO 8601).",
    "23-0": "`pixKeys[].ownershipDateAt`",
    "23-1": "`string`",
    "23-2": "Data de início da posse da chave (formato ISO 8601).",
    "24-0": "`pixKeys[].statusChangedAt`",
    "24-1": "`string`",
    "24-2": "Data da última alteração de status (formato ISO 8601)."
  },
  "cols": 3,
  "rows": 25,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Partner Hub API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://partnerhub-sdx-external-api.stone.com.br"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/stone-accounts": {
      "post": {
        "summary": "Criar Conta Stone",
        "description": "Cria a conta Stone do lojista",
        "operationId": "create-stone-account",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Token JWT decriptado",
            "schema": {
              "type": "string",
              "default": "Bearer Token_aqui"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": true,\n  \"metadata\": {\n    \"size\": 0,\n    \"total_items\": 0,\n    \"page\": 0,\n    \"total_pages\": 0\n  },\n  \"data\": [\n    {\n      \"account_type\": 0,\n      \"document\": \"string\",\n      \"trade_name\": \"string\",\n      \"company_name\": \"string\",\n      \"merchant_responsible_document\": \"string\",\n      \"merchant_responsible_name\": \"string\",\n      \"email\": \"string\",\n      \"account\": \"string\",\n      \"accountId\": \"string\",\n      \"user\": {\n        \"status\": {\n          \"id\": 0,\n          \"status\": \"string\",\n          \"description\": \"string\"\n        },\n        \"migrated\": true\n      },\n      \"org\": {\n        \"status\": {\n          \"id\": 0,\n          \"status\": \"string\",\n          \"description\": \"string\"\n        }\n      },\n      \"pixKeys\": [\n        {\n          \"account_id\": \"string\",\n          \"type\": \"string\",\n          \"status\": \"string\",\n          \"createdAt\": \"2025-07-25T17:17:54.872Z\",\n          \"ownershipDateAt\": \"2025-07-25T17:17:54.872Z\",\n          \"statusChangedAt\": \"2025-07-25T17:17:54.872Z\"\n        }\n      ]\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "size": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "total_items": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "page": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "total_pages": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "account_type": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "document": {
                            "type": "string",
                            "example": "string"
                          },
                          "trade_name": {
                            "type": "string",
                            "example": "string"
                          },
                          "company_name": {
                            "type": "string",
                            "example": "string"
                          },
                          "merchant_responsible_document": {
                            "type": "string",
                            "example": "string"
                          },
                          "merchant_responsible_name": {
                            "type": "string",
                            "example": "string"
                          },
                          "email": {
                            "type": "string",
                            "example": "string"
                          },
                          "account": {
                            "type": "string",
                            "example": "string"
                          },
                          "accountId": {
                            "type": "string",
                            "example": "string"
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 0,
                                    "default": 0
                                  },
                                  "status": {
                                    "type": "string",
                                    "example": "string"
                                  },
                                  "description": {
                                    "type": "string",
                                    "example": "string"
                                  }
                                }
                              },
                              "migrated": {
                                "type": "boolean",
                                "example": true,
                                "default": true
                              }
                            }
                          },
                          "org": {
                            "type": "object",
                            "properties": {
                              "status": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 0,
                                    "default": 0
                                  },
                                  "status": {
                                    "type": "string",
                                    "example": "string"
                                  },
                                  "description": {
                                    "type": "string",
                                    "example": "string"
                                  }
                                }
                              }
                            }
                          },
                          "pixKeys": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "account_id": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "example": "2025-07-25T17:17:54.872Z"
                                },
                                "ownershipDateAt": {
                                  "type": "string",
                                  "example": "2025-07-25T17:17:54.872Z"
                                },
                                "statusChangedAt": {
                                  "type": "string",
                                  "example": "2025-07-25T17:17:54.872Z"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"error\": \"Unauthorized\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"error\": \"INTERNAL_SERVER_ERROR\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error": {
                      "type": "string",
                      "example": "INTERNAL_SERVER_ERROR"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "examples": {
                "Request": {
                  "value": {
                    "account_type": 0,
                    "business_unity_id": "string",
                    "document": "string",
                    "trade_name": "string",
                    "company_name": "string",
                    "merchant_responsible_document": "string",
                    "merchant_responsible_name": "string",
                    "email": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66fdc0f9b9c59e006159f051:687bd886866f2338c31a691c"
}
```