A Transaction is a representation of an exchange that has been made, is currently being made, or is about to be made through PaidYET's REST API.

🚧

Credit Card vs Check

Transactions require either a credit card or a check, but not both.

Properties

PropertyTypeDescriptionExample
idNumber(integer)A read-only unique identifier.1234567890
amount*Number(float)Required amount in dollars. Must be 0 or greater. Dual Pricing / Surcharge fees will automatically be added if surcharging is enabled on merchant's account. Do not include surcharge fees in this amount.1.07
feesArray(of Transaction Fee objects)These fees will be added to the total amount charged on the card. Do not add dual pricing / surcharge fees here.See Transaction Fee Example
input_methodString"chip", "swipe", "keyed", etc."chip"
typeStringOptional. If omitted and amount is 0, defaults to "auth". If omitted and amount is greater than 0, defaults to "sale"."auth"
statusStringRead-only. Approved, etc."approved"
custom_fieldsArray(of Custom Field objects)Custom Fields associated to the transaction.See Custom Field Example
sourceStringapi, etc."api"
avs_resultBooleanThe AVS result.true
ipStringRead-only IP address."127.0.0.1"
billing_addressObject(Address object)The billing address for the transaction.See Address Example
emailString(email format)The customer's email address."[email protected]"
scheduleObject(Schedule object)The Schedule for the transaction.See Schedule Example
date_createdString(YYYY-MM-DD HH:MM:SS) in UTCRead-only datetime."2023-01-01 05:06:07"
customerObject(Customer object)The customer associated to the transaction. Customer's are stored in a merchant's Customer database.See Customer Example
order_idStringThe Order ID."1234567890"
invoiceStringOptional invoice number."1234567890"
ponumStringOptional PO number."1234567890"
commentsStringOptional comments about the transaction."A comment about the transaction."
errorStringRead-only. Contains the response code and authorization response message for the transaction. The format of the string is not guaranteed. Please see the REST API guide for more details."N7: CVV2 MISMATCH"
resultStringThe result of the transaction."OK"
lodgingObject(Lodging object)The lodging information associated with the transaction.See Lodging Example
batchObject(Batch object)The batch to which the transaction is associated.See Batch Example
send_receiptBooleanIf true, a receipt will be sent to the customer's email address.true
external_idStringUnique identifier used to look up customer. This is not generated by PaidYET."1234567890"
credit_card**Object(Credit Card object)The card associated to the transaction.See Credit Card Examples
check**Object(Check object)The check associated to the transaction.See Check Example

Requirements

*Required for all Transactions, optional when type is "capture".

**Only one of these items is required. A Transaction can have a credit_card or a check, not both.

Examples

📘

Not all properties are required

With the following examples, many of the properties shown are not required. Most of them should be specified only if needed except as noted in the Requirements.

With a Credit Card

{
  "credit_card": {
    "billing_address": {
      "address": "1234 Test Street S.",
      "city": "Test City",
      "state": "CA",
      "postal": 50001
    },
    "token": "abcd1234",
    "bin": 516693,
    "last4": "XXXXXXXXXXXX1111",
    "external_id": "1234567890",
    "type": "MasterCard",
    "name": "Firstname M Lastname",
    "email": "[email protected]",
    "description": "This is an example card.",
    "funding": "credit",
    "product_segment": "all",
    "product_name": "Visa Classic",
    "issuing_country": "US",
    "issuer": "Visa",
    "custom_fields": [
      {
        "key": "shoesize",
        "value": "9"
      }
    ]
  },
  "billing_address": {
    "address": "1234 Test Street S.",
    "city": "Test City",
    "state": "CA",
    "postal": 50001
  },
  "schedule": {
    "repeat": {
      "period": "monthly",
      "interval": 3
    },
    "cancel": {
      "type": "count",
      "value": "12"
    },
    "date": "2023-01-01 05:06:07"
  },
  "customer": {
    "first_name": "Firstname",
    "last_name": "Lastname",
    "contact_media": [
      {
        "type": "email",
        "value": "[email protected]"
      }
    ],
    "addresses": [
      {
        "address": "1234 Test Street S.",
        "city": "Test City",
        "state": "CA",
        "postal": 50001
      }
    ],
    "custom_fields": [
      {
        "id": 1234567890,
        "key": "shoesize",
        "value": "9"
      }
    ],
    "external_id": "1234567890"
  },
  "lodging": {
    "duration": 1,
    "check_in_date": "2024-01-01",
    "check_out_date": "2024-01-02",
    "room_rate": 12.34
  },
  "batch": {
    "date_opened": "2023-01-01 05:06:07",
    "date_closed": "2023-01-01 05:06:07",
    "external_id": "1234567890"
  },
  "amount": 1.07,
  "fees": [
    {
      "amount": 1.99,
      "description": "sanitation fee",
      "partner_id": "1234567890"
    }
  ],
  "input_method": "chip",
  "type": "auth",
  "custom_fields": [
    {
      "key": "shoesize",
      "value": "9"
    }
  ],
  "source": "api",
  "avs_result": true,
  "email": "[email protected]",
  "order_id": "1234567890",
  "invoice": "1234567890",
  "ponum": "1234567890",
  "comments": "A comment about the transaction.",
  "result": "OK",
  "send_receipt": true,
  "external_id": "1234567890"
}

With a Check

{
  "check": {
    "account": "99999999",
    "routing": "1234567890",
    "accountholder": "Firstname Lastname",
    "external_id": "1234567890"
  },
  "billing_address": {
    "address": "1234 Test Street S.",
    "city": "Test City",
    "state": "CA",
    "postal": 50001
  },
  "schedule": {
    "repeat": {
      "period": "monthly",
      "interval": 3
    },
    "cancel": {
      "type": "count",
      "value": "12"
    },
    "date": "2023-01-01 05:06:07"
  },
  "customer": {
    "first_name": "Firstname",
    "last_name": "Lastname",
    "contact_media": [
      {
        "type": "email",
        "value": "[email protected]"
      }
    ],
    "addresses": [
      {
        "address": "1234 Test Street S.",
        "city": "Test City",
        "state": "CA",
        "postal": 50001
      }
    ],
    "custom_fields": [
      {
        "id": 1234567890,
        "key": "shoesize",
        "value": "9"
      }
    ],
    "external_id": "1234567890"
  },
  "lodging": {
    "duration": 1,
    "check_in_date": "2024-01-01",
    "check_out_date": "2024-01-02",
    "room_rate": 12.34
  },
  "batch": {
    "date_opened": "2023-01-01 05:06:07",
    "date_closed": "2023-01-01 05:06:07",
    "external_id": "1234567890"
  },
  "amount": 1.07,
  "fees": [
    {
      "amount": 1.99,
      "description": "sanitation fee",
      "partner_id": "1234567890"
    }
  ],
  "input_method": "chip",
  "type": "auth",
  "custom_fields": [
    {
      "key": "shoesize",
      "value": "9"
    }
  ],
  "source": "api",
  "avs_result": true,
  "email": "[email protected]",
  "order_id": "1234567890",
  "invoice": "1234567890",
  "ponum": "1234567890",
  "comments": "A comment about the transaction.",
  "result": "OK",
  "send_receipt": true,
  "external_id": "1234567890"
}