# Create a test payment

This endpoint is for creating fake payments that can be used to test your integration with our system. After registering a member, payments can be generated for that member by providing the memberId that you specified during registration. If memberId is null the payment will utilise a random card number not associated with any member and the response will include a memberReference value that can be used to identify this non-member customer in future test payments.

Endpoint: POST /payments/test
Version: 1.0
Security: JWT

## Header parameters:

  - `Authorization` (string, required)

## Request fields (application/json):

  - `locationId` (string, required)
    Tyro Connect's identifier for the location.
    Example: "tc-testlocation-2000"

  - `paymentType` (string, required)
    The type of payment being made
    Enum: "PURCHASE", "REFUND", "CASHOUT", "OPEN_PRE_AUTH", "CLOSE_PRE_AUTH", "VOID"

  - `paymentSource` (string, required)
    The method used to make the payment
    Enum: "EFTPOS", "ONLINE"

  - `goodsAndServicesAmount` (number)
    The amount paid for goods and services

  - `tipAmount` (number)
    The amount paid as part of a tip

  - `surchargeAmount` (number)
    The amount paid as part of a surcharge

  - `cashoutAmount` (number)
    The amount paid as part of a cash withdrawal

## Response 404 fields (application/json):

  - `error` (string)
    The error message.


