> This page is for BaaS.

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

# Register the account as a boleto beneficiary

POST https://tenant.api.corpx.com/v1/accounts/{accountId}/boleto/charge/beneficiary
Content-Type: application/json

Registers this account's holder as a boleto beneficiary using the account's
own data. Send an empty body, `{}` or `null`. Any other JSON returns **400**
`invalid_payload`. Scope `boleto_charge.manage`. Requires `boleto_charge`.

* Holder not registered, or the relationship is closed: **202**
  `boleto_charge_beneficiary_pending` and `Retry-After: 300`.
* Already pending: the same **202**, with no second registration.
* Eligible with an active relationship: **200** with the current beneficiary.
* Ineligible or under review: **422** `boleto_charge_beneficiary_ineligible`.
* The settlement bank refused: **502** `boleto_charge_beneficiary_registration_failed`,
  and `message` carries the partner's reason.
* A registration was rejected in the last 24 hours: this call registers again anyway.
  It is how you re-register after fixing the account data; only automatic
  re-registration by issuance waits for the 24 hours.

Reference: https://en.docs.api.corpx.com/baas/referencia/boleto-charge/register-boleto-charge-beneficiary

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

## Response

### 200

Already eligible. Body is the current beneficiary.

- `beneficiaryId` (string, optional) — Settlement-bank beneficiary id.
- `identifier` (string, optional) — Beneficiary identifier.
- `status` (enum, optional) — Beneficiary status.
  - Allowed values: `ELIGIBLE`, `PENDING`, `INELIGIBLE`, `UNDER_REVIEW`
- `relationshipStatus` (enum, optional) — Relationship with the settlement bank.
  - Allowed values: `ACTIVE`, `CLOSED`
- `relationshipActive` (boolean, optional) — True when the relationship is active.
- `personType` (enum, optional)
  - Allowed values: `person`, `company`
- `taxNumber` (string, optional)
- `name` (string, optional)
- `legalName` (string, optional)
- `tradeName` (string, optional)
- `socialName` (string, optional)
- `relationshipStartDate` (date, optional)
- `relationshipClosedAt` (datetime, optional)
- `email` (string, optional)
- `phone` (string, optional)
- `representativeName` (string, optional)
- `representativeEmail` (string, optional)
- `representativePhone` (string, optional)
- `alertOriginators` (list of string, optional) — ISPBs of institutions that raised alerts about this beneficiary.
- `updated` (datetime, optional)
- `accountId` (string, optional) — Present on the tenant list, when the tax number matches an account.
- `lastEvent` (BoletoChargeBeneficiaryLastEvent, optional) — Latest notice from the settlement bank about this account's beneficiary. Same data as the `boleto.charge.beneficiary.*` webhooks. Absent until the first notice.

### 202

Registration accepted and still pending. Retry-After 300.

- `errorCode` (string, optional)
- `message` (string, optional)

## Errors

### 400 Bad Request Error

Invalid request sent by client.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 403 Forbidden Error

Requester does not have permission to perform the operation.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 422 Unprocessable Entity Error

Beneficiary is ineligible or under review.

- `any`

### 502 Bad Gateway Error

The settlement bank refused the registration. `message` has the reason.

- `any`

## Types

### BoletoChargeBeneficiaryLastEvent

Latest notice from the settlement bank about this account's beneficiary. Same data as the `boleto.charge.beneficiary.*` webhooks. Absent until the first notice.

- `eventType` (enum, optional) — Webhook event this notice produced.
  - Allowed values: `boleto.charge.beneficiary.approved`, `boleto.charge.beneficiary.rejected`, `boleto.charge.beneficiary.updated`, `boleto.charge.beneficiary.closed`
- `operation` (enum, optional) — Operation the notice is about.
  - Allowed values: `INCLUSION`, `UPDATE`, `STATUS_UPDATE`, `TERMINATION`
- `result` (enum, optional)
  - Allowed values: `CONFIRMED`, `REJECTED`
- `operationId` (string, optional) — Same `operationId` returned by the 202 of the operation.
- `rejectionCode` (string, optional) — Rejection code from the settlement bank. Only when `result` is `REJECTED`.
- `rejectionReason` (string, optional) — Rejection description from the settlement bank. Only when `result` is `REJECTED`.
- `occurredAt` (datetime, optional)

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

## Examples

### Boleto Charge_registerBoletoChargeBeneficiary_example

**Request**

```json
{}
```

**Response**

```json
{
  "beneficiaryId": "8c1f6a2e-4d3b-4b9a-9f0e-1a2b3c4d5e6f",
  "identifier": "order-12345",
  "status": "ELIGIBLE",
  "relationshipStatus": "ACTIVE",
  "relationshipActive": true,
  "personType": "person",
  "taxNumber": "12345678000190",
  "name": "MARIA DA SILVA"
}
```

**SDK Code**

```python Boleto Charge_registerBoletoChargeBeneficiary_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary"

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

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

print(response.json())
```

```javascript Boleto Charge_registerBoletoChargeBeneficiary_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary';
const options = {
  method: 'POST',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

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

```go Boleto Charge_registerBoletoChargeBeneficiary_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary"

	payload := strings.NewReader("{}")

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

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	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 Boleto Charge_registerBoletoChargeBeneficiary_example
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")

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

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

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

```java Boleto Charge_registerBoletoChargeBeneficiary_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Boleto Charge_registerBoletoChargeBeneficiary_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Boleto Charge_registerBoletoChargeBeneficiary_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")! 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()
```

### Boleto Charge_registerBoletoChargeBeneficiary_example

**Request**

```json
{}
```

**Response**

```json
{
  "errorCode": "boleto_charge_beneficiary_pending",
  "message": "string"
}
```

**SDK Code**

```python Boleto Charge_registerBoletoChargeBeneficiary_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary"

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

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

print(response.json())
```

```javascript Boleto Charge_registerBoletoChargeBeneficiary_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary';
const options = {
  method: 'POST',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

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

```go Boleto Charge_registerBoletoChargeBeneficiary_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary"

	payload := strings.NewReader("{}")

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

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	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 Boleto Charge_registerBoletoChargeBeneficiary_example
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")

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

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

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

```java Boleto Charge_registerBoletoChargeBeneficiary_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Boleto Charge_registerBoletoChargeBeneficiary_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Boleto Charge_registerBoletoChargeBeneficiary_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/beneficiary")! 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()
```