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

# Update a payment link

> Set `status: "closed"` to void an unpaid link, or adjust `expiresAt`, `redirectUrl` and `branding`. Amount, currency and email are fixed — create a new link to change them.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/payment-links/{id}
openapi: 3.1.0
info:
  title: Chipper Platform API
  version: '2026-02-20'
  description: >-
    Payouts, collections, and FX across African rails — bank, mobile money, and
    stablecoins — through one API.
servers:
  - url: https://sandbox-api.platform.chipper.ai
    description: Sandbox (sk_test_ keys — simulated rails, no real money)
  - url: https://api.platform.chipper.ai
    description: Production (sk_live_ keys)
security:
  - bearerAuth: []
paths:
  /v1/payment-links/{id}:
    patch:
      tags:
        - Payment links
      summary: Update a payment link
      description: >-
        Set `status: "closed"` to void an unpaid link, or adjust `expiresAt`,
        `redirectUrl` and `branding`. Amount, currency and email are fixed —
        create a new link to change them.
      parameters:
        - schema:
            type: string
            description: Payment link id.
            example: pl_p95akjfs339uy9icpelj
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - closed
                expiresAt:
                  type:
                    - string
                    - 'null'
                  format: date-time
                redirectUrl:
                  type:
                    - string
                    - 'null'
                  format: uri
                branding:
                  type:
                    - object
                    - 'null'
                  properties:
                    logoUrl:
                      type: string
                      format: uri
                    accentColor:
                      type: string
                    businessName:
                      type: string
      responses:
        '200':
          description: The updated link.
          content:
            application/json:
              schema:
                type: object
                properties:
                  paymentLink:
                    $ref: '#/components/schemas/PaymentLink'
                required:
                  - paymentLink
        '400':
          description: Invalid request — the body failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: validation_error
                message: Request validation failed
                requestId: req_q7vei435zifs51ia0lqr
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: unauthorized
                message: Invalid API key
                requestId: req_q7vei435zifs51ia0lqr
        '403':
          description: The API key lacks the required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: forbidden
                message: API key does not have the required scope
                requestId: req_q7vei435zifs51ia0lqr
        '404':
          description: No such resource in this organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: not_found
                message: Payment link not found
                requestId: req_q7vei435zifs51ia0lqr
      security:
        - bearerAuth: []
components:
  schemas:
    PaymentLink:
      type: object
      properties:
        id:
          type: string
          description: 'Sandbox ids carry a stack marker: `pl_test_…`.'
          example: pl_p95akjfs339uy9icpelj
        url:
          type: string
          description: Send this to the customer — Chipper hosts the checkout.
          example: >-
            https://chipper-platform-checkout-web.onrender.com/pl_p95akjfs339uy9icpelj
        parentType:
          type:
            - string
            - 'null'
          enum:
            - payment_page
          description: >-
            `payment_page` when this link was spawned by a page; null when you
            created it directly.
          example: null
        parentId:
          type:
            - string
            - 'null'
          example: null
        email:
          type: string
          description: The customer this link is for.
          example: ama@example.com
        amount:
          type: string
          description: Decimal string — never parse as float for arithmetic.
          example: '250.00'
        currency:
          type: string
          example: GHS
        title:
          type: string
          example: 'Invoice #1042'
        description:
          type:
            - string
            - 'null'
          example: August catering
        status:
          type: string
          enum:
            - active
            - paid
            - expired
            - closed
        statusMessage:
          type:
            - string
            - 'null'
        totalReceived:
          type: string
          description: Gross amount settled so far.
          example: '0.00'
        remaining:
          type: string
          description: '`amount` minus `totalReceived`, floored at zero.'
          example: '250.00'
        overpaymentAmount:
          type:
            - string
            - 'null'
          description: Set when the payer sent more than `amount` (crypto).
          example: null
        allowedMethods:
          type: array
          items:
            type: string
            enum:
              - mobile_money
              - bank_transfer
              - crypto
          description: Rails the payer may choose from on the hosted checkout.
          example:
            - mobile_money
            - bank_transfer
        allowedCryptoAssets:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            Stablecoins accepted when `crypto` is allowed. Null = any supported
            asset.
          example: null
        customFields:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: orderNumber
              type:
                type: string
                example: text
              required:
                type: boolean
            required:
              - name
              - type
              - required
          description: Extra inputs the payer fills in at checkout.
        branding:
          type:
            - object
            - 'null'
          properties:
            logoUrl:
              type: string
              format: uri
            accentColor:
              type: string
              example: '#6642D1'
            businessName:
              type: string
              example: Zouk Inc.
          description: >-
            Shown on the hosted checkout. Null falls back to your organization
            defaults.
          example:
            accentColor: '#6642D1'
            businessName: Zouk Inc.
        redirectUrl:
          type:
            - string
            - 'null'
          description: Where the payer is sent after paying.
          example: https://zouk.example/thanks
        metadata:
          type: object
          additionalProperties: {}
        expiresAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Null = never expires.
        createdAt:
          type: string
          format: date-time
          example: '2026-08-01T09:12:44.000Z'
        updatedAt:
          type: string
          format: date-time
        customerReference:
          type:
            - string
            - 'null'
          description: Your idempotency key.
          example: inv-1042
      required:
        - id
        - url
        - parentType
        - parentId
        - email
        - amount
        - currency
        - title
        - description
        - status
        - statusMessage
        - totalReceived
        - remaining
        - overpaymentAmount
        - allowedMethods
        - allowedCryptoAssets
        - customFields
        - branding
        - redirectUrl
        - metadata
        - expiresAt
        - createdAt
        - updatedAt
        - customerReference
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable machine-readable code.
        message:
          type: string
          description: Human-readable explanation.
        requestId:
          type: string
          description: Echoed in the x-request-id response header — quote it to support.
      required:
        - error
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `sk_test_…` (sandbox) or `sk_live_…` (production).'

````