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

# Update an existing payment link



## OpenAPI

````yaml /nickel-api-docs.yaml put /paymentLink/{paymentLinkId}
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 Payout Method
    description: Vendor bank account and delivery method management
externalDocs:
  description: Find out more about Nickel
  url: https://nickel.com
paths:
  /paymentLink/{paymentLinkId}:
    put:
      tags:
        - Payment Link
      summary: Update an existing payment link
      operationId: updatePaymentLink
      parameters:
        - name: paymentLinkId
          in: path
          description: ID of paymentLink to return
          required: true
          schema:
            type: string
      requestBody:
        description: Update an existing payment link
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLinkUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentLink'
        '400':
          description: Invalid input (e.g. invalid due date format)
          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:
    PaymentLinkUpdateRequest:
      properties:
        requestedAmountCents:
          type: integer
          format: int64
          example: 12055
        name:
          type: string
          example: INV-123
        dueDate:
          type: string
          format: date
        feePassthroughPercent:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: >-
            Percent (0-100) of the card processing fee passed through to the
            payer for this payment link. Set to null to clear the per-link
            override so the link inherits the customer/organization setting.
            Omit to leave unchanged.
          example: 100
        creditCardEnabled:
          type: boolean
          description: >-
            Whether the payer can pay this link by credit card. Set to false to
            disable card payments for this link. Omit to leave unchanged.
          example: true
        achEnabled:
          type: boolean
          description: >-
            Whether the payer can pay this link by ACH/bank transfer. Set to
            false to disable ACH payments for this link. Omit to leave
            unchanged.
          example: true
        amountEditable:
          type: boolean
          description: >-
            Whether the payer can edit the payment amount at checkout. Omit to
            leave unchanged.
          example: false
    PaymentLink:
      required:
        - id
        - name
        - status
        - url
        - payments
        - requestedAmountCents
        - completedAmountCents
      type: object
      properties:
        id:
          type: string
          example: clkqzo2y1000cx9tfohoiodq1
        requestedAmountCents:
          type: integer
          format: int64
          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'
        customerId:
          type: string
          description: >-
            Present only when a customer is associated with the payment link.
            May be omitted from the response entirely.
        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
    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.
    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
    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

````