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

# Record a debit memo on a payment link

> Adds an amount to what the payment link asks for after it was issued — a returned-check (NSF) fee, a finance charge on a past-due invoice, a misc fee, shipping added to the order. The memo is included in the link's `requestedAmountCents`, listed in its `debitMemos`, and its `description` is shown to your customer on the payment page next to the amount, so the total they are asked to pay is explained. A memo on a link that was already paid reopens it for the memo's amount. Undo with the void endpoint. To lower what is owed, record an external payment instead — a memo only ever raises the amount.

Refused on reusable payment links, archived invoices, invoices with a scheduled charge, and invoices synced with QuickBooks (add the charge to the invoice in QuickBooks; it syncs to Nickel).

Pass `externalReferenceId` — your own id for the memo, such as the debit memo number in your ERP — to make the call safe to retry: a repeat with the same reference on the same link returns the existing memo instead of creating another.



## OpenAPI

````yaml /nickel-api-docs.yaml post /paymentLink/{paymentLinkId}/debitMemo
openapi: 3.0.3
info:
  title: Nickel API
  description: >-
    This is the specification for the Nickel Rest API. The API lets you
    programmatically interact with the Nickel server. It uses resource oriented
    URLs, accepts and returns JSON encoded payloads and uses standard HTTP
    response codes. It is not a direct API to move money, but instead allows you
    to interact with Nickel as you would on a web interface.
  termsOfService: https://www.nickel.com/terms-of-service
  contact:
    email: support@nickel.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://rest.staging.nickel.com
    description: Sandbox / Staging
  - url: https://rest.nickel.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Payment
    description: Payments from your customers to you
  - name: Disbursement
    description: Payouts made from Nickel to you
  - name: Payment Link
    description: A request for payment against an invoice
  - name: Customer
    description: A customer record to request payments against
  - name: Charge Authorization
    description: >-
      An authorization for your customer to allow you to charge their payment
      method directly
  - name: Webhook
    description: Create a webhook for nickel to send updates to
  - name: File
    description: A file you can use to attach to invoices or debit authorizations
  - name: Vendor
    description: Manage vendors for accounts payable
  - name: Bill
    description: Bills from vendors and bill payments
  - name: Bill Payment Method
    description: >-
      A merchant's payment methods used to pay bills (bank accounts and cards on
      file)
  - name: Vendor Delivery Method
    description: >-
      How a vendor receives funds — bank account (ACH), check mailing address,
      or international wire (SWIFT) details
externalDocs:
  description: Find out more about Nickel
  url: https://nickel.com
