> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.gomoney.me/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.gomoney.me/_mcp/server.

# Criar cobrança PIX em BRL

POST https://gmc-api.gomoney.me/api/pix/create/brl/integration
Content-Type: application/json

Endpoint de emissão PIX em BRL para a integração documentada.

Este endpoint exige:
- `Authorization: Bearer <accessToken>`
- `secret-key: btoa(clientKey:clientSecret)`
- `Origin` correspondente ao domínio liberado

O campo `customerIdentifier` é obrigatório e as taxas PIX seguem a hierarquia:
`customer -> user -> settings`.


Reference: https://docs.gomoney.me/api-reference/open-api-explorer/pix-charges/create-pix-charge-brl

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: gomoney-docs-postman-collection
  version: 1.0.0
paths:
  /pix/create/brl/integration:
    post:
      operationId: create-pix-charge-brl
      summary: Criar cobrança PIX em BRL
      description: >
        Endpoint de emissão PIX em BRL para a integração documentada.


        Este endpoint exige:

        - `Authorization: Bearer <accessToken>`

        - `secret-key: btoa(clientKey:clientSecret)`

        - `Origin` correspondente ao domínio liberado


        O campo `customerIdentifier` é obrigatório e as taxas PIX seguem a
        hierarquia:

        `customer -> user -> settings`.
      tags:
        - pixCharges
      parameters:
        - name: Authorization
          in: header
          description: Token retornado pelo endpoint `/auth/login`.
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Cobrança criada com sucesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixCharge'
        '400':
          description: >-
            Payload inválido, valor inconsistente ou `customerIdentifier`
            ausente/inválido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixApiError'
        '401':
          description: Token, `secret-key` ou `Origin` inválidos para a integração.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Usuário sem permissão para operar a integração.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixApiError'
        '503':
          description: Fluxo GMC indisponível no momento.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixApiError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePixChargeRequest'
servers:
  - url: https://gmc-api.gomoney.me/api
    description: Base URL da API da plataforma
  - url: https://api-pix.gomoney.me
    description: Base URL da API PIX
components:
  schemas:
    CreatePixChargeRequest:
      type: object
      properties:
        amount:
          type: number
          format: double
        payerDocument:
          type: string
        payerName:
          type: string
        allowThirdPartyPayment:
          type: boolean
        correlationId:
          type: string
        isCreditGmc:
          type: boolean
        customerIdentifier:
          type: string
          description: '`_id` ou `taxId` do customer.'
      required:
        - amount
        - payerDocument
        - payerName
        - customerIdentifier
      title: CreatePixChargeRequest
    PixQrCode:
      type: object
      properties:
        emv:
          type: string
        png:
          type: string
      title: PixQrCode
    PixFormatLinks:
      type: object
      properties:
        html:
          type: string
          format: uri
        png:
          type: string
          format: uri
        pdf:
          type: string
          format: uri
      title: PixFormatLinks
    PixChargeFormats:
      type: object
      properties:
        default:
          $ref: '#/components/schemas/PixFormatLinks'
        qrcode:
          $ref: '#/components/schemas/PixFormatLinks'
      title: PixChargeFormats
    PixChargePayload:
      type: object
      properties:
        id:
          type: integer
        qrcode:
          $ref: '#/components/schemas/PixQrCode'
        formats:
          $ref: '#/components/schemas/PixChargeFormats'
      title: PixChargePayload
    PixCharge:
      type: object
      properties:
        _id:
          type: string
        txid:
          type: string
        amount:
          type: number
          format: double
        credit:
          type: number
          format: double
        payerDocument:
          type: string
        payerName:
          type: string
        userId:
          type: string
        valueCreditInGmc:
          type:
            - number
            - 'null'
          format: double
        status:
          type: string
        isCreditGmc:
          type: boolean
        customerIdentifier:
          type: string
        pix:
          $ref: '#/components/schemas/PixChargePayload'
      title: PixCharge
    PixApiError:
      type: object
      properties:
        statusCode:
          type: integer
        path:
          type: string
        code:
          type: string
        message:
          type: string
      title: PixApiError
    UnauthorizedError:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
      title: UnauthorizedError
  securitySchemes:
    accessTokenBearer:
      type: http
      scheme: bearer
      description: Token retornado pelo endpoint `/auth/login`.
    secretKeyHeader:
      type: apiKey
      in: header
      name: secret-key
      description: Chave Base64 no formato `btoa(clientKey:clientSecret)`.

