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

# Make payments using charge authorizations

> Process payments for one or more payment links across multiple charge authorizations in a single request.



## OpenAPI

````yaml /nickel-api-docs.yaml post /chargeAuthorization/pay
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:
  /chargeAuthorization/pay:
    post:
      tags:
        - Charge Authorization
      summary: Make payments using charge authorizations
      description: >-
        Process payments for one or more payment links across multiple charge
        authorizations in a single request.
      operationId: payWithChargeAuthorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/chargeAuthorization_pay_body'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_2'
        '400':
          description: Invalid input (e.g. validation error or invalid withdrawal date)
          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:
    chargeAuthorization_pay_body:
      required:
        - payments
      type: object
      properties:
        payments:
          type: array
          description: Array of charges to process
          items:
            $ref: '#/components/schemas/ChargeAuthorizationPayment'
        idempotencyKey:
          type: string
    inline_response_200_2:
      type: object
      properties:
        paymentLinks:
          type: array
          description: Successfully processed payment links
          items:
            $ref: '#/components/schemas/ChargeAuthorizationPaymentResult'
        errors:
          type: array
          description: Payment links that failed to process
          items:
            $ref: '#/components/schemas/ChargeAuthorizationPaymentError'
    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.
    ChargeAuthorizationPayment:
      required:
        - chargeAuthorizationId
        - paymentLinks
      type: object
      properties:
        chargeAuthorizationId:
          type: string
          description: ID of the charge authorization to use for payment
        paymentLinks:
          type: array
          items:
            $ref: '#/components/schemas/ChargeAuthorizationPaymentInput'
    ChargeAuthorizationPaymentResult:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        url:
          type: string
        dueDate:
          type: string
          nullable: true
        customerId:
          type: string
          description: >-
            Present only when a customer is associated with the payment link.
            May be omitted from the response entirely.
        requestedAmountCents:
          type: integer
        completedAmountCents:
          type: integer
        paymentId:
          type: string
          description: ID of the payment created for this invoice
          nullable: true
    ChargeAuthorizationPaymentError:
      type: object
      properties:
        paymentLinkId:
          type: string
        paymentLinkName:
          type: string
          nullable: true
        error:
          type: string
    ChargeAuthorizationPaymentInput:
      required:
        - paymentLinkId
      type: object
      properties:
        paymentLinkId:
          type: string
          description: ID of the payment link to pay
        withdrawalDate:
          type: string
          description: >-
            Schedule the payment for a future date (YYYY-MM-DD). If omitted, the
            payment is processed immediately. Date must be today or later.
          format: date
        amountCents:
          type: integer
          description: >-
            Amount to charge in cents. If omitted, charges the remaining balance
            on the invoice.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````