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

# Charge a Credit Card

> This endpoint allows you to charge a credit card using the PAN Data or a Token. This endpoint will process the charge and return a token
representing the card that can be used for transactions as well as the transactionId and the customerUUID if requested.
If you pass a customer UUID or a customer phone number, then a customer record will be created or retrieved if it already exists, also making the customer UUID available for the purpose of associating charges to a customer.
You must be PCI Compliant (have an AoC on file with Dime Payments) to process PAN Data. A token can optionally be provided to process charges without requiring PCI compliance as no PAN data is being sent.



## OpenAPI

````yaml https://app.dimepayments.com/openapi.yaml post /api/transaction/charge-card
openapi: 3.0.3
info:
  title: Dime Payments API Documentation
  description: >-
    A simple, basic API for managing Merchants through Dime Payments. JSON based
    REST API
  version: 1.0.0
servers:
  - url: https://app.dimepayments.com
security:
  - default: []
tags:
  - name: Merchant management
    description: ''
  - name: Transaction management
    description: >-

      APIs for managing transactions.  Depending on API KEY permissions, one
      should be able to

      charge credit cards, ACH, Google/Apple Pay wallets along with other
      functions.
  - name: Addresses
    description: |-

      APIs for managing customer addresses
  - name: Customer management
    description: >-

      APIs for managing customers.  Depending on API KEY permissions, one should
      be able to

      list, create, update, and delete customers along with several other
      customer specific requests.
  - name: Deposit management
    description: ''
  - name: Invoice management
    description: >-

      APIs for managing invoices. Depending on API KEY permissions, one should
      be

      able to list, create, update, delete, and send invoices, manage their line

      items, and manage recurring-invoice schedules. Every request is scoped to
      a

      single Merchant via the required `data.sid`.
  - name: Payment Method management
    description: >-

      APIs for managing payment methods associated with customers.  Depending on
      API KEY permissions, one should be able to

      list, show, create, update, and delete payment methods.
  - name: Recurring Payments management
    description: >-

      APIs for managing recurring payments.  Depending on API KEY permissions,
      one should be able to

      create, edit, pause, cancel along with other functions.
  - name: Zapier
    description: >-

      APIs for use through Zapier.  Depending on API KEY permissions, one should
      be able to

      see customers and transactions data.
