> ## 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

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

 This endpoint is for testing purposes only and won't work in production.
    



## OpenAPI

````yaml /autogenerated/openapi/budgets.openapi.json post /budgets/generate-credit
openapi: 3.1.0
info:
  title: Budgets API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
  - url: https://api-sandbox.equalsmoney.com/v2
    description: Sandbox
security: []
paths:
  /budgets/generate-credit:
    post:
      tags:
        - Testing credits
      summary: Generate credits for testing purposes
      description: |2-

         Generate a credit (inbound payment) to a budget in sandbox.

         This endpoint is for testing purposes only and won't work in production.
            
      operationId: generateCredits
      parameters:
        - name: accountId
          in: query
          schema:
            description: The ID of the account to work with.
            type:
              - string
            example: F50091
          required: true
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type:
                - object
              properties:
                thirdPartyReference:
                  type:
                    - string
                  description: A unique reference provided by your integrating product.
                  example: 1e3f1734-6f7a-17e5-ae22-11cd18757ef4
                budgetId:
                  type:
                    - string
                  format: uuid
                  maxLength: 36
                  description: The ID of the budget to work with.
                  example: 775596ae-2624-40af-a9dc-9756110a4a03
                orderId:
                  type:
                    - string
                  description: The ID of the order used to fulfil the transfer request.
                accountIdentifier:
                  type:
                    - string
                  description: Identifier of the account, could be iban or account number
                settlementPriceAmount:
                  type:
                    - string
                  pattern: ^[0-9]+$
                  description: The settlement amount.
                settlementPriceCurrency:
                  type:
                    - string
                  enum:
                    - AED
                    - AFN
                    - ALL
                    - AMD
                    - ANG
                    - AOA
                    - ARS
                    - AUD
                    - AWG
                    - AZN
                    - BAM
                    - BBD
                    - BDT
                    - BHD
                    - BIF
                    - BMD
                    - BND
                    - BOB
                    - BOV
                    - BRL
                    - BSD
                    - BTN
                    - BWP
                    - BYN
                    - BZD
                    - CAD
                    - CDF
                    - CHF
                    - CLP
                    - CNY
                    - COP
                    - CRC
                    - CUC
                    - CUP
                    - CVE
                    - CZK
                    - DJF
                    - DKK
                    - DOP
                    - DZD
                    - EGP
                    - ERN
                    - ETB
                    - EUR
                    - FJD
                    - FKP
                    - GBP
                    - GEL
                    - GGP
                    - GHS
                    - GIP
                    - GMD
                    - GNF
                    - GTQ
                    - GYD
                    - HKD
                    - HNL
                    - HRK
                    - HTG
                    - HUF
                    - IDR
                    - ILS
                    - INR
                    - IQD
                    - IRR
                    - ISK
                    - JMD
                    - JOD
                    - JPY
                    - KES
                    - KGS
                    - KHR
                    - KMF
                    - KPW
                    - KRW
                    - KWD
                    - KYD
                    - KZT
                    - LAK
                    - LBP
                    - LKR
                    - LRD
                    - LSL
                    - LTL
                    - LVL
                    - LYD
                    - MAD
                    - MDL
                    - MGA
                    - MKD
                    - MMK
                    - MNT
                    - MOP
                    - MUR
                    - MVR
                    - MWK
                    - MXN
                    - MYR
                    - MZN
                    - NAD
                    - NGN
                    - NIO
                    - NOK
                    - NPR
                    - NZD
                    - OMR
                    - PAB
                    - PEN
                    - PGK
                    - PHP
                    - PKR
                    - PLN
                    - PYG
                    - QAR
                    - RON
                    - RSD
                    - RUB
                    - RWF
                    - SAR
                    - SBD
                    - SCR
                    - SEK
                    - SGD
                    - SHN
                    - SLL
                    - SOS
                    - SRD
                    - SSP
                    - STN
                    - SYP
                    - SZL
                    - THB
                    - TJS
                    - TMT
                    - TND
                    - TOP
                    - TRY
                    - TTD
                    - TWD
                    - TZS
                    - UAH
                    - UGX
                    - USD
                    - UYU
                    - UZS
                    - VND
                    - VUV
                    - WST
                    - XAF
                    - XAG
                    - XAU
                    - XCD
                    - XOF
                    - XPD
                    - XPF
                    - XPT
                    - YER
                    - ZAR
                    - ZMK
                    - ZMW
                    - ZWD
                  example: USD
                remittersName:
                  type:
                    - string
                  description: The name of the remitter.
                  example: William Walker
                reference:
                  type:
                    - string
                  description: The reference of the credit.
                  example: REF-123-456
                bankIdentifier:
                  type:
                    - string
                  pattern: ^[0-9]+$
                  description: The bank identifier.
                remittersAddress:
                  type:
                    - string
                  description: The remitter's address.
                  example: 41 Middle Street, Enfield, EN1 3JY
                beneficiaryName:
                  type:
                    - string
                  description: The name of the beneficiary of the credit.
                  example: John Smith
                institutionName:
                  type:
                    - string
                  maxLength: 35
                  description: The name of the institution making the credit.
                institutionAddress:
                  type:
                    - string
                  maxLength: 109
                  description: The address of the institution making the credit.
                schemeName:
                  type:
                    - string
                  enum:
                    - FasterPayment
                    - BACS
                    - CHAPS
                    - Swift
                    - SEPA
                  description: The name of the scheme used to process the credit.
                  example: FasterPayment
              required:
                - budgetId
                - settlementPriceAmount
                - settlementPriceCurrency
                - remittersName
                - remittersAddress
                - beneficiaryName
              example:
                thirdPartyReference: 1e3f1734-6f7a-17e5-ae22-11cd18757ef4
                budgetId: 775596ae-2624-40af-a9dc-9756110a4a03
                orderId: string
                accountIdentifier: string
                settlementPriceAmount: string
                settlementPriceCurrency: USD
                remittersName: William Walker
                reference: REF-123-456
                bankIdentifier: string
                remittersAddress: 41 Middle Street, Enfield, EN1 3JY
                beneficiaryName: John Smith
                institutionName: string
                institutionAddress: string
                schemeName: FasterPayment
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type:
                  - object
                properties: {}
                additionalProperties: true
                example: {}
      security:
        - CommonAuth:
            - orders:create:any
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.equalsmoney.com/v2/budgets/generate-credit?accountId={{accountId}}' \
              --header 'Authorization: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '
            {
              "thirdPartyReference": "1e3f1734-6f7a-17e5-ae22-11cd18757ef4",
              "budgetId": "775596ae-2624-40af-a9dc-9756110a4a03",
              "orderId": "string",
              "accountIdentifier": "string",
              "settlementPriceAmount": "string",
              "settlementPriceCurrency": "USD",
              "remittersName": "William Walker",
              "reference": "REF-123-456",
              "bankIdentifier": "string",
              "remittersAddress": "41 Middle Street, Enfield, EN1 3JY",
              "beneficiaryName": "John Smith",
              "institutionName": "string",
              "institutionAddress": "string",
              "schemeName": "FasterPayment"
            }
            '
      x-code-samples:
        - lang: curl
          label: curl
          source: |2-

                    curl -i -X POST         'https://api-sandbox.equalsmoney.com/v2/budgets/generate-credit?accountId=F50072'         -H 'Authorization: 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",
                    "orderId": "b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5",
                    "remittersName": "William Walker",
                    "reference": "REF-123-456",
                    "bankIdentifier": "0123",
                    "remittersAddress": "41 Middle Street, Enfield, EN1 3JY",
                    "beneficiaryName": "John Smith",
                    "institutionName": "ACME",
                    "institutionAddress": "32 Marlborough Street, London, N9 7QD",
                    "schemeName": "FasterPayment"
                    }'
                
        - lang: JavaScript
          label: JavaScript
          source: |2-

                      const resp = await fetch(
                        `https://api-sandbox.equalsmoney.com/v2/budgets/generate-credit?accountId=F50072`,
                        {
                          method: 'POST',
                          headers: {
                            'Content-Type': 'application/json',
                            Authorization: 'YOUR_API_KEY_HERE'
                          },
                          body: JSON.stringify({
                            thirdPartyReference: '1e3f1734-6f7a-17e5-ae22-11cd18757ef4',
                            budgetId: 'fcf1d230-a9d0-4836-9e20-f98f3396e01b',
                            settlementPriceAmount: '200',
                            settlementPriceCurrency: 'GBP',
                            orderId: 'b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5',
                            remittersName: 'William Walker',
                            reference: 'REF-123-456',
                            bankIdentifier: '0123',
                            remittersAddress: '41 Middle Street, Enfield, EN1 3JY',
                            beneficiaryName: 'John Smith',
                            institutionName: 'ACME',
                            institutionAddress: '32 Marlborough Street, London, N9 7QD',
                            schemeName: 'FasterPayment'
                          })
                        }
                      );

                      const data = await resp.json();
                      console.log(data);
                
        - lang: Node.js
          label: Node.js
          source: |2-

                    import fetch from 'node-fetch';

                      async function run() {
                        const resp = await fetch(
                          `https://api-sandbox.equalsmoney.com/v2/budgets/generate-credit?accountId=F50072`,
                          {
                            method: 'POST',
                            headers: {
                              'Content-Type': 'application/json',
                              Authorization: 'YOUR_API_KEY_HERE'
                            },
                            body: JSON.stringify({
                              thirdPartyReference: '1e3f1734-6f7a-17e5-ae22-11cd18757ef4',
                              budgetId: 'fcf1d230-a9d0-4836-9e20-f98f3396e01b',
                              settlementPriceAmount: '200',
                              settlementPriceCurrency: 'GBP',
                              orderId: 'b3e1eced-f2bd-4d8c-9765-fbc9d1d222d5',
                              remittersName: 'William Walker',
                              reference: 'REF-123-456',
                              bankIdentifier: '0123',
                              remittersAddress: '41 Middle Street, Enfield, EN1 3JY',
                              beneficiaryName: 'John Smith',
                              institutionName: 'ACME',
                              institutionAddress: '32 Marlborough Street, London, N9 7QD',
                              schemeName: 'FasterPayment'
                            })
                          }
                        );

                        const data = await resp.json();
                        console.log(data);
                      }

                      run();
                
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````