---
title: "Create a shareable billing link"
description: "Create a link which can be shared to your customer to let them fill their billing and payment information."
canonical: https://www.charitips.com/docs/api-reference/create-shareable-billing-link
---

# Create a shareable billing link

`POST /v1/accounts/{accountId}/billing-link`

Create a link which can be shared to your customer to let them fill their billing and payment information. Restricted to platform accounts who enabled billing delegation to Charitips.

**Authentication**: Bearer access token.

## Parameters

- `accountId` (string, required)

## Errors

- 400 `No domain found for your account`: The billing link is built on your own account's site. Every account gets its site when its onboarding is completed, so your account should have one: contact us. See https://www.charitips.com/docs/api-reference/create-shareable-billing-link.md.
- 401 `Unauthorized`: The access token is missing, expired or invalid. Create a new one with your client id and secret, send it as `Authorization: Bearer <accessToken>`, then retry once. Sandbox tokens only work on api.sandbox.charitips.com. See https://www.charitips.com/docs/get-started/authentication.md.
- 402 `Plan upgrade required`: Your plan does not include this feature. Upgrade the plan from the dashboard, then retry. See https://www.charitips.com/docs/overview/plans.md.
- 403 `Forbidden`: Your credentials cannot perform this action on this resource. An id from another account never answers 403: it is treated as unknown, with a 404 in the path or a 400 `Bad Request` in the body or the query. See https://www.charitips.com/docs/api-reference/errors.md.
- 403 `Billing delegation is not enabled for this account`: With an API token, the billing link needs billing delegation: the account must be billed to itself (`billedTo` ACCOUNT) and your plan must include delegated billing. Contact us to enable it. See https://www.charitips.com/docs/guides/account-hierarchy-billing.md.
- 403 `Account closed`: The account behind these credentials is closed: no token is issued and every call is refused, reads included. Contact Charitips to reopen it. See https://www.charitips.com/docs/api-reference/troubleshooting.md#calls-answer-403-account-not-active-account-not-validated-or-account-closed.
- 404 `Not Found`: No resource with this id on your account and environment. An id that belongs to another account answers 404 too when it is in the path. Ids from the sandbox do not exist in production. See https://www.charitips.com/docs/get-started/sandbox.md.

## Example

```bash
curl -X POST https://api.sandbox.charitips.com/v1/accounts/<accountId>/billing-link \
  -H "Authorization: Bearer $CHARITIPS_TOKEN"
```

```javascript
const response = await fetch('https://api.sandbox.charitips.com/v1/accounts/<accountId>/billing-link', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CHARITIPS_TOKEN}`,
  },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const data = await response.json();
```

```python
import os, requests

response = requests.post(
    "https://api.sandbox.charitips.com/v1/accounts/<accountId>/billing-link",
    headers={"Authorization": f"Bearer {os.environ['CHARITIPS_TOKEN']}"},
)
response.raise_for_status()
data = response.json()
```

## Response example (200, placeholder values)

```json
{}
```