paths:
  /api/transaction/charge-card:
    post:
      tags:
        - Transaction management
      summary: Charge a Credit Card
      description: >-
        This endpoint allows you to charge a credit card using the PAN Data or a
        Token. This endpoint will process the charge and return a token

        representing the card that can be used for transactions as well as the
        transactionId and the customerUUID if requested.

        If you pass a customer UUID or a customer phone number, then a customer
        record will be created or retrieved if it already exists, also making
        the customer UUID available for the purpose of associating charges to a
        customer.

        You must be PCI Compliant (have an AoC on file with Dime Payments) to
        process PAN Data. A token can optionally be provided to process charges
        without requiring PCI compliance as no PAN data is being sent.
      operationId: chargeACreditCard
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: ''
                  example: []
                  properties:
                    amount:
                      type: number
                      description: ''
                      example: 4326.41688
                    sid:
                      type: number
                      description: ID of merchant account processing the charge.
                      example: 1234567
                    phone:
                      type: string
                      description: Must be the phone number in e164 format.
                      example: '+177012345678'
                    customer_uuid:
                      type: string
                      description: Must be a valid UUID.
                      example: 977e5426-8d13-3824-86aa-b092f8ae52c5
                    email:
                      type: string
                      description: 'The email of a customer. Max: 50.'
                      example: gbailey@example.net
                      nullable: true
                    memo:
                      type: string
                      description: >-
                        A string containing memo related information, such as an
                        invoice ID. Max: 120.
                      example: architecto
                      nullable: true
                    token:
                      type: string
                      description: >-
                        An optional token to be used to reference a stored card
                        for processing.
                      example: abc123
                    cardholder_name:
                      type: string
                      description: 'The name of the cardholder. Max: 50.'
                      example: John Doe
                    card_number:
                      type: number
                      description: 'The credit card number. Min: 15. Max: 16.'
                      example: 1231231231231200
                    expiration_date:
                      type: string
                      description: Expiration date of the card, in the form mm/YYYY.
                      example: 01/2025
                    cvv:
                      type: number
                      description: 'optional The card''s CVV. Min: 3, Max: 4.'
                      example: 123
                      nullable: true
                    billing_address:
                      type: object
                      description: ''
                      example: []
                      properties:
                        first_name:
                          type: string
                          description: >-
                            required_without:data.token. Must not be greater
                            than 50 characters.
                          example: m
                          nullable: true
                        last_name:
                          type: string
                          description: Must not be greater than 50 characters.
                          example: i
                          nullable: true
                        addr1:
                          type: string
                          description: 'The cardholder''s address line 1. Max: 55.'
                          example: 1234 Main St
                          nullable: true
                        addr2:
                          type: string
                          description: 'The cardholder''s address line 2. Max: 55.'
                          example: Suite 100
                          nullable: true
                        city:
                          type: string
                          description: 'The cardholder''s city. Max: 55.'
                          example: Atlanta
                          nullable: true
                        state:
                          type: string
                          description: 'The cardholder''s state. Max: 2.'
                          example: NY
                          nullable: true
                        zip:
                          type: number
                          description: 'The cardholder''s ZIP code. Digits: 5.'
                          example: 10001
                      required:
                        - zip
                    shipping_address:
                      type: object
                      description: ''
                      example: []
                      properties:
                        addr1:
                          type: string
                          description: 'optional The first address line. Max: 50.'
                          example: 123 A Street
                          nullable: true
                        addr2:
                          type: string
                          description: 'optional The second address line. Max: 50.'
                          example: Suite 123
                          nullable: true
                        city:
                          type: string
                          description: 'optional The city. Max: 50.'
                          example: Alpharetta
                        state:
                          type: string
                          description: 'optional The state. Max: 2.'
                          example: GA
                        zip:
                          type: integer
                          description: 'optional The state. Max: 5.'
                          example: 0
                    uuid:
                      type: string
                      description: The UUID of the customer record.
                      example: 60dac128-28da-41ae-8632-aee299de13fd
                  required:
                    - amount
                    - sid
                    - cardholder_name
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    transaction_type: Credit Card
                    transaction_status: Success
                    transaction_status_description: Transaction Successful
                    transaction_number: '1234567890'
                    transaction_date: '2020-01-01'
                    fund_date: '2020-01-01'
                    settle_date: '2020-01-01'
                    amount: '100.00'
                    description: a memo concerning this transaction
                    status_code: '00'
                    status_text: APPROVAL
                    email: email@email.com
                    phone: '+17701234567'
                    customer_uuid: 66f1c230-1337-5g59-b43c-1bcb83adfaaa
                    multi_use_token: abcdefg123456790
                    pending: true
                    transaction_info_id: '1234567890'
                    parent_transaction_info_id: '1234567890'
                    billing_address:
                      first_name: John
                      last_name: Doe
                      addr1: 123 Main St
                      addr2: Suite 100
                      city: New York
                      state: NY
                    shipping_address:
                      addr1: 12 Street Ave
                      addr2: Suite 123
                      city: Boulder
                      state: CO
                      zip: '80302'
                properties:
                  data:
                    type: object
                    properties:
                      transaction_type:
                        type: string
                        example: Credit Card
                      transaction_status:
                        type: string
                        example: Success
                        description: The status of the transaction.
                      transaction_status_description:
                        type: string
                        example: Transaction Successful
                        description: The description of the transaction status.
                      transaction_number:
                        type: string
                        example: '1234567890'
                        description: >-
                          The unique transaction used for referencing in the
                          future.
                      transaction_date:
                        type: string
                        example: '2020-01-01'
                        description: The date the transaction was processed.
                      fund_date:
                        type: string
                        example: '2020-01-01'
                        description: The date the funds were deposited into the account.
                      settle_date:
                        type: string
                        example: '2020-01-01'
                        description: The date the funds were settled into the account.
                      amount:
                        type: string
                        example: '100.00'
                        description: The amount of the transaction.
                      description:
                        type: string
                        example: a memo concerning this transaction
                        description: The original memo field.
                      status_code:
                        type: string
                        example: '00'
                        description: Response code from processor.
                      status_text:
                        type: string
                        example: APPROVAL
                        description: Response text from processor.
                      email:
                        type: string
                        example: email@email.com
                        description: >-
                          The email address of a customer record, if one was
                          created/provided.
                      phone:
                        type: string
                        example: '+17701234567'
                        description: >-
                          The phone number of a customer record, if one was
                          created/provided.
                      customer_uuid:
                        type: string
                        example: 66f1c230-1337-5g59-b43c-1bcb83adfaaa
                        description: >-
                          The unique UUID of the merchant's customer, only if a
                          customer record was created.
                      multi_use_token:
                        type: string
                        example: abcdefg123456790
                        description: A token used to charge against a stored credit card.
                      pending:
                        type: boolean
                        example: true
                        description: The pending status of the transaction.
                      transaction_info_id:
                        type: string
                        example: '1234567890'
                        description: >-
                          The transaction's info id that can be used in requests
                          to other API endpoints to look up a specific
                          transaction.
                      parent_transaction_info_id:
                        type: string
                        example: '1234567890'
                        description: >-
                          The transaction's parent's info id that can be used in
                          requests to other API endpoints to look up a specific
                          transaction.
                      billing_address:
                        type: object
                        properties:
                          first_name:
                            type: string
                            example: John
                            description: The first name field.
                          last_name:
                            type: string
                            example: Doe
                            description: The last name field.
                          addr1:
                            type: string
                            example: 123 Main St
                            description: The first address line.
                          addr2:
                            type: string
                            example: Suite 100
                            description: The second address line.
                          city:
                            type: string
                            example: New York
                            description: The city field.
                          state:
                            type: string
                            example: NY
                            description: The state field.
                      shipping_address:
                        type: object
                        properties:
                          addr1:
                            type: string
                            example: 12 Street Ave
                            description: The first address line.
                          addr2:
                            type: string
                            example: Suite 123
                            description: The second address line.
                          city:
                            type: string
                            example: Boulder
                            description: The city field.
                          state:
                            type: string
                            example: CO
                            description: The state field.
                          zip:
                            type: string
                            example: '80302'
                            description: The zip field.
        '400':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: ''
                    type: object
                    example:
                      errors:
                        sid:
                          - The sid is required.
                    properties:
                      errors:
                        type: object
                        properties:
                          sid:
                            type: array
                            example:
                              - The sid is required.
                            items:
                              type: string
                  - description: ''
                    type: object
                    example:
                      data:
                        transaction_type: Credit Card
                        transaction_status: Failed
                        transaction_status_description: Transaction failed
                        transaction_number: '1234567890'
                        transaction_date: '2020-01-01'
                        fund_date: '2020-01-01'
                        settle_date: '2020-01-01'
                        amount: '100.00'
                        description: a memo concerning this transaction
                        status_code: '05'
                        status_text: DECLINE
                        email: email@email.com
                        phone: '+17701234567'
                        customer_uuid: 66f1c230-1337-5g59-b43c-1bcb83adfaaa
                        multi_use_token: abcdefg123456790
                        pending: true
                        transaction_info_id: '1234567890'
                        parent_transaction_info_id: '1234567890'
                        billing_address:
                          first_name: John
                          last_name: Doe
                          addr1: 123 Main St
                          addr2: Suite 100
                          city: New York
                          state: NY
                        shipping_address:
                          addr1: 12 Street Ave
                          addr2: Suite 123
                          city: Boulder
                          state: CO
                          zip: '80302'
                    properties:
                      data:
                        type: object
                        properties:
                          transaction_type:
                            type: string
                            example: Credit Card
                          transaction_status:
                            type: string
                            example: Failed
                            description: The status of the transaction.
                          transaction_status_description:
                            type: string
                            example: Transaction failed
                            description: The description of the transaction status.
                          transaction_number:
                            type: string
                            example: '1234567890'
                            description: >-
                              The unique transaction used for referencing in the
                              future.
                          transaction_date:
                            type: string
                            example: '2020-01-01'
                            description: The date the transaction was processed.
                          fund_date:
                            type: string
                            example: '2020-01-01'
                            description: >-
                              The date the funds were deposited into the
                              account.
                          settle_date:
                            type: string
                            example: '2020-01-01'
                            description: The date the funds were settled into the account.
                          amount:
                            type: string
                            example: '100.00'
                            description: The amount of the transaction.
                          description:
                            type: string
                            example: a memo concerning this transaction
                            description: The original memo field.
                          status_code:
                            type: string
                            example: '05'
                            description: Response code from processor.
                          status_text:
                            type: string
                            example: DECLINE
                            description: Response text from processor.
                          email:
                            type: string
                            example: email@email.com
                            description: >-
                              The email address of a customer record, if one was
                              created/provided.
                          phone:
                            type: string
                            example: '+17701234567'
                            description: >-
                              The phone number of a customer record, if one was
                              created/provided.
                          customer_uuid:
                            type: string
                            example: 66f1c230-1337-5g59-b43c-1bcb83adfaaa
                            description: >-
                              The unique UUID of the merchant's customer, only
                              if a customer record was created.
                          multi_use_token:
                            type: string
                            example: abcdefg123456790
                            description: >-
                              A token used to charge against a stored credit
                              card.
                          pending:
                            type: boolean
                            example: true
                            description: The pending status of the transaction.
                          transaction_info_id:
                            type: string
                            example: '1234567890'
                            description: >-
                              The transaction's info id that can be used in
                              requests to other API endpoints to look up a
                              specific transaction.
                          parent_transaction_info_id:
                            type: string
                            example: '1234567890'
                            description: >-
                              The transaction's parent's info id that can be
                              used in requests to other API endpoints to look up
                              a specific transaction.
                          billing_address:
                            type: object
                            properties:
                              first_name:
                                type: string
                                example: John
                                description: The first name field.
                              last_name:
                                type: string
                                example: Doe
                                description: The last name field.
                              addr1:
                                type: string
                                example: 123 Main St
                                description: The first address line.
                              addr2:
                                type: string
                                example: Suite 100
                                description: The second address line.
                              city:
                                type: string
                                example: New York
                                description: The city field.
                              state:
                                type: string
                                example: NY
                                description: The state field.
                          shipping_address:
                            type: object
                            properties:
                              addr1:
                                type: string
                                example: 12 Street Ave
                                description: The first address line.
                              addr2:
                                type: string
                                example: Suite 123
                                description: The second address line.
                              city:
                                type: string
                                example: Boulder
                                description: The city field.
                              state:
                                type: string
                                example: CO
                                description: The state field.
                              zip:
                                type: string
                                example: '80302'
                                description: The zip field.
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Permission Denied.
                properties:
                  message:
                    type: string
                    example: Permission Denied.
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        You can retrieve your token by visiting your dashboard and clicking
        <b>Generate API token under your profile in top right</b>.

````