```

## Examples

### success



**Request**

```json
undefined
```

**Response**

```json
{
  "_id": "66f0b1b5c1f7b7dc0ce40001",
  "txid": "4b8f5a4f7d8c4b45a5a6258a7e2b1234",
  "amount": 150.5,
  "credit": 146.24,
  "payerDocument": "39053344705",
  "payerName": "Pagador Externo",
  "userId": "66f0b1b5c1f7b7dc0ce20001",
  "valueCreditInGmc": null,
  "status": "opened",
  "isCreditGmc": true,
  "customerIdentifier": "66f0b1b5c1f7b7dc0ce30001",
  "pix": {
    "id": 12001,
    "qrcode": {
      "emv": "0002010102122680...",
      "png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
    },
    "formats": {
      "default": {
        "html": "https://pix.example.com/checkout/4b8f5a4f7d8c4b45a5a6258a7e2b1234",
        "png": "https://pix.example.com/files/default.png",
        "pdf": "https://pix.example.com/files/default.pdf"
      },
      "qrcode": {
        "html": "https://pix.example.com/files/qrcode.html",
        "png": "https://pix.example.com/files/qrcode.png",
        "pdf": "https://pix.example.com/files/qrcode.pdf"
      }
    }
  }
}
```

**SDK Code**

```python success
import requests

url = "https://gmc-api.gomoney.me/api/pix/create/brl/integration"

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript success
const url = 'https://gmc-api.gomoney.me/api/pix/create/brl/integration';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go success
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://gmc-api.gomoney.me/api/pix/create/brl/integration"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby success
require 'uri'
require 'net/http'

url = URI("https://gmc-api.gomoney.me/api/pix/create/brl/integration")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://gmc-api.gomoney.me/api/pix/create/brl/integration")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .asString();
```

```php success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://gmc-api.gomoney.me/api/pix/create/brl/integration', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp success
using RestSharp;

var client = new RestClient("https://gmc-api.gomoney.me/api/pix/create/brl/integration");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift success
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://gmc-api.gomoney.me/api/pix/create/brl/integration")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### default



**Request**

```json
{
  "amount": 150.5,
  "payerDocument": "39053344705",
  "payerName": "Pagador Externo",
  "customerIdentifier": "66f0b1b5c1f7b7dc0ce30001",
  "allowThirdPartyPayment": false,
  "correlationId": "ORDER-1001",
  "isCreditGmc": true
}
```

**Response**

```json
{
  "_id": "66f0b1b5c1f7b7dc0ce40001",
  "txid": "4b8f5a4f7d8c4b45a5a6258a7e2b1234",
  "amount": 150.5,
  "credit": 146.24,
  "payerDocument": "39053344705",
  "payerName": "Pagador Externo",
  "userId": "66f0b1b5c1f7b7dc0ce20001",
  "valueCreditInGmc": null,
  "status": "opened",
  "isCreditGmc": true,
  "customerIdentifier": "66f0b1b5c1f7b7dc0ce30001",
  "pix": {
    "id": 12001,
    "qrcode": {
      "emv": "0002010102122680...",
      "png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
    },
    "formats": {
      "default": {
        "html": "https://pix.example.com/checkout/4b8f5a4f7d8c4b45a5a6258a7e2b1234",
        "png": "https://pix.example.com/files/default.png",
        "pdf": "https://pix.example.com/files/default.pdf"
      },
      "qrcode": {
        "html": "https://pix.example.com/files/qrcode.html",
        "png": "https://pix.example.com/files/qrcode.png",
        "pdf": "https://pix.example.com/files/qrcode.pdf"
      }
    }
  }
}
```

