# Get account payment method settings

`GET /v2/accounts/settings`

**Base URLs:**

- Sandbox: `https://api.sandbox.bobpay.co.za`
- Production: `https://api.bobpay.co.za`

**Authentication:** Bearer token required. Obtain one via `POST /login` (see the Authentication page).

## Example request

```bash
curl -X GET "https://api.sandbox.bobpay.co.za/v2/accounts/settings" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
```

This endpoint retrieves the payment method settings for a specified account.

---

### Request

**Method:** GET
**URL:** `https://api.sandbox.bobpay.co.za/v2/accounts/settings`

---

#### Query parameters

| Key | Description | Type | Required |
| --- | --- | --- | --- |
| for_account_id | The unique identifier of the account for which the payment method settings are being requested. Defaults to your own account; merchant users can only access their own account's settings. | integer | No |
| setting | The specific setting type to retrieve. For this endpoint, it should be set to `account_payment_methods`. If omitted, all settings are returned. | string | No |

---

### Response

**Status code:** 200 OK
**Content-Type:** application/json

**Response body example:**

```json
{
    "account_settings": [
        {
            "id": 350,
            "account_id": 259,
            "setting": "account_payment_methods",
            "value": "{\"absa-pay\": {\"enabled\": true, \"approved\": true, \"retention_days\": 0, \"max_transaction_amount\": 200000}, ...}",
            "time_created": "2025-02-24T10:28:53.812911+02:00",
            "time_modified": "2025-05-28T09:03:06.234595+02:00",
            "is_public": true
        }
    ],
    "count": 1
}
```

---

### Response fields

| Key | Description | Type |
| --- | --- | --- |
| account_settings | An array containing the settings related to the account payment methods. | array of objects |
| id | The unique identifier for the setting. | integer |
| account_id | The identifier of the account associated with the setting. | integer |
| setting | The name of the setting. | string |
| value | The value assigned to the setting (JSON string, see note below). | string |
| time_created | The timestamp when the setting was created. | string (datetime) |
| time_modified | The timestamp when the setting was last modified. | string (datetime) |
| is_public | A boolean indicating if the setting is public. | boolean |
| count | The total number of settings returned in the response. | integer |

**Note:**

The `value` field contains a JSON string that describes the available payment methods and their settings (such as `enabled`, `approved`, `retention_days`, and `max_transaction_amount` for each method).