paths:
  /paymentLink/{paymentLinkId}/debitMemo:
    post:
      tags:
        - Payment Link
      summary: Record a debit memo on a payment link
      description: >-
        Adds an amount to what the payment link asks for after it was issued — a
        returned-check (NSF) fee, a finance charge on a past-due invoice, a misc
        fee, shipping added to the order. The memo is included in the link's
        `requestedAmountCents`, listed in its `debitMemos`, and its
        `description` is shown to your customer on the payment page next to the
        amount, so the total they are asked to pay is explained. A memo on a
        link that was already paid reopens it for the memo's amount. Undo with
        the void endpoint. To lower what is owed, record an external payment
        instead — a memo only ever raises the amount.


        Refused on reusable payment links, archived invoices, invoices with a
        scheduled charge, and invoices synced with QuickBooks (add the charge to
        the invoice in QuickBooks; it syncs to Nickel).


        Pass `externalReferenceId` — your own id for the memo, such as the debit
        memo number in your ERP — to make the call safe to retry: a repeat with
        the same reference on the same link returns the existing memo instead of
        creating another.
      operationId: recordPaymentLinkDebitMemo
      parameters:
        - name: paymentLinkId
          in: path
          description: ID of the payment link to add the amount to
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordDebitMemoRequest'
      responses:
        '200':
          description: The new memo and the payment link with its raised total
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebitMemoResponse'
        '400':
          description: >-
            Invalid input, or the link cannot take a debit memo: it is a
            reusable payment link, archived, has a scheduled charge, or is
            synced with QuickBooks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Payment link does not belong to this API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Payment link not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            `externalReferenceId` is already recorded on this payment link as a
            debit memo with a different `amountCents` or `description` (`code`
            is `REFERENCE_CONFLICT`). Reuse a reference only for the same memo,
            or void the existing one first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RecordDebitMemoRequest:
      type: object
      required:
        - amountCents
        - description
      properties:
        amountCents:
          type: integer
          format: int64
          minimum: 1
          description: Amount to add to the payment link, in cents.
          example: 3500
        description:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            What the amount is for. Shown to your customer on the payment page,
            so write it for them.
          example: Returned check fee
        externalReferenceId:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            Your own id for this memo, used to make the request idempotent.
            Posting the same `externalReferenceId` on the same payment link
            again returns the existing memo with `200` instead of creating a
            second one, as long as `amountCents` and `description` agree with
            it; if they differ, the request is refused with `409` and code
            `REFERENCE_CONFLICT`. Voiding a memo releases its reference.
          example: DM-1042
    DebitMemoResponse:
      required:
        - debitMemo
        - paymentLink
      type: object
      properties:
        debitMemo:
          $ref: '#/components/schemas/DebitMemo'
        paymentLink:
          $ref: '#/components/schemas/PaymentLink'
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: >-
            A human-readable error message describing what went wrong. Note that
            some 500 responses may return a plain text string instead of this
            JSON object.
        code:
          type: string
          description: >-
            A stable machine-readable code, present on the errors a client can
            act on (e.g. `SHARED_ACCOUNT` on a 409 from the ACH debit
            authorization upload, `REFERENCE_CONFLICT` on a 409 from recording
            an external payment or a debit memo). Absent otherwise.
    DebitMemo:
      required:
        - id
        - amountCents
        - description
        - voided
        - createdAt
      type: object
      properties:
        id:
          type: string
          example: cmrb2k7w1000hsf02q8d9x3vn
        amountCents:
          type: integer
          format: int64
          example: 3500
        description:
          type: string
          description: Shown to your customer on the payment page next to the amount.
          example: Returned check fee
        voided:
          type: boolean
          description: >-
            Whether the memo has been voided. A voided memo counts toward
            nothing and is not listed on the payment link; it is only returned
            by the void endpoint.
          example: false
        externalReferenceId:
          type: string
          nullable: true
          description: Your own id for the memo, as passed when it was recorded.
          example: DM-1042
        createdAt:
          type: string
          format: date-time
    PaymentLink:
      required:
        - id
        - name
        - status
        - url
        - payments
        - externalPayments
        - debitMemos
        - debitMemoAmountCents
        - requestedAmountCents
        - completedAmountCents
      type: object
      properties:
        id:
          type: string
          example: clkqzo2y1000cx9tfohoiodq1
        requestedAmountCents:
          type: integer
          format: int64
          description: The total the link asks for, including its live debit memos.
          example: 12055
        name:
          type: string
          example: INV-123
        dueDate:
          type: string
          format: date
          nullable: true
        status:
          type: string
          example: ACTIVE
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        externalPayments:
          type: array
          description: >-
            Live payments recorded against this link outside Nickel (a mailed
            check, cash). Voided records are omitted. They count toward
            completedAmountCents alongside payments.
          items:
            $ref: '#/components/schemas/ExternalPayment'
        debitMemos:
          type: array
          description: >-
            Live amounts added to this link after it was issued (an NSF fee, a
            finance charge), oldest first. Voided memos are omitted. They are
            included in requestedAmountCents.
          items:
            $ref: '#/components/schemas/DebitMemo'
        debitMemoAmountCents:
          type: integer
          format: int64
          description: >-
            Sum of debitMemos. requestedAmountCents minus this is the link's own
            amount.
          example: 0
        customerId:
          type: string
          description: >-
            ID of the customer the payment link belongs to. Omitted for links
            created in the dashboard without a customer.
        url:
          type: string
          format: uri
          example: https://nickel.nickelpayments.com/pay/Ahndhz
        completedAmountCents:
          type: integer
          format: int64
        feePassthroughPercent:
          type: integer
          nullable: true
          description: >-
            Percent (0-100) of the card processing fee passed through to the
            payer for this payment link. null means no per-link override (the
            customer/organization setting applies).
          example: 100
        creditCardEnabled:
          type: boolean
          nullable: true
          description: >-
            Whether the payer can pay this link by credit card. null means no
            per-link override (the organization setting applies).
          example: true
        achEnabled:
          type: boolean
          nullable: true
          description: >-
            Whether the payer can pay this link by ACH/bank transfer. null means
            no per-link override (the organization setting applies).
          example: true
        amountEditable:
          type: boolean
          description: Whether the payer can edit the payment amount at checkout.
          example: false
    Payment:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          example: SUCCEEDED
        fees:
          type: array
          items:
            $ref: '#/components/schemas/Fee'
        amountInCents:
          type: integer
          format: int64
          example: 10000
        chargedAmountInCents:
          type: integer
          format: int64
          example: 10290
        platformFeeInCents:
          type: integer
          format: int64
          example: 290
        paymentLinkId:
          type: string
          nullable: true
        paymentMethod:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod'
        disbursement:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Disbursement'
        refunds:
          type: array
          items:
            $ref: '#/components/schemas/Refund'
        createdAt:
          type: number
        estimatedDisbursementDate:
          type: string
          nullable: true
    ExternalPayment:
      required:
        - id
        - amountCents
        - paidAt
        - voided
      type: object
      properties:
        id:
          type: string
          example: cmr9zx1bq000gsf02h1d5w4t8
        amountCents:
          type: integer
          format: int64
          example: 2500
        paidAt:
          type: string
          format: date
          description: The date the money moved, as you stated it (YYYY-MM-DD).
          example: '2026-08-30'
        voided:
          type: boolean
          description: >-
            Whether the record has been voided. A voided record counts toward
            nothing and is not listed on the payment link; it is only returned
            by the void endpoint.
          example: false
        externalReferenceId:
          type: string
          nullable: true
          description: >-
            Your own id for this money, as passed when the record was created.
            Null when none was given (records made in the Nickel dashboard).
          example: txn_8f3a2c
    Fee:
      type: object
      properties:
        type:
          type: string
          example: CREDIT_CARD_FEE
        amountInCents:
          type: integer
          format: int64
          example: 290
    PaymentMethod:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - ACH
            - Card
        achDetails:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ACHDetails'
        cardDetails:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardDetails'
        billingDetails:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/BillingDetails'
    Disbursement:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          example: PENDING
        amountInCents:
          type: integer
          format: int64
          example: 10000
        bankName:
          type: string
          example: JP Morgan Chase
        accountNumberLastFour:
          type: string
        paymentIds:
          type: array
          items:
            type: string
            example: clkqzo2y1000cx9tfohoiodq1
        createdAt:
          type: string
          format: date
          nullable: true
        paidAt:
          type: string
          format: date
          nullable: true
    Refund:
      type: object
      properties:
        id:
          type: string
        amountCents:
          type: integer
          format: int64
          example: 515
        refundDate:
          type: string
          format: date-time
        voided:
          type: boolean
    ACHDetails:
      type: object
      properties:
        bankName:
          type: string
          example: JP Morgan Chase
        routingNumber:
          type: string
        accountNumberLastFour:
          type: string
    CardDetails:
      type: object
      properties:
        brand:
          type: string
          nullable: true
          example: visa
        last4:
          type: string
          nullable: true
        holderName:
          type: string
          nullable: true
        expMonth:
          type: string
          nullable: true
          example: '2'
        expYear:
          type: string
          nullable: true
          example: '2030'
    BillingDetails:
      type: object
      properties:
        name:
          type: string
          nullable: true
        companyName:
          type: string
          nullable: true
        street:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        zip:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````