**SDK Code**

```python default
import requests

url = "https://gmc-api.gomoney.me/api/pix/create/brl/integration"

payload = {
    "amount": 150.5,
    "payerDocument": "39053344705",
    "payerName": "Pagador Externo",
    "customerIdentifier": "66f0b1b5c1f7b7dc0ce30001",
    "allowThirdPartyPayment": False,
    "correlationId": "ORDER-1001",
    "isCreditGmc": True
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://gmc-api.gomoney.me/api/pix/create/brl/integration';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"amount":150.5,"payerDocument":"39053344705","payerName":"Pagador Externo","customerIdentifier":"66f0b1b5c1f7b7dc0ce30001","allowThirdPartyPayment":false,"correlationId":"ORDER-1001","isCreditGmc":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go default
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://gmc-api.gomoney.me/api/pix/create/brl/integration"

	payload := strings.NewReader("{\n  \"amount\": 150.5,\n  \"payerDocument\": \"39053344705\",\n  \"payerName\": \"Pagador Externo\",\n  \"customerIdentifier\": \"66f0b1b5c1f7b7dc0ce30001\",\n  \"allowThirdPartyPayment\": false,\n  \"correlationId\": \"ORDER-1001\",\n  \"isCreditGmc\": true\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby default
require 'uri'
require 'net/http'

url = URI("https://gmc-api.gomoney.me/api/pix/create/brl/integration")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"amount\": 150.5,\n  \"payerDocument\": \"39053344705\",\n  \"payerName\": \"Pagador Externo\",\n  \"customerIdentifier\": \"66f0b1b5c1f7b7dc0ce30001\",\n  \"allowThirdPartyPayment\": false,\n  \"correlationId\": \"ORDER-1001\",\n  \"isCreditGmc\": true\n}"

response = http.request(request)
puts response.read_body
```

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://gmc-api.gomoney.me/api/pix/create/brl/integration")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"amount\": 150.5,\n  \"payerDocument\": \"39053344705\",\n  \"payerName\": \"Pagador Externo\",\n  \"customerIdentifier\": \"66f0b1b5c1f7b7dc0ce30001\",\n  \"allowThirdPartyPayment\": false,\n  \"correlationId\": \"ORDER-1001\",\n  \"isCreditGmc\": true\n}")
  .asString();
```

```php default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://gmc-api.gomoney.me/api/pix/create/brl/integration', [
  'body' => '{
  "amount": 150.5,
  "payerDocument": "39053344705",
  "payerName": "Pagador Externo",
  "customerIdentifier": "66f0b1b5c1f7b7dc0ce30001",
  "allowThirdPartyPayment": false,
  "correlationId": "ORDER-1001",
  "isCreditGmc": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp default
using RestSharp;

var client = new RestClient("https://gmc-api.gomoney.me/api/pix/create/brl/integration");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": 150.5,\n  \"payerDocument\": \"39053344705\",\n  \"payerName\": \"Pagador Externo\",\n  \"customerIdentifier\": \"66f0b1b5c1f7b7dc0ce30001\",\n  \"allowThirdPartyPayment\": false,\n  \"correlationId\": \"ORDER-1001\",\n  \"isCreditGmc\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "amount": 150.5,
  "payerDocument": "39053344705",
  "payerName": "Pagador Externo",
  "customerIdentifier": "66f0b1b5c1f7b7dc0ce30001",
  "allowThirdPartyPayment": false,
  "correlationId": "ORDER-1001",
  "isCreditGmc": true
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://gmc-api.gomoney.me/api/pix/create/brl/integration")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```