Appearance
Transactions
This page provides details on how to process transactions through the API, including request and response formats, supported payment methods, responses and error handling.
Process
Process a transaction through the gateway.
TIP
If you do not have a default processor set, you must include the processor_id
property in the request body or the transaction will fail.
TIP
Base Amount - If you are using base_amount it will be the base amount of the transaction. The surcharge and other related fees(if applicable) will be calculated and added unless those values are specifically passed in.
Amount - This will be the final amount you want charged and will include all surcharges and related fees(if applicable).
Request Method:
POST
URL Endpoint:
/api/transaction
Name | Type | Default | Description | Required |
---|---|---|---|---|
idempotency_key | uint(uuid format) | used to identify duplicate transactions. Default time is 5 minutes | ||
type | string | "sale", "authorize", "verification" or "credit" | ||
amount | integer | Amount to process in cents (should contain all applicable fees and taxes) (1299 = $12.99) | ||
base_amount | integer | Amount to process in cents (surcharge and related fees will be added to this amount during processing) (1299 = $12.99) | ||
tax_exempt | boolean | false | Is the transaction tax exempt | Required for L3 |
tax_amount | integer | 0 | Tax Amount in cents | Required for L3 |
shipping_amount | integer | 0 | Shipping Amount in cents (should be included in Amount) | |
discount_amount | integer | 0 | Discount Amount in cents (should be included in Amount) | |
tip_amount | integer | 0 | Tip Amount in cents (should be included in Amount) | |
currency | string | "USD" | ISO 4217 currency (ex "USD") | |
description | string | "" | Text field for miscellaneous notes (max 255 characters) | |
order_id | string | Supports up to 15 alphanumeric characters | Required for L3 | |
po_number | string | Supports up to 15 alphanumeric characters | ||
processor_id | string | "" | Designates a specific processor for the transaction. If no value is provided, the transaction will run against the default processor set on your gateway. If no value is provided and there is no default set, the transaction will fail. | see description |
ip_address | string | Server IP | IPv4 or IPv6 value of the end user | |
allow_partial_payment | bool | false | Allow partial transactions to be approved (only if supported by processor) | |
email_receipt | boolean | false | If true, sends an email receipt (email_address must be provided) | |
email_address | string | Email address (must be valid email format, "example@mail.com") | required if email_receipt is true | |
create_vault_record | boolean | false | If true, triggers the creation of a customer vault record after a successful transaction. Multiple transactions with the same details will create duplicative customer records. | |
vendor_id | string | "" | Vendor ID passed along to certain processors if supported (Special Field, only use if instructed by support) | |
billing_method | string | "straight" | "straight", "initial_recurring", or "recurring" | |
summary_commodity_code | string | Summary Commodity Code 4 AlphaNumeric characters | Required for L3 | |
ship_from_postal_code | string | Ship From Postal Code | Required for L3 | |
payment_adjustment | object | Object containing payment adjustment details. (ex. convenience fees, service fees, and surcharges) | ||
payment_adjustment .type | string | "" | "flat" or "percentage" | |
payment_adjustment .value | integer | 0 | Amount of adjustment in cents for "flat" (ex. 199 = $1.99) or 3 decimal places for "percentage" (ex. 1000 = 1.000%) | |
payment_method | object | Object containing payment method details, must contain only one of the following: card, ach, customer, terminal, token, apm | must include one payment method | |
payment_method .card | object | Object containing details for processing a transaction against a debit or credit card | ||
payment_method .card .entry_type | string | Must be "keyed" or "swiped" | ||
payment_method .card .number | string | Card number (digits only) | required if payment_method.card is present | |
payment_method .card .expiration_date | string | Expiration date (format MM/YY) | required if payment_method.card is present | |
payment_method .card .cvc | string | Card Verification Code | required if the applicable rule is set on the gateway | |
payment_method .card .track_1 | string | Decrypted track_1 | ||
payment_method .card .track_2 | string | Decrypted track_2 | ||
payment_method .card .encrypted_track_1 | string | Encrypted Track 1 | ||
payment_method .card .encrypted_track_2 | string | Encrypted Track 2 | ||
payment_method .card .ksn | string | KSN used to encrypt the supplied encrypted tracks | ||
payment_method .card .cardholder_authentication | object | Optionally pass 3DS collected data | if passed, it must contain valid values | |
payment_method .card .cardholder_authentication .eci | string | ECI indicator, ie 01,02,05,07..etc | ||
payment_method .card .cardholder_authentication .cavv | string | CAVV | ||
payment_method .card .cardholder_authentication .xid | string | XID | ||
payment_method .card .cardholder_authentication .cryptogram | string | Cryptogram | ||
payment_method .card .cardholder_authentication .version | string | Version, 1 or 2 | ||
payment_method .card .cardholder_authentication .ds_transaction_id | string | DS Transaction ID | ||
payment_method .card .cardholder_authentication .acs_transaction_id | string | ACS Transaction ID | ||
payment_method .ach | object | Object containing details for processing a transaction via ACH | ||
payment_method .ach .routing_number | string | Routing number for account to be charged | required if payment_method.ach is present | |
payment_method .ach .account_number | string | Account number for account to be charged | required if payment_method.ach is present | |
payment_method .ach .sec_code | string | SEC code for ACH transaction type: "web", "ccd", "ppd", or "tel" | required if payment_method.ach is present | |
payment_method .ach .account_type | string | ACH account type: "checking" or "savings" | required if payment_method.ach is present | |
payment_method .ach .check_number | string | Check number | required if payment_method.ach.sec_code = "tel" | |
payment_method .ach .accountholder_authentication | string | Object containing details for accountholder authentication | if required by processor | |
payment_method .ach .accountholder_authentication .dl_state | string | Driver's License state | required if payment_method.ach.accountholder_authentication is present | |
payment_method .ach .accountholder_authentication .dl_number | string | Driver's License number | required if payment_method.ach.accountholder_authentication is present | |
payment_method .customer | object | Object containing details for processing a transaction against a vaulted customer record | ||
payment_method .customer .id | string | Customer ID | required if payment_method.customer is present | |
payment_method .customer .payment_method_id | string | Customer default | ID of customer's saved payment method to be charged | |
payment_method .customer .payment_method_type | string | Customer default | The type of the payment method referenced in payment_method_id | |
payment_method .customer .billing_address_id | string | Customer default | ID of customer's saved billing address to be used | |
payment_method .customer .shipping_address_id | string | Customer default | ID of customer's saved shipping address to be used | |
payment_method .terminal | object | Object containing details for processing a transaction against a Terminal | ||
payment_method .terminal .id | string | ID of the terminal to be used for the transaction | required if payment_method.terminal is present | |
payment_method .terminal .expiration_date | string | Optionally pass an expiration date along with the transaction | ||
payment_method .terminal .cvc | string | Optionally pass a CVV along with the transaction | ||
payment_method .terminal .print_receipt | string | "no" (no receipt), "customer" (customer copy only), "merchant" (merchant copy only), or "both" (both copies) | required if payment_method.terminal is present | |
payment_method .terminal .signature_required | string | If true, requests that the terminal capture a signature (if supported) | required if payment_method.terminal is present | |
payment_method .apm | object | Object containing details for processing APM transactions | ||
payment_method .apm .type | string | APM type (see chart below) | required if payment_method.apm is present | |
payment_method .apm .merchant_redirect_url | string | This is the redirect url you wish to send the customer to after processing the payment | required if payment_method.apm is present | |
payment_method .apm .locale | string | Locale to be used for the payment page, if supported by the APM (ex. "en-US") | required if payment_method.apm is present | |
payment_method .apm .mobile_view | boolean | If true, tells the APM to render a mobile version of the landing page (if supported by the APM) | required if payment_method.apm is present | |
payment_method .apm .national_id | string | Consumer's National ID (max 30 characters) | ||
payment_method .apm .consumer_ref | string | Unique reference identifiying the customer. May contain [a-z0-9-], max 20 characters | ||
billing_address | object | null | Object containing billing address details | |
billing_address .first_name | string | Up to 50 characters | ||
billing_address .last_name | string | Up to 50 characters | ||
billing_address .company | string | Up to 100 characters | ||
billing_address .address_line_1 | string | Up to 100 characters | ||
billing_address .address_line_2 | string | Up to 100 characters | ||
billing_address .city | string | Up to 50 characters | ||
billing_address .state | string | State abbrevation | ||
billing_address .postal_code | string | If payment_method.card is present, defaults to Postal Code associated with card | Required for L3 | |
billing_address .country | string | "US" | ||
billing_address | string | Email address (must be valid email format, "example@mail.com") | ||
billing_address .phone | string | Digits only | ||
billing_address .fax | string | Digits only | ||
shipping_address | object | null | Object containing billing address details | |
shipping_address .first_name | string | Up to 50 characters | ||
shipping_address .last_name | string | Up to 50 characters | ||
shipping_address .company | string | Up to 100 characters | ||
shipping_address .address_line_1 | string | Up to 100 characters | ||
shipping_address .address_line_2 | string | Up to 100 characters | ||
shipping_address .city | string | Up to 50 characters | ||
shipping_address .state | string | State abbreviation | ||
shipping_address .postal_code | string | Required for L3 | ||
shipping_address .country | string | |||
shipping_address | string | Email address (must be valid email format, "example@mail.com") | ||
shipping_address .phone | string | Digits only | ||
shipping_address .fax | string | Digits only | ||
group_name | string | "default" | custom fields group name | |
custom_fields | object | Object based where the key is the id of the custom field and the value is an array of strings(even is single value) | Only required if fields are set to required | |
iias_status | string | "" | Required for HSA/FSA Valid values are: "verified" or "exempt" | |
additional_amounts | object | |||
additional_amounts .hsa .total | int | 0 | Required for HSA/FSA Total amount for HSA/FSA, passed as an unsigned integer | |
additional_amounts .hsa .rx_amount | int | 0 | RX AMount for HSA/FSA, passed as an unsigned integer | |
additional_amounts .hsa .vision_amount | int | 0 | Vision Mount for HSA/FSA, passed as an unsigned integer | |
additional_amounts .hsa .clinic_amount | int | 0 | Clinic Mount for HSA/FSA, passed as an unsigned integer | |
additional_amounts .hsa .dental_amount | int | 0 | Dental Mount for HSA/FSA, passed as an unsigned integer | |
line_items | array | Array of line items | Required for L3 | |
line_items[] name | string | Friendly name up to 50 alpha characters | ||
line_items[] description | string | Product Description up to 50 alpha characters | ||
line_items[] product_code | string | Product Code/SKU up to 50 alpha characters | ||
line_items[] commodity_code | string | Commodity Code up to 12 alpha characters | ||
line_items[] quantity | float64 | Quantity ##.## | ||
line_items[] discount_amount | int | in cents | ||
line_items[] freight_amount | int | in cents | ||
line_items[] unit_price | int | in cents | ||
line_items[] tax_amount | int | in cents | ||
line_items[] national_tax_amount | int | in cents | ||
line_items[] amount | int | in cents | ||
line_items[] national_tax_rate | string | 3 decimal rate. 10% = 10.000 | ||
line_items[] tax_rate | string | 3 decimal rate. 10% = 10.000 | ||
line_items[] unit_of_measure | string | |||
processor_specific | object | Optional: this only applys to specific processor types | ||
processor_specific .paysafe_direct .subscription_trial_solution | bool | |||
processor_specific .paysafe_direct .subscription_start_date | string | YYYY-MM-DD | ||
processor_specific .paysafe_direct .subscription_trial_start_date | string | YYYY-MM-DD | ||
processor_specific .paysafe_direct .subscription_trial_end_date | string | YYYY-MM-DD | ||
processor_specific .paysafe_direct .subscription_secondary_billing_date | string | YYYY-MM-DD | ||
processor_specific .paysafe_direct .subscription_cancel_url | string | weburl | ||
processor_specific .paysafe_direct .subscription_amount | uint | in cents | ||
processor_specific .paysafe_direct .subscription_unit_cost | uint | in cents | ||
processor_specific .paysafe_direct .subscription_item_quantity | uint | |||
processor_specific .paysafe_direct .subscription_product_desc | string | |||
descriptor | object | Optional: this only applys to specific processor types | ||
descriptor .name | string (38 Char) | |||
descriptor .address | string (38 Char) | |||
descriptor .city | string (21 Char) | |||
descriptor .state | string (2 Char) | |||
descriptor .postal_code | string (5 Char) | |||
subscriptions | array | Array of subscriptions | ||
card_on_file_indicator | string | [CR] | Optional value, C = General purpose storage, R = recurring payment | |
initiated_by | string | "customer" or "merchant" | Who is inititating the transaction, "customer" or "merchant" | |
initial_transaction_id | string | Optional if using our tokenization, otherwise this is transaction id used when storing the payment | ||
stored_credential_indicator | string | Optional if using our tokenization, otherwise "used" or "stored" |
Code Samples
CIT - MIT
TIP
When processing transactions the following variables are available for including CIT/MIT variables to the processors.
Name | Required | Description |
---|---|---|
card_on_file_indicator | Optional | |
initiated_by | Required | Indicates who initiated the transaction. |
initial_transaction_id | Optional | Optional if using our tokenization |
stored_credential_indicator | Optional | Indicates if a stored payment was used or not |
billing_method | Optional | Defaults to "straight", but if this is a recurring transaction, passing "recurring" will set recurring indicators on the transaction |
Fee Calculation
TIP
Using this endpoint will calculate any applicable fees that should be applied to the transaction. This includes Surcharge, Cash Discount Fees and Payment Adjustment, if applicable.
Request Method:
POST
URL Endpoint:
/api/lookup/fees
Name | Type | Required | Description |
---|---|---|---|
type | string | yes | Type of request, "integrations" |
state | string | no | Billing address state |
bin | string | no | 6 - 19 digits of a card |
customer_id | string | no | Customer ID |
payment_id | string | no | Payment method ID for a customer |
payment_method | string | yes | The method of payment, i.e 'card' or 'ach' |
base_amount | uint | yes | Amount in lowest form of currency. $1.00 = 100 |
json
➜ ~ curl -H 'Authorization: API_KEY' -H "Content-Type: application/json" -X POST -d '{
"type": "integrations",
"type_id":"",
"state": "IL",
"bin": "517246700",
"payment_method": "card",
"base_amount": 1000
}' { url goes here }/api/api/lookup/fees
{
"status": "success",
"msg": "success",
"data": {
"service_fee": 0,
"payment_adjustment": {
"value": 0,
"type": ""
},
"requested_amount": 1350,
"discount_amount": null,
"surcharge": 350
}
}
Amount calculation
Request Method:
POST
URL Endpoint:
/api/calculate/amounts
Name | Type | Required | Default | Description |
---|---|---|---|---|
processor_id | string | true | ||
subtotal | uint | true | null | |
amount | uint | if line_items or products not present | null | |
currency | string | true | ||
payment_method | string | true | Can be 'card' or 'ach' | |
transaction_type | string | true | Can be 'verification', 'auth', 'sale', 'void', 'refund', 'credit' | |
products | array | if amount or line_items not present | null | |
products[].id | string | true | ||
products[].name | string | true | ||
products[].description | string | false | ||
products[].price | string | true | ||
products[].local_tax | string | false | ||
products[].national_tax | string | false | ||
products[].fixed_amount | bool | false | false | |
products[].fixed_qty | bool | false | false | |
products[].unit_of_measure | string | false | null | |
line_items | array | if amount or products not present | null | |
line_items[].id | string | true | ||
line_items[].status | string | true | Can be 'paid', 'pending', 'rejected' | |
line_items[].type | string | true | Can be 'flat' or 'percentage' | |
line_items[].name | string | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
line_items[].description | string | false | false | If true, the calculated amount will be added to the total amount |
line_items[].unit_price | int | true | ||
line_items[].quantity | float64 | true | ||
line_items[].quantity_shipped | float64 | false | ||
line_items[].product_code | string | false | ||
line_items[].commodity_code | string | false | ||
line_items[].unit_of_measure | string | false | ||
line_items[].alternate_tax_identifier | string | false | ||
line_items[].taxable | bool | false | false | |
line_items[].local_tax_rate | string | false | Format is 10.25 | |
line_items[].national_tax_rate | string | false | Format is 10.25 | |
line_items[].tax_rate | string | false | Format is 10.25 | |
line_items[].discount_amount | uint | false | ||
line_items[].freight_amount | uint | false | ||
line_items[].discount_rate | string | false | ||
processor_payment_adjustment | object | false | null | |
processor_payment_adjustment.type | string | true | Can be 'flat' or 'percentage' | |
processor_payment_adjustment.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
processor_payment_adjustment.include | bool | false | false | If true, the calculated amount will be added to the total amount |
shipping_amount | object | false | null | |
shipping_amount.type | string | true | Can be 'flat' or 'percentage' | |
shipping_amount.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
shipping_amount.include | bool | false | false | If true, the calculated amount will be added to the total amount |
addon_amount | array | false | null | |
addon_amount[].type | string | true | Can be 'flat' or 'percentage' | |
addon_amount[].value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
addon_amount[].include | bool | false | false | If true, the calculated amount will be added to the total amount |
discount_amount | array | false | null | |
discount_amount[].type | string | true | Can be 'flat' or 'percentage' | |
discount_amount[].value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
discount_amount[].include | bool | false | false | If true, the calculated amount will be added to the total amount |
duty_amount | object | false | null | |
duty_amount.type | string | true | Can be 'flat' or 'percentage' | |
duty_amount.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
duty_amount.include | bool | false | false | If true, the calculated amount will be added to the total amount |
tip_amount | object | false | null | |
tip_amount.type | string | true | Can be 'flat' or 'percentage' | |
tip_amount.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
tip_amount.include | bool | false | false | If true, the calculated amount will be added to the total amount |
additional_amounts | array | false | null | |
additional_amounts[].type | string | true | Can be 'flat' or 'percentage' | |
additional_amounts[].value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
additional_amounts[].include | bool | false | false | If true, the calculated amount will be added to the total amount |
tax_amount | object | false | null | |
tax_amount.type | string | true | Can be 'flat' or 'percentage' | |
tax_amount.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
tax_amount.include | bool | false | false | If true, the calculated amount will be added to the total amount |
national_tax_amount | object | false | null | |
national_tax_amount.type | string | true | Can be 'flat' or 'percentage' | |
national_tax_amount.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
national_tax_amount.include | bool | false | false | If true, the calculated amount will be added to the total amount |
local_tax_amount | object | false | null | |
local_tax_amount.type | string | true | Can be 'flat' or 'percentage' | |
local_tax_amount.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
local_tax_amount.include | bool | false | false | If true, the calculated amount will be added to the total amount |
service_fee | object | false | null | |
service_fee.type | string | true | Can be 'flat' or 'percentage' | |
service_fee.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
service_fee.include | bool | false | false | If true, the calculated amount will be added to the total amount |
surcharge | object | false | null | |
surcharge.type | string | true | Can be 'flat' or 'percentage' | |
surcharge.value | uint | true | If type is 'flat', round to 2 decimals (ex. $10.00 should be 1000), if 'percentage' round to 3 (ex. %10.000 should be 10000) | |
surcharge.include | bool | false | false | If true, the calculated amount will be added to the total amount |
cc_bin | string | if surcharge allowed | null | |
country | string | if surcharge allowed | null | |
state | string | if surcharge allowed | null | |
flags | object | false | ||
flags.skip_cash_discount | bool | false | false | If true, skips the cash discount calculation |
flags.skip_surcharge | bool | false | false | If true, skips the cash surcharge calculation |
flags.skip_service_fee | bool | false | false | If true, skips the cash service fee calculation |
flags.skip_consumer_choice | bool | false | false | If true, skips the cash consumer choice calculation |
flags.include_default_tax_to_total | bool | false | null | If true, and tax has not been overridden, the merchant's default tax amount will be added to the total amount |
flags.tax_exempt | bool | false | null | If true, sets the national, local and tax amount fields to 0 |
flags.processor_surcharge_fallback | bool | false | false | If true, processor's surcharge fallback will be available |
flags.add_tax_to_total | bool | false | null | If true, the tax will be added to the total amount |
source | string | false |
Workflow:
- Call the Amount calculation endpoint with the properly filled request
- Take the response of the Amount calculation and place it into the Transaction Request into the
amounts
field and fill the other fields of the request - Submit the transaction with the pre-calculated amounts
sh
➜ ~ curl -H 'Authorization: API_KEY' -H "Content-Type: application/json" -X POST -d '{
"processor_id": "<processor id>",
"amount" : 1000,
"subtotal" : 1000,
"currency": "USD",
"payment_method": "card",
"transaction_type": "sale"
}' { url goes here }/api/calculate/amounts
{
"status": "success",
"msg": "success",
"data": {
"line_items": null,
"shipping_amount": null,
"discount_amount": null,
"freight_amount": null,
"addon_amount": null,
"duty_amount": null,
"tip_amount": null,
"additional_amounts": null,
"tax_amount": 180,
"national_tax_amount": null,
"local_tax_amount": null,
"service_fee": 350,
"surcharge": null,
"processor_id": "<processor id>",
"payment_method": "card",
"included_amounts": {
"shipping_amount": null,
"discount_amount": null,
"duty_amount": null,
"tip_amount": null,
"tax_amount": 180,
"national_tax_amount": null,
"local_tax_amount": null,
"service_fee": 350,
"surcharge": null
},
"subtotal": 1000,
"amount": 1000,
"additional_total": 0,
"total": 1530,
"features": {
"surcharge": false,
"cash_discount": false,
"dual_pricing": false,
"dual_pricing_v2": false
},
"display": {
"subtotal": {
"value": 1000,
"display": true
},
"amount": {
"value": 1000,
"display": true
},
"shipping": {
"value": 0,
"display": false
},
"freight": {
"value": 0,
"display": false
},
"duty": {
"value": 0,
"display": false
},
"discount": {
"value": 0,
"display": false
},
"service_fee": {
"value": 350,
"display": true
},
"surcharge": {
"value": 0,
"display": false
},
"tax": {
"value": 180,
"display": true
},
"national_tax": {
"value": 0,
"display": false
},
"local_tax": {
"value": 0,
"display": false
},
"tip": {
"value": 0,
"display": false
},
"total": {
"value": 1530,
"display": true
},
"consumer_choice": {
"card": 0,
"ach": 0,
"display": false
}
},
"disclaimer": {
"text": "",
"html": "",
"display": false
}
}
}
Response Codes
TIP
Response Codes are grouped as follows: 100 thru 199 are Approvals and Partial Approvals. 200 thru 299 are Declined via the processor. 300 thru 399 are Gateway Declines. 400 thru 499 are processor rejection errors.
Response Code | Processor Definition | Description |
---|---|---|
0 | Unknown | Unknown, please contact support for more information |
99 | Pending payment | Used in redirect processors prior to payment being received |
100 | Approved | Transaction was successfully approved |
110 | Partial approval | Transaction was successfully approved, but for a lesser amount |
200 - 299 | Decline | Transaction has been declined by the issuer for various reasons |
300 - 399 | Gateway Decline | Platform decline for configuration or fraud reasons |
400 - 499 | Transaction error returned by processor | Errors returned from the processor |
AVS Response Codes
Address verification response codes (AVS)
AVS Response Code | Definition | Code Applies to | Card Brands |
---|---|---|---|
0 | AVS Not Available | Domestic + International | V, MC, AX, D, PP, JCB |
A | Address match only | Domestic + International | V, AX, D,PP, JCB |
B | Address matches, ZIP not verified | Domestic + International | V |
C | Incompatible format | Domestic + International | V |
D | Exact match | International | V |
F | Exact match, UK-issued cards | Domestic + International | V |
G | Non-U.S. Issuer does not participate | International | V |
I | Not verified | International | V, D, PP, JCB |
M | Exact match | International | V |
N | No address or ZIP match | Domestic + International | V, MC, AX, D, PP, JCB |
P | Postal Code match | Domestic + International | V |
R | Issuer system unavailable | Domestic | V, MC, AX, D, PP, JCB |
S | Service not supported | Domestic | MC, AX, D, PP, JCB |
U | Address unavailable | Domestic | V, MC, AX, D, PP, JCB |
W | 9-character numeric ZIP match only | Domestic + International (MC) | MC, D, PP, JCB |
X | Exact match, 9-character numeric ZIP | Domestic + International (MC) | MC, D, PP, JCB |
Y | Exact match, 5-character numeric ZIP | Domestic | V, MC, AX, D, PP, JCB |
Z | 5-character ZIP match only | Domestic + International (V) | V, MC, AX, D, PP, JCB |
L | Partial match, Name and billing postal code match | For AMEX cards only | AX |
1 | Cardholder name and ZIP match | Domestic | AX |
2 | Cardholder name, address and ZIP match | Domestic | AX |
3 | Cardholder name and address match | Domestic | AX |
4 | Cardholder name matches | Domestic | AX |
5 | Cardholder name incorrect, ZIP matches | Domestic | AX |
6 | Cardholder name incorrect, address and zip match | Domestic | AX |
7 | Cardholder name incorrect, address matches | Domestic | AX |
8 | Cardholder name, address, and ZIP do not match | Domestic | AX |
Get Transaction By ID
Retrieve details for a specific transaction.
Request Method:
GET
URL Endpoint:
/api/transaction/{ transaction ID }
json
{
"status": "success",
"msg": "success",
"data": [
{
"id": "b7kgflt1tlv51er0fts0",
"type": "sale",
"amount": 1112,
"tax_amount": 100,
"tax_exempt": false,
"shipping_amount": 100,
"currency": "usd",
"description": "test transaction",
"order_id": "someOrderID",
"po_number": "somePONumber",
"ip_address": "4.2.2.2",
"email_receipt": false,
"payment_method": "card",
"response": {
"card": {
"id": "b7kgflt1tlv51er0ftsg",
"card_type": "visa",
"first_six": "401200",
"last_four": "5439",
"masked_card": "401200******5439",
"expiration_date": "12/20",
"status": "approved",
"auth_code": "TAS731",
"processor_response_code": "00",
"processor_response_text": "APPROVAL TAS731 ",
"processor_type": "tsys_sierra",
"processor_id": "b7kgflt1tlv51er0f1sg",
"avs_response_code": "0",
"cvv_response_code": "M",
"processor_specific": {},
"created_at": "2017-10-19T20:15:19.80368Z",
"updated_at": "2017-10-19T20:15:20.777011Z"
}
},
"status": "pending_settlement",
"billing_address": {
"first_name": "John",
"last_name": "Smith",
"company": "Test Company",
"address_line_1": "123 Some St",
"address_line_2": "",
"city": "Wheaton",
"state": "IL",
"postal_code": "60187",
"country": "US",
"phone": "5555555555",
"fax": "5555555555",
"email": "help@website.com"
},
"shipping_address": {
"first_name": "John",
"last_name": "Smith",
"company": "Test Company",
"address_line_1": "123 Some St",
"address_line_2": "",
"city": "Wheaton",
"state": "IL",
"postal_code": "60187",
"country": "US",
"phone": "5555555555",
"fax": "5555555555",
"email": "help@website.com"
},
"created_at": "2017-10-19T20:15:19.560708Z",
"updated_at": "2017-10-19T20:15:20.832049Z"
}
],
"total_count": 1
}
Search Transactions
Retrieve details for all transactions that match provided search criteria.
TIP
If you do not pass in a created_at
date range, we will default this range to the prior four months.
Request Method:
POST
URL Endpoint:
/api/transaction/search
QuerySearchString: Operator can be
=
,!=
QuerySearchInt: Operator can be
=
,!=
,<
,>
json
Example Body
{
"{name}": {
"operator": "=", // =, !=, <, >
"value": "{value}"
}
}
Name | Type | Description |
---|---|---|
transaction_id | QuerySearchString | Searches for transaction id |
user_id | QuerySearchString | Searches for user_id |
type | QuerySearchString | Searches for transaction type (sale, authorize...etc) |
ip_address | QuerySearchString | Searches for ip_address, either ipv4 or ipv6 |
amount | QuerySearchInt | Searches for originally requested amount |
amount_authorized | QuerySearchInt | Searches for amount_authorized |
amount_captured | QuerySearchInt | Searches for amount_captured |
amount_settled | QuerySearchInt | Searches for amount_settled |
tax_amount | QuerySearchInt | Searches for tax_amount |
po_number | QuerySearchString | Searches for po_number |
order_id | QuerySearchString | Searches for order_id |
payment_method | QuerySearchString | Searches by payment_method, (token, card, terminal) |
payment_type | QuerySearchString | Searches by payment_type (card, echeck) |
status | QuerySearchString | Searches by transaction status (unknown, declined, authorized, pending_settlement, settled, voided, reversed, refunded) |
processor_id | QuerySearchString | Searches by processor_id |
customer_id | QuerySearchString | Searches by customer_id |
created_at | QueryDateRange | Searches by created_at between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ") |
captured_at | QueryDateRange | Searches by captured_at between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ") |
settled_at | QueryDateRange | Searches by settled_at between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ") |
billing_address .address_id | QuerySearchString | Searches by billing_address.id |
billing_address .first_name | QuerySearchString | Searches by billing_address.first_name (0-50 characters) |
billing_address .last_name | QuerySearchString | Searches by billing_address.last_name (0-50 characters) |
billing_address .company | QuerySearchString | Searches by billing_address.company (0-50 characters) |
billing_address .address_line_1 | QuerySearchString | Searches by billing_address.address_line_1 (0-100 characters) |
billing_address .address_line_2 | QuerySearchString | Searches by billing_address.address_line_2 (0-100 characters) |
billing_address .city | QuerySearchString | Searches by billing_address.city (0-50 characters) |
billing_address .state | QuerySearchString | Searches by billing_address.state (2 Character) |
billing_address .postal_code | QuerySearchString | Searches by billing_address.postal_code (0-6 Characters) |
billing_address .country | QuerySearchString | Searches by billing_address.country (2 Characters) |
billing_address | QuerySearchString | Searches by billing_address.email |
billing_address .phone | QuerySearchString | Searches by billing_address.phone (0-14 digits only) |
billing_address .fax | QuerySearchString | Searches by billing_address.fax (0-14 digits only) |
shipping_address .address_id | QuerySearchString | Searches by shipping_address.id |
shipping_address .first_name | QuerySearchString | Searches by shipping_address.first_name (0-50 characters) |
shipping_address .last_name | QuerySearchString | Searches by shipping_address.last_name (0-50 characters) |
shipping_address .company | QuerySearchString | Searches by shipping_address.company (0-50 characters) |
shipping_address .address_line_1 | QuerySearchString | Searches by shipping_address.address_line_1 (0-100 characters) |
shipping_address .address_line_2 | QuerySearchString | Searches by shipping_address.address_line_2 (0-100 characters) |
shipping_address .city | QuerySearchString | Searches by shipping_address.city (0-50 characters) |
shipping_address .state | QuerySearchString | Searches by shipping_address.state (2 Character) |
shipping_address .postal_code | QuerySearchString | Searches by shipping_address.postal_code (0-6 Characters) |
shipping_address .country | QuerySearchString | Searches by shipping_address.country (2 Characters) |
shipping_address | QuerySearchString | Searches by shipping_address.email |
shipping_address .phone | QuerySearchString | Searches by shipping_address.phone (0-14 digits only) |
shipping_address .fax | QuerySearchString | Searches by shipping_address.fax (0-14 digits only) |
limit | integer | Maximum records to return (0-100) |
offset | integer | Number of records to offset the return by |
Capture
Capture funds for a specified transaction that has already been authorized.
Request Method:
POST
URL Endpoint:
/api/transaction/{ transaction ID }/capture
Name | Type | Default | Description | Required |
---|---|---|---|---|
amount | integer | amount from auth | Total amount to capture, in cents. (1299 = $12.99) | |
tax_amount | integer | tax_amount from auth | Tax amount to capture, in cents. (199 = $1.99) | |
shipping_amount | integer | shipping_amount from auth | Shipping amount to capture, in cents. (299 = $2.99) | |
tax_exempt | boolean | false | Is the transaction tax exempt | |
order_id | string | order_id from auth | Alphanumeric (max 17 characters) | |
po_number | string | po_number from auth | Alphanumeric (max 17 characters) | |
ip_address | string | ip_address from auth | IPV4 or IPV6 address |
Void / Auth Reversal
Void a transaction that is pending settlement. Where applicable, a void will be processed as an auth reversal.
Request Method:
POST
URL Endpoint:
/api/transaction/{ transaction ID }/void
json
{
"status": "success",
"msg": "success",
"data": null
}
Refund
Process a refund for a transaction that has already been settled. Multiple partial refunds can be processed, but the total amount of all refunds cannot exceed the previously settled amount.
Request Method:
POST
URL Endpoint:
/api/transaction/{ transaction ID }/refund
Name | Type | Default | Description | Required |
---|---|---|---|---|
amount | integer | amount from auth | Total amount to capture, in cents. (1299 = $12.99) | |
surcharge | integer | null | Surcharge amount, in cents. (1299 = $12.99) |