# Configure Merchant OpenFinance

**POST** `/dpm/pix/v1/merchants/openfinance`

Base URL: `https://api.pre.globalgetnet.com`

__Configure Merchant OpenFinance__<br><br>

This endpoint sets up and manages a merchant (seller) in the Getnet Open Finance PIX ecosystem. A single endpoint handles all maintenance operations for the merchant. The `operation` field in the request body determines which one runs.<br><br>

**Notes:**<br>
- This documentation covers the `assets` and `domain` operations, which apply to the Biometric PIX flow.<br>
- Operations are synchronous. A successful call returns `204 No Content` with no response body.<br>
- There is no webhook associated with this endpoint.

## Authorization

- PROD (oauth2)
- PRE (oauth2)
- SBX (oauth2)

## Header parameters

- `x-seller-id` (string, required)
  Unique identifier of the commercial establishment (seller) registered on the Getnet platform.
- `username` (string)
  User who is registering. This information can be used for audit purposes.

## Body

Content type: `application/json`

- `operation` ("assets" | "domain", required)
  Operation to run.
  - `assets`: update the visual assets shown during the Biometric PIX journey.
  - `domain`: update the merchant's redirect domain.
- `payload` (object)
  Operation data. The expected schema depends on `operation`.
  - `url_logo` (string<uri>)
    Public URL of the merchant's logo image. Must be reachable without authentication.
  - `primary_color` (string)
    Primary color, in hexadecimal format.
  - `secondary_color` (string)
    Secondary color, in hexadecimal format.
  - `url_font` (string<uri>)
    Google Fonts CSS link used to load the font with its weight and style variants.
  - `name_font` (string)
    Merchant's typeface family name.

Example:

```json
{
  "operation": "assets",
  "payload": {
    "url_logo": "https://resources.linaopenx.com.br/fa_getnet_completo_r",
    "primary_color": "#FF0000",
    "secondary_color": "#FFFFFF",
    "url_font": "https://fonts.googleapis.com/css2?family=Amaranth:ital",
    "name_font": "Roboto"
  }
}
```

## Responses

### 204

Operation completed successfully. The response has no body, the HTTP status is the only confirmation.

### 400

Invalid request. Check required fields, formats, and accepted values.

- `statusCode` (integer)
  HTTP status code of the error.
- `error` (string)
  Short HTTP error name.
- `message` (string)
  Detailed error message.

Example:

```json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "\"payload.redirect_uri\" is required"
}
```

### 401

Invalid credentials or expired token. Generate a new access token.

- `statusCode` (integer)
  HTTP status code of the error.
- `error` (string)
  Short HTTP error name.
- `message` (string)
  Detailed error message.

Example:

```json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "\"payload.redirect_uri\" is required"
}
```

### 404

Resource not found; for example, the seller_id does not exist or is not enabled for PIX.

- `statusCode` (integer)
  HTTP status code of the error.
- `error` (string)
  Short HTTP error name.
- `message` (string)
  Detailed error message.

Example:

```json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "\"payload.redirect_uri\" is required"
}
```

### 500

Internal server error, or a failure communicating with the pix-openfinance-merchant-adp adapter. Retry with exponential backoff; contact Getnet support if it persists.

- `statusCode` (integer)
  HTTP status code of the error.
- `error` (string)
  Short HTTP error name.
- `message` (string)
  Detailed error message.

Example:

```json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "\"payload.redirect_uri\" is required"
}
```