# Shop payment account connect

`POST /payments/accounts` · Rivier · shop

Connect a payment account (the business's own Stripe through a connection, or Skerry).

- Scope: shop:admin
- Sdk: shop.paymentAccount.connect
- Cli: shop payment account connect

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "enum": [
        "skerry",
        "stripe",
        "mock"
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "test",
        "live"
      ],
      "default": "test"
    },
    "label": {
      "type": "string",
      "maxLength": 80,
      "default": ""
    },
    "connectionId": {
      "type": "string",
      "maxLength": 100
    },
    "legalName": {
      "type": "string",
      "maxLength": 200
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 254
    },
    "country": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    }
  },
  "required": [
    "provider"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/payments/accounts' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "provider": "skerry"
}'
```
