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

# Authentication (Go Live)

POST https://bills.v2.pay4power.com/api/v2.1/b2b/auth/token
Content-Type: application/json

Generates an access token for the Bill Payment API using your public and private keys. Use the returned token to authorize subsequent requests.

Reference: https://docs.pay4power.com/entry/authentication-go-live

## Authentication

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

## Servers

- `https://bills.v2.pay4power.com/api/v2.1` (Sandbox, default)
- `https://bills.v2.pay4power.com/api/v2.1` (Live)

## Request

### Body (application/json)

This endpoint expects a map from string to any.

- `map from string to any`

## Response

### 200

- `map from string to any`

## Examples

**Request**

```json
{
  "environment": "LIVE",
  "privateKey": "PRIV_KEY_o7haFGpqsMusdRpnG93CZi862XEXBGUesT4L3kpKT0lhiXcYIGaE05S97RlSwFPl4ibT9jZ97fZ3-PG4sxcpQQ",
  "publicKey": "PUB_KEY_-PCoN5pTvGLHJQdR0etNzu2I0VuqFHsGIVzmeAEB_n8"
}
```

**Response**

```json
{
  "correlationId": "171695d3-af3b-4d61-be14-1ed803ea13fa",
  "data": {
    "expiresAt": 1765638462,
    "token": "",
    "tokenType": "Bearer"
  },
  "errors": null,
  "message": "Token generated successfully.",
  "statusCode": 200,
  "success": true
}
```