---
title: "Create a donation fiscal receipt"
description: "Generate the fiscal receipt linked to this donation."
canonical: https://www.charitips.com/docs/api-reference/create-donation-fiscal-receipt
---

# Create a donation fiscal receipt

`POST /v1/donations/{donationId}/fiscal-receipts`

Generate the fiscal receipt linked to this donation. Only available for B2C donations created with hasBeenCharged and withFiscalReceipt set to true.

**Authentication**: Bearer access token.

## Parameters

- `donationId` (string, required)

## Response 200

- `fiscalReceiptId` (string, required)
- `amount` (integer (int64), required)
- `fiscalReceiptNumber` (string, required)
- `donationDate` (string (date-time), required)
- `type` (FiscalReceiptType, required) One of `YEARLY`, `SINGLE_DONATION`.
- `isLegacy` (boolean, required)
- `accountId` (string, required)
- `charityId` (string, required)
- `beneficiaryId` (string, required)
- `createdAt` (string (date-time), required)
- `updatedAt` (string (date-time), required)

## Errors

- 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 `Only avaible for donation created with hasBeenCharged set to true.`: A donor's fiscal receipt exists only for a donation the donor paid for. Create the donation with `hasBeenCharged` set to true, which needs the B2C use case on your account. See https://www.charitips.com/docs/use-cases/b2c.md.
- 403 `Only avaible for donation created with withFiscalReceipt set to true.`: The donation was created without a fiscal receipt. Create it with `withFiscalReceipt` set to true, or leave the field out on a campaign that issues receipts. See https://www.charitips.com/docs/use-cases/b2c.md.
- 403 `Donation has not been processed yet.`: The donation is still being processed. Wait for the donation_update webhook, then retry. See https://www.charitips.com/docs/webhooks/configuration.md.
- 403 `Donor is missing required fiscal information.`: A fiscal receipt needs the donor's first name, last name, street, zip, city and country. Complete the donor, or set withFiscalReceipt to false. See https://www.charitips.com/docs/use-cases/b2c.md.
- 403 `This charity does not support fiscal receipts.`: Not every charity can issue a receipt. Read `fiscalReceiptsSupport` on the charity before promising one: only `ENABLED` charities issue receipts. See https://www.charitips.com/docs/api-reference/get-charity.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.
- 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.
- 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/donations/<donationId>/fiscal-receipts \
  -H "Authorization: Bearer $CHARITIPS_TOKEN"
```

```javascript
const response = await fetch('https://api.sandbox.charitips.com/v1/donations/<donationId>/fiscal-receipts', {
  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/donations/<donationId>/fiscal-receipts",
    headers={"Authorization": f"Bearer {os.environ['CHARITIPS_TOKEN']}"},
)
response.raise_for_status()
data = response.json()
```

## Response example (200, placeholder values)

```json
{
  "fiscalReceiptId": "<fiscalReceiptId>",
  "amount": 2000,
  "fiscalReceiptNumber": "<fiscalReceiptNumber>",
  "donationDate": "<donationDate>",
  "type": "YEARLY",
  "isLegacy": false,
  "accountId": "<accountId>",
  "charityId": "<charityId>"
}
```
