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

# Charge Tokenised PM

> Charge a payment using a tokenized payment method



## OpenAPI

````yaml POST /payments/charge-tokenised-pm
openapi: 3.0.1
info:
  title: xPay API Store
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.xpaycheckout.com
security:
  - basicAuth: []
paths:
  /payments/charge-tokenised-pm:
    post:
      description: Charge a payment using a tokenized payment method
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        description: Charge Tokenized Payment Method
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/charge-tokenised-pm'
        required: true
      responses:
        '200':
          description: Payment charged successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/charge-tokenised-pm-response'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        maxLength: 255
        pattern: ^[a-zA-Z0-9\-_:\.]+$
      description: >-
        A unique key for making the request idempotent. Must match pattern:
        `^[a-zA-Z0-9\-_:\.]+$`. See [Idempotent
        Requests](/developer-resources/idempotency) for more details.
      example: KG5LxwFBepaKHyUD
  schemas:
    charge-tokenised-pm:
      required:
        - pmId
        - customerId
        - currency
        - amount
      type: object
      properties:
        pmId:
          type: string
          description: Unique identifier of the payment method to charge
          example: pmt_ftoeKIYGC3f43frT
        customerId:
          type: string
          description: >-
            The unique identifier for the customer, generated via the
            [create-customer API](/api-reference/customers/create-customer)
          example: cus_Tfd3Jq1tZxPjYVhRQW2r3
        currency:
          type: string
          description: Three letter abbreviation of the currency
          example: USD
        amount:
          type: integer
          format: int64
          description: The amount in lowest count unit (e.g., cents for USD)
          example: 1000
        receiptId:
          $ref: '#/components/schemas/ReceiptId'
        storeFrontId:
          type: string
          description: Unique identifier of the storefront
          example: sf_sadfsdfsdf213dsaf
        metadata:
          type: object
          description: >-
            A collection of key-value pairs that can be attached to an object
            for storing additional structured information
          additionalProperties:
            type: string
          example:
            orderId: '12345'
            customerNote: Charge for recurring payments
    charge-tokenised-pm-response:
      type: object
      properties:
        intentId:
          type: string
          description: Unique identifier of the payment intent
          example: in_dHd3Jq1tZxPjYVhRQW2r3
        status:
          type: string
          description: >-
            The status of the payment intent. Refer [payment intent
            status](/products/one-time-payments/payment-statuses)
          example: SUCCESS
        errorCode:
          type: string
          description: Error code if the operation was not successful
          example: card_declined
    Error:
      required:
        - errorCode
        - errorDescription
      type: object
      properties:
        errorCode:
          type: string
          example: bad_request
        errorDescription:
          type: string
          example: Failed to read request
    ReceiptId:
      type: string
      description: Your identifier of the order
      example: order123
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````