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
Property | Type | Description | Example |
---|---|---|---|
|
| A read-only unique identifier. |
|
|
| Required amount in dollars. Must be |
|
|
| These fees will be added to the total amount charged on the card. Do not add dual pricing / surcharge fees here. | |
|
|
**This is a response field only and is not passed in to the API. |
|
|
| Optional. If omitted and amount is |
|
|
| Approved, Declined, Error
|
|
|
| Custom Fields associated to the transaction. | |
|
| api, etc. |
|
|
| The AVS result. ** This is a response field only and is not passed in to the API. |
|
|
| Read-only IP address. |
|
|
| Cardholder IP address. This field is sent in to the PaidYET API and is used in the PaidYET fraud prevention tools. This is a recommended field. |
|
|
| The billing address for the transaction. | See Address Example |
|
| The customer's email address. | |
|
| The Schedule for the transaction. | See Schedule Example |
|
| Read-only datetime. |
|
|
| The customer associated to the transaction. Customer's are stored in a merchant's Customer database. | See Customer Example |
|
| The Order ID. |
|
|
| Optional invoice number. |
|
|
| Optional PO number. (max 25 characters) |
|
|
| Optional comments about the transaction. |
|
|
| Read-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. **This is a response field only and is not passed in to the API. |
|
|
| The result of the transaction. |
|
|
| The lodging information associated with the transaction. | See Lodging Example |
|
| The batch to which the transaction is associated. | See Batch Example |
|
| If |
|
|
| Unique identifier used to look up customer. This is not generated by PaidYET. |
|
|
| The card associated to the transaction. | |
|
| 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.
**This is a response field only and is not passed in to the API.
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.
Sample Request - With a Credit Card
{
"credit_card": {
"billing_address": {
"address": "1234 Test Street S.",
"city": "Test City",
"state": "CA",
"postal": 50001
},
"number": "4000100011112224",
"external_id": "1234567890",
"name": "Firstname M Lastname",
"email": "[email protected]",
"description": "This is an example card."
},
"billing_address": {
"address": "1234 Test Street S.",
"city": "Test City",
"state": "CA",
"postal": 50001
},
"amount": 1.07,
"type": "sale",
"custom_fields": [
{
"key": "shoesize",
"value": "9"
}
],
"email": "[email protected]",
"order_id": "1234567890",
"invoice": "1234567890",
"purchase_order_number": "1234567890",
"comments": "A comment about the transaction.",
"send_receipt": true,
"external_id": "1234567890"
}
Sample Response- 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"
},
"billing_address": {
"address": "1234 Test Street S.",
"city": "Test City",
"state": "CA",
"postal": 50001
},
"batch": {
"date_opened": "2023-01-01 05:06:07",
"date_closed": "2023-01-01 05:06:07",
"external_id": "1234567890"
},
"amount": 1.07,
"input_method": "api",
"type": "sale",
"custom_fields": [
{
"key": "shoesize",
"value": "9"
}
],
"source": "api",
"avs_result": "M",
"email": "[email protected]",
"order_id": "1234567890",
"invoice": "1234567890",
"purchase_order_number": "1234567890",
"comments": "A comment about the transaction.",
"result": "OK",
"send_receipt": true,
"external_id": "1234567890"
}
Sample Request- With a Check
{
"check": {
"account": "111111",
"routing": "999999992",
"accountholder": "Firstname Lastname",
"external_id": "1234567890"
},
"billing_address": {
"address": "1234 Test Street S.",
"city": "Test City",
"state": "CA",
"postal": 50001
},
"amount": 1.07,
"custom_fields": [
{
"key": "shoesize",
"value": "9"
}
],
"email": "[email protected]",
"order_id": "1234567890",
"invoice": "1234567890",
"purchase_order_number": "1234567890",
"comments": "A comment about the transaction.",
}