Process Credit Card Purchase

Processes a credit card purchase transaction. Charges the specified amount to the provided credit card and returns transaction details including the PAR Pay transaction ID.

Headers
  • x-applicationSource
    Type: string
    required

    A custom HTTP header that accepts a free-form string value. It is used to identify the application making the API request. For example, if Punchh invokes the API, the value could be "punchh".

  • X-LocationId
    Type: string
    required

    The unique location identifier for the store or business location processing the transaction.

  • Content-Type
    Type: string
    required

    The media type of the request body. Must be set to application/json.

  • Authorization
    Type: string
    required

    Bearer token for API authorization. Send in the format: Bearer ACCESS_TOKEN_GOES_HERE.

Body·
application/json

Request details for purchase transaction

  • referenceNumber
    Type: string
    min length:  
    1
    max length:  
    40
    Pattern: ^[0-9]+$
    required

    A unique reference number for the transaction.

  • transactionAmountDetails
    Type: object ·
    required
  • transactionDateTimeUTC
    Type: string Format: date-time
    required

    The transaction date and time in UTC format.

  • channel
    Type: string · enum
    values
    • None
    • POS
    • Kiosk
  • invoiceNumber
    Type: string | null
    max length:  
    14

    The invoice number associated with the transaction.

  • isPreferred
    Type: boolean

    Indicates whether this saved card should be set as the user's preferred payment method.

  • oneTimeToken
    Type: string | null

    A temporary, single-use token generated to securely represent the credit card used for the purchase. This token is exchanged for a reusable paymentMethodToken that can be used for future transactions. Required if paymentMethodToken is not provided.

  • paymentMethodToken
    Type: string | null

    A reusable token generated from a one time token (oneTimeToken), representing a saved credit card for recurring payments.

  • paymentSource
    Type: string · enum
    values
    • ScanToPay
    • Online
    • None
  • saveCard
    Type: boolean

    Gets or sets a value indicating whether the user's card information should be saved for future use.

  • transactionDateTimeLocal
    Type: string | null Format: date-time

    The transaction date and time in local format.

  • userId
    Type: string | null

    The unique identifier of the user in your system for whom the card is being saved. Required when saveCard is true.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/creditcard/v1/purchase
curl https://SERVER_NAME_GOES_HERE.partech.com/creditcard/v1/purchase \
  --request POST \
  --header 'x-applicationSource: ' \
  --header 'X-LocationId: ' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --data '{
  "paymentMethodToken": "PAYMENT_TOKEN_GOES_HERE",
  "oneTimeToken": "ONETIME_TOKEN_GOES_HERE",
  "walletPay": null,
  "saveCard": true,
  "userId": null,
  "isPreferred": false,
  "referenceNumber": "258",
  "invoiceNumber": 2148,
  "transactionDateTimeUTC": "2026-03-06T11:28:29.7008363Z",
  "transactionDateTimeLocal": "2026-03-06T11:28:29.7",
  "transactionAmountDetails": {
    "taxAmount": 0,
    "discount": 0,
    "productTotalAmount": null,
    "totalAmount": 10000,
    "tip": null
  },
  "paymentSource": "ScanToPay",
  "channel": null
}'
{
  "transactionAmount": "1000.00",
  "cardNumber": "XXXX-XXXX-XXXX-1111",
  "paymentMethodToken": "paymentToken",
  "lastFourDigits": "1111",
  "cardType": "Visa",
  "expireMonth": 10,
  "expireYear": 2027,
  "cardHolderName": "CARDHOLDER_NAME_GOES_HERE",
  "parPayTransactionId": "TRANSACTION_ID_GOES_HERE",
  "statusMessage": "APPROVAL",
  "transactionDateTimeUTC": "2026-03-06T11:28:29.7009419Z",
  "status": "Success"
}