> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate credits for testing purposes

> Simulate a credit (inbound payment) to a budget in sandbox.

<Info>
  This endpoint is for testing purposes only and won't work in production.
</Info>

## Generate a credit

<Note>
  **POST** `/v2/budgets/generate-credit`
</Note>

### Request

Use this request to generate a credit.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    'https://api-sandbox.equalsmoney.com/v2/budgets/generate-credit?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "thirdPartyReference": "1e3f1734-6f7a-17e5-ae22-11cd18757ef4",
      "budgetId": "fcf1d230-a9d0-4836-9e20-f98f3396e01b",
      "settlementPriceAmount": "200",
      "settlementPriceCurrency": "GBP",
      "remittersName": "William Walker",
      "reference": "REF-123-456",
      "bankIdentifier": "123",
      "remittersAddress": "41 Middle Street, Enfield, EN1 3JY",
      "beneficiaryName": "John Smith",
      "institutionName": "ACME",
      "institutionAddress": "32 Marlborough Street, London, N9 7QD",
      "schemeName": "FasterPayment"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    'https://api-sandbox.equalsmoney.com/v2/budgets/generate-credit?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "thirdPartyReference": "string",
      "budgetId": "string",
      "settlementPriceAmount": "string",
      "settlementPriceCurrency": "string",
      "remittersName": "string",
      "reference": "string",
      "bankIdentifier": "string",
      "remittersAddress": "string",
      "beneficiaryName": "string",
      "institutionName": "string",
      "institutionAddress": "string",
      "schemeName": "string"
    }'
  ```
</CodeGroup>

#### Request body schema

<ParamField body="thirdPartyReference" type="string">
  A unique reference provided by your integrating product.

  Allowable values: A valid string
</ParamField>

<ParamField body="budgetId" type="string (uuid)" required>
  The ID of the budget receiving the credit.

  Allowable values: An existing `budgetId` (≤ 36 characters)
</ParamField>

<ParamField body="settlementPriceAmount" type="string" required>
  The settlement amount.

  Allowable values: A valid string (`^[0-9]+$`)
</ParamField>

<ParamField body="settlementPriceCurrency" type="string" required>
  The currency of the settlement, in ISO 4217 format.

  Allowable values: 3 characters
</ParamField>

<ParamField body="schemeName" type="string">
  The name of the scheme used to process the credit.

  Allowable values: `FasterPayment`, `BACS`, `CHAPS`, `Swift`, `SEPA`
</ParamField>

### Response

If your request is successful, you'll receive a `200` response. Your budget will be credited with the settlement amount specified in the request and you'll be able to find the transaction in your transaction activity lists and reports.

```json theme={null}
{
 "boxTransactionId": 3765,
 "balance": {
  "runningBalance": "200.00",
  "availableBalance": "200.00"
 }
}
```

For more detailed information about this request and its response, [see the API reference](/api-reference/testing-credits/generate-credits-for-testing-purposes).
