Skip to content

Requests

Base Urls

Sandbox

The Sandbox environment is provided for testing. Transaction responses are simulated and do not leave the platform for processing. No billing related items occur within this environment.

Sandbox url:

Production

The Production environment should be used for all LIVE transactional processing.

Production url:

Versioning

The platform's semi-RESTful API is fully backwards compatible and versioning is not necessary. Changes and feature updates are sent out via the platform prior to release.

Current version: 1.5.1

Headers

The following headers should be included with your requests:

Authorization

Calls to the API must include an Authorization header with the request. Either a JWT (JSON Web Token) or an API Key can be used as the value of this header, like so:

Authorization: Bearer { JWTToken }

Authorization: { API Key }

API Keys

API keys are used to authenticate your requests to the API. You can create and manage your API keys in the control panel. API keys are tied to a user account.

Their are two types of API keys:

  • Public API keys (ex: pub_***) - used for making requests to the API from the client side (ex. Tokenizer and Cart Sessions)
  • Private API keys (ex: api_***) - used for making requests to the API from the server side (ex. Transaction Processing)

DANGER

Private API keys should never be exposed to the public. Please do not include them in client side code, emails or support ticket request.

DANGER

Use of Public API keys to make requests to the API from the server side will result in an unauthorzed response.

Content-Type

Content-Type should typically be set to application/json, unless you need to send your request body in a different format. All API responses will be in JSON format.

Errors

The API uses standard HTTP status codes to indicate the success or failure of a request. In the event of an error, the response will include a JSON object with the following properties:

Example:

json
{
  "status": "failed",
  "msg": "bad request error: invalid Postal Code"
}

Unauthorized

If you receive an unauthorized response, there are a few things you can check:

  • Missing Authorization header see Authorization
  • API key does not exist or has been deleted
  • Correct API key (public "pub_" vs private "api_")
  • Correct account Parnter vs Merchant
  • Correct environment (sandbox vs production)

Corelation ID

Every header response will include a correlation-id (x-correlation-id) which can be used to help identify and troubleshoot issues with the API. If you are experiencing issues, please include this ID in any support requests.

Users

Create User

Create a new user account.

Request Method: POST

URL Endpoint: /api/user

NameTypeDefaultDescriptionRequired
usernamestringunique username (must contain alpha and numeric characters)
namestringfirst and last name
phonestringphone number, digits only
emailstringemail address (must be valid email format)
timezonestringtimezone (ex. ETC/UTC)
passwordstringpassword
statusstringstatus (active or disabled)
rolestringdefined role (admin or standard)

Get User by ID

Retrieve the properties of a specific user.

Request Method: GET

URL Endpoint: /api/user/{ user id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89227ij8m0nuanr1tk0",
    "username": "testmerchant43",
    "name": "test merchant user",
    "phone": "6305555555",
    "email": "info@website.com",
    "timezone": "ETC/UTC",
    "status": "active",
    "role": "admin",
    "account_type": "merchant",
    "account_type_id": "aucio551tlv85l7moe5g",
    "created_at": "2017-11-20T00:26:06.190264Z",
    "updated_at": "2017-11-20T00:26:06.190264Z"
  }
}

Get Current User

Retrieve the properties of the currently authenticated user. This is intended as a helper function, it is recommended to get a specific user by providing the ID if possible.

Request Method: GET

URL Endpoint: /api/user

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89227ij8m0nuanr1tk0",
    "username": "testmerchant43",
    "name": "test merchant user",
    "phone": "6305555555",
    "email": "info@website.com",
    "timezone": "ETC/UTC",
    "status": "active",
    "role": "admin",
    "account_type": "merchant",
    "account_type_id": "aucio551tlv85l7moe5g",
    "created_at": "2017-11-20T00:26:06.190264Z",
    "updated_at": "2017-11-20T00:26:06.190264Z"
  }
}

Get All Users

Retrieve the properties of all users for the gateway or partner account associated with the API Key or JWT token provided in the Authorization header.

Request Method: GET

URL Endpoint: /api/users

json
{
  "status": "success",
  "msg": "success",
  "total_count": 3,
  "data": [
    {
      "id": "b89227ij8m0nuanr1tk0",
      "username": "testmerchant43",
      "name": "test merchant user",
      "phone": "6305555555",
      "email": "info@website.com",
      "timezone": "ETC/UTC",
      "status": "active",
      "role": "admin",
      "account_type": "merchant",
      "account_type_id": "aucio551tlv85l7moe5g",
      "created_at": "2017-11-20T00:26:06.190264Z",
      "updated_at": "2017-11-20T00:26:06.190264Z"
    }
  ]
}

Update User

Edit the properties of an existing user account.

Request Method: POST

URL Endpoint: /api/user/{ user id }

NameTypeDefaultDescriptionRequired
namestringfirst and last name
phonestringphone number, digits only
emailstringemail address (must be valid email format)
timezonestringtimezone (ex. ETC/UTC)
statusstringstatus (active or disabled)
rolestringdefined role (admin or standard)
permissionsobject(account defaults)users permissions
permissions.manage_usersbooleanfalse
permissions.manage_api_keysbooleanfalse
permissions.manage_terminalsbooleanfalse
permissions.manage_rule_enginebooleanfalse
permissions.view_settlement_batchesbooleanfalse
permissions.view_billing_reportsbooleanfalse
permissions.process_authorizationbooleanfalse
permissions.process_capturebooleanfalse
permissions.process_salebooleanfalse
permissions.process_voidbooleanfalse
permissions.process_creditbooleanfalse
permissions.process_refundbooleanfalse
permissions.process_verificationbooleanfalse
permissions.allow_dashboard_statsbooleanfalse
permissions.vault_createbooleanfalse
permissions.vault_updatebooleanfalse
permissions.vault_deletebooleanfalse
permissions.access_file_batchbooleanfalse
permissions.view_others_transactionsbooleanfalse
permissions.manage_card_bansbooleanfalse
permissions.restrict_viewing_others_invoicesbooleanfalse
permissions.recurring_status_changebooleanfalse
notifications.merchantobject(account defaults)notification values
notifications.merchant.transaction_receiptsbooleanfalse
notifications.merchant.settlement_reportsbooleanfalse
notifications.merchant.triggered_rulesbooleanfalse
notifications.merchant.security_alertsbooleanfalse
notifications.merchant.invoice_createbooleanfalse
notifications.merchant.transaction_voidbooleanfalse
defaultsobjectdefault settings
defaults.processor_idstringdefault processor
defaults.terminal_idstringdefault terminal_id
defaults.transaction_csv_format_idstringdefault transaction csv export format
defaults.transaction_report_format_idstringdefault transaction report format
defaults.vault_table_format_idstringdefault vault report format
defaults.show_transaction_totalsbooleanreports should show transaction totals

Delete User

Delete a specific user.

Request Method: DELETE

URL Endpoint: /api/user/{ user id }

json
{
  "status": "success",
  "msg": "successfully deleted",
  "data": null
}

Change Password

Change a user's password. Must provide an API Key or JWT token associated with the user as the Authorization header value.

Request Method: POST

URL Endpoint: /api/user/change-password

NameTypeDefaultDescriptionRequired
usernamestringUser's username
current_passwordstringUser's current password
new_passwordstringThe new password to be set on the user's account. Must be 8-64 characters and contain an uppercase character, a number, and a special character.

Api Keys

Create API Key

Create an API key for a user.

Request Method: POST URL Endpoint: /api/user/apikey

NameTypeDefaultDescriptionRequired
typestringapi(private) or public key*
namestringA name for the API key*

Get All API Keys

Retrieve all API keys for the gateway or partner account associated with the API Key or JWT token provided in the Authorization header.

Request Method: GET URL Endpoint: /api/user/apikeys

json
{
  "status": "success",
  "msg": "success",
  "total_count": 1,
  "data": [
    {
      "id": "cpfkb7rug2jghjrp79rg",
      "user_id": "testmerchant43",
      "type": "api",
      "name": "Private Key",
      "api_key": "api_2hQIG638fYIq0KiP96k3XDZXrLJ",
      "created_at": "2024-06-04T16:49:36Z",
      "updated_at": "2024-06-04T16:49:36Z"
    }
  ]
}

Delete API Key

Delete a specific API key.

Request Method: DELETE URL Endpoint: /api/user/apikey/{ api key }

json
{
  "status": "success",
  "msg": "success"
}

Transactions

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

NameTypeDefaultDescriptionRequired
idempotency_keyuint(uuid format)used to identify duplicate transactions. Default time is 5 minutes
typestring"sale", "authorize", "verification" or "credit"
amountintegerAmount to process in cents (should contain all applicable fees and taxes) (1299 = $12.99)
base_amountintegerAmount to process in cents (surcharge and related fees will be added to this amount during processing) (1299 = $12.99)
tax_exemptbooleanfalseIs the transaction tax exemptRequired for L3
tax_amountinteger0Tax Amount in centsRequired for L3
shipping_amountinteger0Shipping Amount in cents (should be included in Amount)
discount_amountinteger0Discount Amount in cents (should be included in Amount)
tip_amountinteger0Tip Amount in cents (should be included in Amount)
currencystring"USD"ISO 4217 currency (ex "USD")
descriptionstring""Text field for miscellaneous notes (max 255 characters)
order_idstringSupports up to 15 alphanumeric charactersRequired for L3
po_numberstringSupports up to 15 alphanumeric characters
processor_idstring""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_addressstringServer IPIPv4 or IPv6 value of the end user
allow_partial_paymentboolfalseAllow partial transactions to be approved (only if supported by processor)
email_receiptbooleanfalseIf true, sends an email receipt (email_address must be provided)
email_addressstringEmail address (must be valid email format, "example@mail.com")required if email_receipt is true
create_vault_recordbooleanfalseIf 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_idstring""Vendor ID passed along to certain processors if supported (Special Field, only use if instructed by support)
billing_methodstring"straight""straight", "initial_recurring", or "recurring"
summary_commodity_codestringSummary Commodity Code 4 AlphaNumeric charactersRequired for L3
ship_from_postal_codestringShip From Postal CodeRequired for L3
payment_adjustmentobjectObject containing payment adjustment details. (ex. convenience fees, service fees, and surcharges)
payment_adjustment
    .type
string"""flat" or "percentage"
payment_adjustment
    .value
integer0Amount of adjustment in cents for "flat" (ex. 199 = $1.99) or 3 decimal places for "percentage" (ex. 1000 = 1.000%)
payment_methodobjectObject containing payment method details, must contain only one of the following: card, ach, customer, terminal, token, apmmust include one payment method
payment_method
    .card
objectObject containing details for processing a transaction against a debit or credit card
payment_method
    .card
    .entry_type
stringMust be "keyed" or "swiped"
payment_method
    .card
    .number
stringCard number (digits only)required if payment_method.card is present
payment_method
    .card
    .expiration_date
stringExpiration date (format MM/YY)required if payment_method.card is present
payment_method
    .card
    .cvc
stringCard Verification Coderequired if the applicable rule is set on the gateway
payment_method
    .card
    .track_1
stringDecrypted track_1
payment_method
    .card
    .track_2
stringDecrypted track_2
payment_method
    .card
    .encrypted_track_1
stringEncrypted Track 1
payment_method
    .card
    .encrypted_track_2
stringEncrypted Track 2
payment_method
    .card
    .ksn
stringKSN used to encrypt the supplied encrypted tracks
payment_method
    .card
    .cardholder_authentication
objectOptionally pass 3DS collected dataif passed, it must contain valid values
payment_method
    .card
    .cardholder_authentication
    .eci
stringECI indicator, ie 01,02,05,07..etc
payment_method
    .card
    .cardholder_authentication
    .cavv
stringCAVV
payment_method
    .card
    .cardholder_authentication
    .xid
stringXID
payment_method
    .card
    .cardholder_authentication
    .cryptogram
stringCryptogram
payment_method
    .card
    .cardholder_authentication
    .version
stringVersion, 1 or 2
payment_method
    .card
    .cardholder_authentication
    .ds_transaction_id
stringDS Transaction ID
payment_method
    .card
    .cardholder_authentication
    .acs_transaction_id
stringACS Transaction ID
payment_method
    .ach
objectObject containing details for processing a transaction via ACH
payment_method
    .ach
    .routing_number
stringRouting number for account to be chargedrequired if payment_method.ach is present
payment_method
    .ach
    .account_number
stringAccount number for account to be chargedrequired if payment_method.ach is present
payment_method
    .ach
    .sec_code
stringSEC code for ACH transaction type: "web", "ccd", "ppd", or "tel"required if payment_method.ach is present
payment_method
    .ach
    .account_type
stringACH account type: "checking" or "savings"required if payment_method.ach is present
payment_method
    .ach
    .check_number
stringCheck numberrequired if payment_method.ach.sec_code = "tel"
payment_method
    .ach
    .accountholder_authentication
stringObject containing details for accountholder authenticationif required by processor
payment_method
    .ach
    .accountholder_authentication
    .dl_state
stringDriver's License staterequired if payment_method.ach.accountholder_authentication is present
payment_method
    .ach
    .accountholder_authentication
    .dl_number
stringDriver's License numberrequired if payment_method.ach.accountholder_authentication is present
payment_method
    .customer
objectObject containing details for processing a transaction against a vaulted customer record
payment_method
    .customer
    .id
stringCustomer IDrequired if payment_method.customer is present
payment_method
    .customer
    .payment_method_id
stringCustomer defaultID of customer's saved payment method to be charged
payment_method
    .customer
    .payment_method_type
stringCustomer defaultThe type of the payment method referenced in payment_method_id
payment_method
    .customer
    .billing_address_id
stringCustomer defaultID of customer's saved billing address to be used
payment_method
    .customer
    .shipping_address_id
stringCustomer defaultID of customer's saved shipping address to be used
payment_method
    .terminal
objectObject containing details for processing a transaction against a Terminal
payment_method
    .terminal
    .id
stringID of the terminal to be used for the transactionrequired if payment_method.terminal is present
payment_method
    .terminal
    .expiration_date
stringOptionally pass an expiration date along with the transaction
payment_method
    .terminal
    .cvc
stringOptionally 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
stringIf true, requests that the terminal capture a signature (if supported)required if payment_method.terminal is present
payment_method
    .apm
objectObject containing details for processing APM transactions
payment_method
    .apm
    .type
stringAPM type (see chart below)required if payment_method.apm is present
payment_method
    .apm
    .merchant_redirect_url
stringThis is the redirect url you wish to send the customer to after processing the paymentrequired if payment_method.apm is present
payment_method
    .apm
    .locale
stringLocale 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
booleanIf 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
stringConsumer's National ID (max 30 characters)
payment_method
    .apm
    .consumer_ref
stringUnique reference identifiying the customer. May contain [a-z0-9-], max 20 characters
billing_addressobjectnullObject containing billing address details
billing_address
    .first_name
stringUp to 50 characters
billing_address
    .last_name
stringUp to 50 characters
billing_address
    .company
stringUp to 100 characters
billing_address
    .address_line_1
stringUp to 100 characters
billing_address
    .address_line_2
stringUp to 100 characters
billing_address
    .city
stringUp to 50 characters
billing_address
    .state
stringState abbrevation
billing_address
    .postal_code
stringIf payment_method.card is present, defaults to Postal Code associated with cardRequired for L3
billing_address
    .country
string"US"
billing_address
    .email
stringEmail address (must be valid email format, "example@mail.com")
billing_address
    .phone
stringDigits only
billing_address
    .fax
stringDigits only
shipping_addressobjectnullObject containing billing address details
shipping_address
    .first_name
stringUp to 50 characters
shipping_address
    .last_name
stringUp to 50 characters
shipping_address
    .company
stringUp to 100 characters
shipping_address
    .address_line_1
stringUp to 100 characters
shipping_address
    .address_line_2
stringUp to 100 characters
shipping_address
    .city
stringUp to 50 characters
shipping_address
    .state
stringState abbreviation
shipping_address
    .postal_code
stringRequired for L3
shipping_address
    .country
string
shipping_address
    .email
stringEmail address (must be valid email format, "example@mail.com")
shipping_address
    .phone
stringDigits only
shipping_address
    .fax
stringDigits only
group_namestring"default"custom fields group name
custom_fieldsobjectObject 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_statusstring""Required for HSA/FSA Valid values are: "verified" or "exempt"
additional_amountsobject
additional_amounts
    .hsa
    .total
int0Required for HSA/FSA Total amount for HSA/FSA, passed as an unsigned integer
additional_amounts
    .hsa
    .rx_amount
int0RX AMount for HSA/FSA, passed as an unsigned integer
additional_amounts
    .hsa
    .vision_amount
int0Vision Mount for HSA/FSA, passed as an unsigned integer
additional_amounts
    .hsa
    .clinic_amount
int0Clinic Mount for HSA/FSA, passed as an unsigned integer
additional_amounts
    .hsa
    .dental_amount
int0Dental Mount for HSA/FSA, passed as an unsigned integer
line_itemsarrayArray of line itemsRequired for L3
line_items[]
    name
stringFriendly name up to 50 alpha characters
line_items[]
    description
stringProduct Description up to 50 alpha characters
line_items[]
    product_code
stringProduct Code/SKU up to 50 alpha characters
line_items[]
    commodity_code
stringCommodity Code up to 12 alpha characters
line_items[]
    quantity
float64Quantity ##.##
line_items[]
    discount_amount
intin cents
line_items[]
    freight_amount
intin cents
line_items[]
    unit_price
intin cents
line_items[]
    tax_amount
intin cents
line_items[]
    national_tax_amount
intin cents
line_items[]
    amount
intin cents
line_items[]
    national_tax_rate
string3 decimal rate. 10% = 10.000
line_items[]
    tax_rate
string3 decimal rate. 10% = 10.000
line_items[]
    unit_of_measure
string
processor_specificobjectOptional: this only applys to specific processor types
processor_specific
    .paysafe_direct
    .subscription_trial_solution
bool
processor_specific
    .paysafe_direct
    .subscription_start_date
stringYYYY-MM-DD
processor_specific
    .paysafe_direct
    .subscription_trial_start_date
stringYYYY-MM-DD
processor_specific
    .paysafe_direct
    .subscription_trial_end_date
stringYYYY-MM-DD
processor_specific
    .paysafe_direct
    .subscription_secondary_billing_date
stringYYYY-MM-DD
processor_specific
    .paysafe_direct
    .subscription_cancel_url
stringweburl
processor_specific
    .paysafe_direct
    .subscription_amount
uintin cents
processor_specific
    .paysafe_direct
    .subscription_unit_cost
uintin cents
processor_specific
    .paysafe_direct
    .subscription_item_quantity
uint
processor_specific
    .paysafe_direct
    .subscription_product_desc
string
descriptorobjectOptional: 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)
subscriptionsarrayArray of subscriptions
card_on_file_indicatorstring[CR]Optional value, C = General purpose storage, R = recurring payment
initiated_bystring"customer" or "merchant"Who is inititating the transaction, "customer" or "merchant"
initial_transaction_idstringOptional if using our tokenization, otherwise this is transaction id used when storing the payment
stored_credential_indicatorstringOptional if using our tokenization, otherwise "used" or "stored"

Code Samples

bash
curl -v -X POST \
  -H "Authorization: APIKEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "sale",
    "amount": 1112,
    "tax_amount": 100,
    "shipping_amount": 100,
    "currency": "USD",
    "description": "test transaction",
    "order_id": "someOrderID",
    "po_number": "somePONumber",
    "ip_address": "4.2.2.2",
    "email_receipt": false,
    "email_address": "user@home.com",
    "create_vault_record": true,
    "payment_method": {
        "card": {
          "entry_type": "keyed",
          "number": "4012000098765439",
          "expiration_date": "12/20",
          "cvc": "999"
        }
        ... or ...
        "customer": {
          "id": "b798ls2q9qq646ksu070",
          "payment_method_type": "card",
          "payment_method_id": "b798ls2q9qq646ksu080",
          "billing_address_id": "b798ls2q9qq646ksu07g",
          "shipping_address_id": "b798ls2q9qq646ksu07g"
        }
        ... or ...
        "terminal": {
          "id": "<terminal id>"
          "expiration_date": "12/20",
          "cvc": "999",
          "print_receipt": "both"
          "signature_required": true
        }
        ... or ...
        "token": "<tokenizer token goes here>",
        ... or ...
        "ach": {
          "routing_number": "490000018",
          "account_number": "999999",
          "sec_code": "ccd",
          "account_type": "checking",
          "check_number":"1223",
          "accountholder_authentication": {
            "dl_state": "IL",
            "dl_number": "r500123123"
          }
          ... or ...
        "apm": {
          "type": "alipay",
          "merchant_redirect_url": "http://merchantwebsite.com/",
          "locale": "en-US",
          "mobile_view": false
        }
      }
    },
    "billing_address" : {
        "first_name": "John",
        "last_name": "Smith",
        "company": "Test Company",
        "address_line_1": "123 Some St",
        "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",
        "city": "Wheaton",
        "state": "IL",
        "postal_code": "60187",
        "country": "US",
        "phone": "5555555555",
        "fax": "5555555555",
        "email": "help@website.com"
    }
}'   \
"https://sandbox.fluidpay.com/api/transaction"

CIT - MIT

TIP

When processing transactions the following variables are available for including CIT/MIT variables to the processors.

NameRequiredDescription
card_on_file_indicatorOptional
initiated_byRequiredIndicates who initiated the transaction.
initial_transaction_idOptionalOptional if using our tokenization
stored_credential_indicatorOptionalIndicates if a stored payment was used or not
billing_methodOptionalDefaults 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

NameTypeRequiredDescription
typestringyesType of request, "integrations"
statestringnoBilling address state
binstringno6 - 19 digits of a card
customer_idstringnoCustomer ID
payment_idstringnoPayment method ID for a customer
payment_methodstringyesThe method of payment, i.e 'card' or 'ach'
base_amountuintyesAmount 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

NameTypeRequiredDefaultDescription
processor_idstringtrue
subtotaluinttruenull
amountuintif line_items or products not presentnull
currencystringtrue
payment_methodstringtrueCan be 'card' or 'ach'
transaction_typestringtrueCan be 'verification', 'auth', 'sale', 'void', 'refund', 'credit'
productsarrayif amount or line_items not presentnull
products[].idstringtrue
products[].namestringtrue
products[].descriptionstringfalse
products[].pricestringtrue
products[].local_taxstringfalse
products[].national_taxstringfalse
products[].fixed_amountboolfalsefalse
products[].fixed_qtyboolfalsefalse
products[].unit_of_measurestringfalsenull
line_itemsarrayif amount or products not presentnull
line_items[].idstringtrue
line_items[].statusstringtrueCan be 'paid', 'pending', 'rejected'
line_items[].typestringtrueCan be 'flat' or 'percentage'
line_items[].namestringtrueIf 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[].descriptionstringfalsefalseIf true, the calculated amount will be added to the total amount
line_items[].unit_priceinttrue
line_items[].quantityfloat64true
line_items[].quantity_shippedfloat64false
line_items[].product_codestringfalse
line_items[].commodity_codestringfalse
line_items[].unit_of_measurestringfalse
line_items[].alternate_tax_identifierstringfalse
line_items[].taxableboolfalsefalse
line_items[].local_tax_ratestringfalseFormat is 10.25
line_items[].national_tax_ratestringfalseFormat is 10.25
line_items[].tax_ratestringfalseFormat is 10.25
line_items[].discount_amountuintfalse
line_items[].freight_amountuintfalse
line_items[].discount_ratestringfalse
processor_payment_adjustmentobjectfalsenull
processor_payment_adjustment.typestringtrueCan be 'flat' or 'percentage'
processor_payment_adjustment.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
shipping_amountobjectfalsenull
shipping_amount.typestringtrueCan be 'flat' or 'percentage'
shipping_amount.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
addon_amountarrayfalsenull
addon_amount[].typestringtrueCan be 'flat' or 'percentage'
addon_amount[].valueuinttrueIf 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[].includeboolfalsefalseIf true, the calculated amount will be added to the total amount
discount_amountarrayfalsenull
discount_amount[].typestringtrueCan be 'flat' or 'percentage'
discount_amount[].valueuinttrueIf 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[].includeboolfalsefalseIf true, the calculated amount will be added to the total amount
duty_amountobjectfalsenull
duty_amount.typestringtrueCan be 'flat' or 'percentage'
duty_amount.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
tip_amountobjectfalsenull
tip_amount.typestringtrueCan be 'flat' or 'percentage'
tip_amount.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
additional_amountsarrayfalsenull
additional_amounts[].typestringtrueCan be 'flat' or 'percentage'
additional_amounts[].valueuinttrueIf 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[].includeboolfalsefalseIf true, the calculated amount will be added to the total amount
tax_amountobjectfalsenull
tax_amount.typestringtrueCan be 'flat' or 'percentage'
tax_amount.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
national_tax_amountobjectfalsenull
national_tax_amount.typestringtrueCan be 'flat' or 'percentage'
national_tax_amount.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
local_tax_amountobjectfalsenull
local_tax_amount.typestringtrueCan be 'flat' or 'percentage'
local_tax_amount.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
service_feeobjectfalsenull
service_fee.typestringtrueCan be 'flat' or 'percentage'
service_fee.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
surchargeobjectfalsenull
surcharge.typestringtrueCan be 'flat' or 'percentage'
surcharge.valueuinttrueIf 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.includeboolfalsefalseIf true, the calculated amount will be added to the total amount
cc_binstringif surcharge allowednull
countrystringif surcharge allowednull
statestringif surcharge allowednull
flagsobjectfalse
flags.skip_cash_discountboolfalsefalseIf true, skips the cash discount calculation
flags.skip_surchargeboolfalsefalseIf true, skips the cash surcharge calculation
flags.skip_service_feeboolfalsefalseIf true, skips the cash service fee calculation
flags.skip_consumer_choiceboolfalsefalseIf true, skips the cash consumer choice calculation
flags.include_default_tax_to_totalboolfalsenullIf true, and tax has not been overridden, the merchant's default tax amount will be added to the total amount
flags.tax_exemptboolfalsenullIf true, sets the national, local and tax amount fields to 0
flags.processor_surcharge_fallbackboolfalsefalseIf true, processor's surcharge fallback will be available
flags.add_tax_to_totalboolfalsenullIf true, the tax will be added to the total amount
sourcestringfalse

Workflow:

  1. Call the Amount calculation endpoint with the properly filled request
  2. 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
  3. 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 CodeProcessor DefinitionDescription
0UnknownUnknown, please contact support for more information
99Pending paymentUsed in redirect processors prior to payment being received
100ApprovedTransaction was successfully approved
110Partial approvalTransaction was successfully approved, but for a lesser amount
200 - 299DeclineTransaction has been declined by the issuer for various reasons
300 - 399Gateway DeclinePlatform decline for configuration or fraud reasons
400 - 499Transaction error returned by processorErrors returned from the processor

AVS Response Codes

Address verification response codes (AVS)


AVS Response CodeDefinitionCode Applies toCard Brands
0AVS Not AvailableDomestic + InternationalV, MC, AX, D, PP, JCB
AAddress match onlyDomestic + InternationalV, AX, D,PP, JCB
BAddress matches, ZIP not verifiedDomestic + InternationalV
CIncompatible formatDomestic + InternationalV
DExact matchInternationalV
FExact match, UK-issued cardsDomestic + InternationalV
GNon-U.S. Issuer does not participateInternationalV
INot verifiedInternationalV, D, PP, JCB
MExact matchInternationalV
NNo address or ZIP matchDomestic + InternationalV, MC, AX, D, PP, JCB
PPostal Code matchDomestic + InternationalV
RIssuer system unavailableDomesticV, MC, AX, D, PP, JCB
SService not supportedDomesticMC, AX, D, PP, JCB
UAddress unavailableDomesticV, MC, AX, D, PP, JCB
W9-character numeric ZIP match onlyDomestic + International (MC)MC, D, PP, JCB
XExact match, 9-character numeric ZIPDomestic + International (MC)MC, D, PP, JCB
YExact match, 5-character numeric ZIPDomesticV, MC, AX, D, PP, JCB
Z5-character ZIP match onlyDomestic + International (V)V, MC, AX, D, PP, JCB
LPartial match, Name and billing postal code matchFor AMEX cards onlyAX
1Cardholder name and ZIP matchDomesticAX
2Cardholder name, address and ZIP matchDomesticAX
3Cardholder name and address matchDomesticAX
4Cardholder name matchesDomesticAX
5Cardholder name incorrect, ZIP matchesDomesticAX
6Cardholder name incorrect, address and zip matchDomesticAX
7Cardholder name incorrect, address matchesDomesticAX
8Cardholder name, address, and ZIP do not matchDomesticAX

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.

Request Method: POST

URL Endpoint: /api/transaction/search

QuerySearchString: Operator can be =, !=

QuerySearchInt: Operator can be =, !=, <, >

json
Example Body
{
  "{name}": {
    "operator": "=", // =, !=, <, >
    "value": "{value}"
  }
}
NameTypeDescription
transaction_idQuerySearchStringSearches for transaction id
user_idQuerySearchStringSearches for user_id
typeQuerySearchStringSearches for transaction type (sale, authorize...etc)
ip_addressQuerySearchStringSearches for ip_address, either ipv4 or ipv6
amountQuerySearchIntSearches for originally requested amount
amount_authorizedQuerySearchIntSearches for amount_authorized
amount_capturedQuerySearchIntSearches for amount_captured
amount_settledQuerySearchIntSearches for amount_settled
tax_amountQuerySearchIntSearches for tax_amount
po_numberQuerySearchStringSearches for po_number
order_idQuerySearchStringSearches for order_id
payment_methodQuerySearchStringSearches by payment_method, (token, card, terminal)
payment_typeQuerySearchStringSearches by payment_type (card, echeck)
statusQuerySearchStringSearches by transaction status (unknown, declined, authorized, pending_settlement, settled, voided, reversed, refunded)
processor_idQuerySearchStringSearches by processor_id
customer_idQuerySearchStringSearches by customer_id
created_atQueryDateRangeSearches by created_at between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
captured_atQueryDateRangeSearches by captured_at between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
settled_atQueryDateRangeSearches by settled_at between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
billing_address
    .address_id
QuerySearchStringSearches by billing_address.id
billing_address
    .first_name
QuerySearchStringSearches by billing_address.first_name (0-50 characters)
billing_address
    .last_name
QuerySearchStringSearches by billing_address.last_name (0-50 characters)
billing_address
    .company
QuerySearchStringSearches by billing_address.company (0-50 characters)
billing_address
    .address_line_1
QuerySearchStringSearches by billing_address.address_line_1 (0-100 characters)
billing_address
    .address_line_2
QuerySearchStringSearches by billing_address.address_line_2 (0-100 characters)
billing_address
    .city
QuerySearchStringSearches by billing_address.city (0-50 characters)
billing_address
    .state
QuerySearchStringSearches by billing_address.state (2 Character)
billing_address
    .postal_code
QuerySearchStringSearches by billing_address.postal_code (0-6 Characters)
billing_address
    .country
QuerySearchStringSearches by billing_address.country (2 Characters)
billing_address
    .email
QuerySearchStringSearches by billing_address.email
billing_address
    .phone
QuerySearchStringSearches by billing_address.phone (0-14 digits only)
billing_address
    .fax
QuerySearchStringSearches by billing_address.fax (0-14 digits only)
shipping_address
    .address_id
QuerySearchStringSearches by shipping_address.id
shipping_address
    .first_name
QuerySearchStringSearches by shipping_address.first_name (0-50 characters)
shipping_address
    .last_name
QuerySearchStringSearches by shipping_address.last_name (0-50 characters)
shipping_address
    .company
QuerySearchStringSearches by shipping_address.company (0-50 characters)
shipping_address
    .address_line_1
QuerySearchStringSearches by shipping_address.address_line_1 (0-100 characters)
shipping_address
    .address_line_2
QuerySearchStringSearches by shipping_address.address_line_2 (0-100 characters)
shipping_address
    .city
QuerySearchStringSearches by shipping_address.city (0-50 characters)
shipping_address
    .state
QuerySearchStringSearches by shipping_address.state (2 Character)
shipping_address
    .postal_code
QuerySearchStringSearches by shipping_address.postal_code (0-6 Characters)
shipping_address
    .country
QuerySearchStringSearches by shipping_address.country (2 Characters)
shipping_address
    .email
QuerySearchStringSearches by shipping_address.email
shipping_address
    .phone
QuerySearchStringSearches by shipping_address.phone (0-14 digits only)
shipping_address
    .fax
QuerySearchStringSearches by shipping_address.fax (0-14 digits only)
limitintegerMaximum records to return (0-100)
offsetintegerNumber 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

NameTypeDefaultDescriptionRequired
amountintegeramount from authTotal amount to capture, in cents. (1299 = $12.99)
tax_amountintegertax_amount from authTax amount to capture, in cents. (199 = $1.99)
shipping_amountintegershipping_amount from authShipping amount to capture, in cents. (299 = $2.99)
tax_exemptbooleanfalseIs the transaction tax exempt
order_idstringorder_id from authAlphanumeric (max 17 characters)
po_numberstringpo_number from authAlphanumeric (max 17 characters)
ip_addressstringip_address from authIPV4 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

NameTypeDefaultDescriptionRequired
amountintegeramount from authTotal amount to capture, in cents. (1299 = $12.99)
surchargeintegernullSurcharge amount, in cents. (1299 = $12.99)

Settlement Batches

Batch Terminal

You can settle individual terminals by sending a POST request to the following endpoint: /api/terminal/{terminalID}/settle

TIP

You can use batch_number to identify the batch number for a specific transaction.

For a terminal transaction you will get a BatchNum in the response in data->response_body->terminal->processor_specific->BatchNum

You can see an example in the terminal tab response Transaction

Retrieve details for all settlement batches that match provided search criteria.

Request Method: POST

URL Endpoint: /api/settlement/batch/search

NameTypeDefaultDescriptionRequired
batch_dateobjectObject containing details defining a batch date range
batch_date
    .start_date
string""Searches by batch_date between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
batch_date
    .end_date
string""Searches by batch_date between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
settlement_batch_idobjectObject containing details defining a range of id's
settlement_batch_id
    .operator
string literal"=" or "!="
settlement_batch_id
    .value
stringThe settlement batch id to match or exclude
limitinteger10The number of results to return (1-100)
offsetinteger0The number of results to skip (1-1000)

File Batch

Upload File

Upload a CSV file for batch processing.

TIP

CSV File Format

The input file for the upload endpoint should contain records to process in the following format (example below):

  • First row should be a header using the fields below, fields can be in any order and not all fields are required.
  • Each field should be wrapped in quotes and should not contain any quotes
  • Each field should be seperated with a comma
  • Each row should be terminated with a newline \n character.

Request Method: POST

URL Endpoint: /api/filebatch

NameTypeDefaultDescriptionRequired
transaction_typestring"verification", "authorize", "capture", "sale", "credit" or "refund"*
cc_numberstringCC Numberif credit card
cc_expirationstringCC Expiration Dateif credit card
cc_cvcstringOptional unless your account requires CVC for processing
ach_account_numberstringACH account numberif ACH
ach_routing_numberstringACH routing numberif ACH
ach_account_typestring"checking" or "savings"if ACH
ach_sec_codestringSEC code: "WEB", "CCD", or "PPD"if ACH
customer_idstringcustomer vault id to chargeif using customer vault
amountintegerTotal amount to process in cents (100 = $1.00)*
shipping_amountintegerShipping amount to process in cents (100 = $1.00)
tax_amountintegerTax amount to process in cents (100 = $1.00)
discount_amountintegerDiscount amount to process in cents (100 = $1.00)
order_idstringAlphanumeric string for reference (max 17 characters)
descriptionstringAlphanumeric string for notes (max 100 characters)
po_numberstringAlphanumeric string for reference (max 17 characters)
tax_exemptbooleanfalseis the transaction tax exempt
email_addressstringEmail address to tag to the transaction, emails are not sent.
processor_idstringProcessor ID to process the transaction, otherwise the default is used.
billing_first_namestring
billing_last_namestring
billing_companystring
billing_address_line_1string
billing_address_line_2string
billing_citystring
billing_statestring
billing_postal_codestring
billing_countrystring
billing_phonestring
billing_faxstring
billing_emailstring
shipping_first_namestring
shipping_last_namestring
shipping_companystring
shipping_address_line_1string
shipping_address_line_2string
shipping_citystring
shipping_statestring
shipping_postal_codestring
shipping_countrystring
shipping_phonestring
shipping_faxstring
shipping_emailstring

Get Status

Get the current status of a specified settlement batch.

Request Method: GET

URL Endpoint: /api/filebatch/{ batch id }

js
function getBatchStatus(batchId) {
  var myHeaders = new Headers();

  myHeaders.append("Authorization", apiKey);

  myHeaders.append("Content-Type", "application/json");

  var requestOptions = {
    method: "GET",

    headers: myHeaders,
  };

  fetch("https://sandbox.fluidpay.com/api/filebatch/" + batchId, requestOptions)
    .then((response) => response.text())

    .then((result) => {
      if (result.status === "success") {
        // handle success

        var message = result.msg;
      } else {
        // handle non success
      }
    })

    .catch((error) => console.log("error", error));
}

Download File

Returns a CSV text response for the specified batch.

Request Method: GET

URL Endpoint: /api/filebatch/{ batch id }/download

js
function downloadBatchFile(batchId) {
  var myHeaders = new Headers();

  myHeaders.append("Authorization", apiKey);

  myHeaders.append("Content-Type", "application/json");

  var requestOptions = {
    method: "GET",

    headers: myHeaders,
  };

  fetch(
    "https://sandbox.fluidpay.com/api/filebatch/" + batchId + "/download",
    requestOptions
  )
    .then((response) => {
      if (response.ok) {
        return response.text().then((csvData) => {
          // return csv file.. csvData
        });
      } else {
        return response.text().then((result) => {
          var msg = result.msg;
        });
      }
    })

    .catch((error) => console.log("error", error));
}

Recurring

Add-Ons

Add-ons are used to adjust a recurring charge amount, either by a set amount or a percentage of the subscription amount.

Create Add-On

Create a new recurring plan add-on.

Request Method: POST

URL Endpoint: /api/recurring/addon

NameTypeDefaultDescriptionRequired
namestring""Display name for the add-on
descriptionstring""Description for the add-on
amountintegernullAmount to be added in cents (100 = $1.00)* (see note below)
percentageintegernullPercentage of original charge to be added (must be 0 or a percentage between .1% and 100%, expressed in thousandths. 43440 = 43.440%)* (see note below)
durationinteger0Number of times for the add-on to be billed (use 0 if you want the add-on to persist until cancelled)

TIP

Either amount or percentage may be provided, but not both.

Get Add-On By ID

Retrieve details for the specified add-on.

Request Method: GET

URL Endpoint: /api/recurring/addon/{ add-on id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89ffdqj8m0o735i19i0",
    "name": "test plan",
    "description": "just a simple test plan",
    "amount": 100,
    "percentage": null,
    "duration": 0,
    "created_at": "2017-11-20T15:41:43.330315Z",
    "updated_at": "2017-11-20T15:41:43.330315Z"
  }
}

Get All Add-Ons

Retrieve details for all add-ons accosciated with the gateway account.

Request Method: GET

URL Endpoint: /api/recurring/addons

json
{
  "status": "success",
  "msg": "success",
  "data": [
    {
      "id": "b75cvl51tlv38t0o7o30",
      "name": "test_addon",
      "description": "some description",
      "amount": 100,
      "percentage": null,
      "duration": 0,
      "created_at": "2017-09-26T22:08:20Z",
      "updated_at": "2017-09-26T22:08:20Z"
    },
    {
      "id": "b779mpt1tlv96kdv2n20",
      "name": "test_addon_percent",
      "description": "",
      "amount": null,
      "percentage": 10,
      "duration": 0,
      "created_at": "2017-10-09T20:39:41Z",
      "updated_at": "2017-10-09T20:39:41Z"
    },
    {
      "id": "b89ffdqj8m0o735i19i0",
      "name": "test plan",
      "description": "just a simple test plan",
      "amount": 100,
      "percentage": null,
      "duration": 0,
      "created_at": "2017-11-20T15:41:43Z",
      "updated_at": "2017-11-20T15:41:43Z"
    }
  ],
  "total_count": 3
}

Update Add-On

Edit details for the specified add-on.

Request Method: POST

URL Endpoint: /api/recurring/addon/{ add-on id }

NameTypeDefaultDescriptionRequired
namestring""Display name for the add-on
descriptionstring""Description for the add-on
amountintegernullAmount to be added in cents (100 = $1.00)* (see note below)
percentageintegernullPercentage of original charge to be added (must be 0 or a percentage between .1% and 100%, expressed in thousandths. 43440 = 43.440%)* (see note below)
durationinteger0Number of times for the add-on to be billed (use 0 if you want the subscription to persist until cancelled)

TIP

Either amount or percentage may be provided, but not both.

Delete Add-On

Delete the specified add-on.

Request Method: DELETE

URL Endpoint: /api/recurring/addon/{ add-on id }

json
{
  "status": "success",
  "msg": "success",
  "data": null
}

Discounts

Create Discount

Create a new recurring plan discount. Discounts are used to adjust a recurring charge amount either by a set amount or a percentage of the subscription amount.

Request Method: POST

URL Endpoint: /api/recurring/discount

NameTypeDefaultDescriptionRequired
namestring""Display name for the discount
descriptionstring""Description for the discount
amountintegernullAmount to be discounted in cents (100 = $1.00)* (see note below)
percentageintegernullPercentage of original charge to be discounted (must be 0 or a percentage between .1% and 100%, expressed in thousandths. 43440 = 43.440%)* (see note below)
durationinteger0Number of times for the discount to be billed (use 0 if you want the discount to persist until cancelled)

TIP

Either amount or percentage may be provided, but not both.

Get Discount By ID

Retrieve details for the specified discount.

Request Method: GET

URL Endpoint: /api/recurring/discount/{ discount id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89flfqj8m0o735i19ig",
    "name": "test discount",
    "description": "just a simple test discount",
    "amount": 100,
    "percentage": null,
    "duration": 0,
    "created_at": "2017-11-20T15:54:39.851636Z",
    "updated_at": "2017-11-20T15:54:39.851636Z"
  }
}

Get All Discounts

Retrieve the properties of all discounts for the gateway account associated with the API Key or JWT token provided in the Authorization header.

Request Method: GET

URL Endpoint: /api/recurring/discounts

json
{
  "status": "success",
  "msg": "success",
  "data": [
    {
      "id": "b89flfqj8m0o735i19ig",
      "name": "test discount",
      "description": "just a simple test discount",
      "amount": 100,
      "percentage": null,
      "duration": 0,
      "created_at": "2017-11-20T15:54:40Z",
      "updated_at": "2017-11-20T15:54:40Z"
    },
    {
      "id": "b779mpt1tlv96kdv2n20",
      "name": "test_discount_percent",
      "description": "",
      "amount": null,
      "percentage": 10,
      "duration": 0,
      "created_at": "2017-10-09T20:59:52Z",
      "updated_at": "2017-10-09T20:59:52Z"
    }
  ],
  "total_count": 2
}

Update Discount

Edit details for the specified discount.

Request Method: POST

URL Endpoint: /api/recurring/discount/{ discount id }

NameTypeDefaultDescriptionRequired
namestring""Display name for the discount
descriptionstring""Description for the discount
amountintegernullAmount to be discounted in cents (100 = $1.00)* (see note below)
percentageintegernullPercentage of original charge to be discounted (must be 0 or a percentage between .1% and 100%, expressed in thousandths. 43440 = 43.440%)* (see note below)
durationinteger0Number of times for the discount to be billed (use 0 if you want the discount to persist until cancelled)

TIP

Either amount or percentage may be provided, but not both.

Delete Discount

Delete the specified discount.

Request Method: DELETE

URL Endpoint: /api/recurring/discount/{ discount id }

json
{
  "status": "success",
  "msg": "success",
  "data": null
}

Plans

Create Plan

Creates a new recurring plan with discounts and/or add-ons.

Request Method: POST

URL Endpoint: /api/recurring/plan

NameTypeDefaultDescriptionRequired
namestring""Display name for the plan*
descriptionstring""Description for the plan
amountintegernullAmount to be billed in cents (100 = $1.00)*
billing_cycle_intervalintegernullHow often to run the billing cycle (run every X months)*
billing_frequencystring literal"monthly"How often to run the plan within a billing cycle. ("monthly", "twice_monthly", "daily")*
billing_daysstringnullWhich day of the month to bill on. If "twice_monthly" then comma separate dates ("1, 15"). For the last day of the month, use "0".*
charge_on_daybooleanfalseIf true, this will set the billing day to the current day
durationinteger0Number of times for the plan to be billed (use 0 if you want the plan to persist until cancelled)
add_onsarray of objectsEnumerates add-ons for a recurring plan
add_ons[#]
    .id
stringID of the referenced add_on
add_ons[#]
    .name
stringDisplay name for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .description
stringDescription for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .amount
intAmount to be added (optional, this overrides the add_ons value)
add_ons[#]
    .duration
intDuration for the add_on to be billed (optional, this overrides the add_ons value)
discountsarray of objectsEnumerates discounts for a recurring plan
discounts[#]
    .id
stringID of the referenced discount
discounts[#]
    .name
stringDisplay name for the discount (optional, this overrides the discount value)
discounts[#]
    .description
stringDescription for the discount (optional, this overrides the discount value)
discounts[#]
    .amount
intAmount to be discounted (optional, this overrides the discount value)
discounts[#]
    .duration
intDuration for the discount to be billed (optional, this overrides the discount value)

Get Plan By ID

Retrieve details for the specified plan.

Request Method: GET

URL Endpoint: /api/recurring/plan/{ plan id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89g35qj8m0o735i19jg",
    "name": "test plan",
    "description": "just a simple test plan",
    "amount": 100,
    "billing_cycle_interval": 1,
    "billing_frequency": "twice_monthly",
    "billing_days": "1,15",
    "total_add_ons": 100,
    "total_discounts": 50,
    "duration": 0,
    "add_ons": [
      {
        "id": "b75cvl51tlv38t0o7o30",
        "name": "test_addon",
        "description": "this will add to the cost of the subscription",
        "amount": 100,
        "percentage": null,
        "duration": 0,
        "created_at": null,
        "updated_at": null
      }
    ],
    "discounts": [
      {
        "id": "b89flfqj8m0o735i19ig",
        "name": "test discount",
        "description": "this will discount the cost of the subscription",
        "amount": 50,
        "percentage": null,
        "duration": 0,
        "created_at": null,
        "updated_at": null
      }
    ],
    "created_at": "2017-11-20T16:23:51.990051Z",
    "updated_at": "2017-11-20T16:23:51.990051Z"
  }
}

Get All Plans

Retrieve the properties of all plans for the gateway account associated with the API Key or JWT token provided in the Authorization header.

Request Method: GET

URL Endpoint: /api/recurring/plans

json
{
  "status": "success",
  "msg": "success",
  "data": [
    {
      "id": "b89g35qj8m0o735i19jg",
      "name": "test plan",
      "description": "just a simple test plan",
      "amount": 100,
      "billing_cycle_interval": 1,
      "billing_frequency": "twice_monthly",
      "billing_days": "1,15",
      "total_add_ons": 100,
      "total_discounts": 50,
      "duration": 0,
      "add_ons": [
        {
          "id": "b75cvl51tlv38t0o7o30",
          "name": "test_addon",
          "description": "this will add to the cost of the subscription",
          "amount": 100,
          "percentage": null,
          "duration": 0,
          "created_at": null,
          "updated_at": null
        }
      ],
      "discounts": [
        {
          "id": "b89flfqj8m0o735i19ig",
          "name": "test discount",
          "description": "this will discount the cost of the subscription",
          "amount": 50,
          "percentage": null,
          "duration": 0,
          "created_at": null,
          "updated_at": null
        }
      ],
      "created_at": "2017-11-20T16:23:52Z",
      "updated_at": "2017-11-20T16:23:52Z"
    }
  ],
  "total_count": 1
}

Update Plan

Edit details for the specified plan.

Request Method: POST

URL Endpoint: /api/recurring/plan/{ plan id }

NameTypeDefaultDescriptionRequired
namestring""Display name for the plan*
descriptionstring""Description for the plan
amountintegernullAmount to be billed in cents (100 = $1.00)*
billing_cycle_intervalintegernullHow often to run the billing cycle (run every X months)*
billing_frequencystring literal"monthly"How often to run the plan within a billing cycle. ("monthly", "twice_monthly", "daily")*
billing_daysstringnullWhich day of the month to bill on. If "twice_monthly" then comma separate dates ("1, 15"). For the last day of the month, use "0".*
charge_on_daybooleanfalseIf true, this will set the billing day to the current day
durationinteger0Number of times for the plan to be billed (use 0 if you want the plan to persist until cancelled)
add_onsarray of objectsEnumerates add-ons for a recurring plan
add_ons[#]
    .id
stringID of the referenced add_on
add_ons[#]
    .name
stringDisplay name for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .description
stringDescription for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .amount
intAmount to be added (optional, this overrides the add_ons value)
add_ons[#]
    .duration
intDuration for the add_on to be billed (optional, this overrides the add_ons value)
discountsarray of objectsEnumerates discounts for a recurring plan
discounts[#]
    .id
stringID of the referenced discount
discounts[#]
    .name
stringDisplay name for the discount (optional, this overrides the discount value)
discounts[#]
    .description
stringDescription for the discount (optional, this overrides the discount value)
discounts[#]
    .amount
intAmount to be discounted (optional, this overrides the discount value)
discounts[#]
    .duration
intDuration for the discount to be billed (optional, this overrides the discount value)
update_subscriptionsbooleanfalseIf true, this will update the amount for all subscriptions that have this plan ID

Delete Plan

Delete the specified plan.

Request Method: DELETE

URL Endpoint: /api/recurring/plan/{ plan id }

json
{
  "status": "success",
  "msg": "success",
  "data": null
}

Subscriptions

Create Subscription

Creates a new subscription which applies a recurring billing plan to a customer.

Request Method: POST

URL Endpoint: /api/recurring/subscription

NameTypeDefaultDescriptionRequired
plan_idstring""ID of the plan being subscribed to
descriptionstring""Description for the subscription
customerobjectObject containing details for the customer being subscribed to the plan
customer
    .id
stringID for the customer being subscribed to the billing plan*
customer
    .payment_method_type
stringdefault payment method type"card" or "ach"
customer
    .payment_method_id
stringdefault payment method idID of the customer's saved payment method to use for the billing planrequired if payment_method_type is present
customer
    .billing_address_id
stringdefault billing addressID of the customer's saved billing address to use for the billing plan
customer
    .shipping_address_id
stringdefault shipping addressID of the customer's saved shipping address to use for the billing plan
amountintegernullAmount to be billed in cents (100 = $1.00)*
billing_cycle_intervalintegernullHow often to run the billing cycle (run every X months)*
billing_frequencystring literal"monthly"How often to run the subscription within a billing cycle. ("monthly", "twice_monthly", "daily")*
billing_daysstringnullWhich day of the month to bill on. If "twice_monthly" then comma separate dates ("1, 15"). For the last day of the month, use "0".*
charge_on_daybooleanfalseIf true, this will set the billing day to the current day
durationinteger0Number of times for the subscription to be billed (use 0 if you want the subscription to persist until cancelled)
next_bill_datestring "YYYY-MM-DD"The date of the next time the billing plan will be processed
add_onsarray of objectsEnumerates add-ons for a recurring subscription
add_ons[#]
    .id
stringID of the referenced add_on
add_ons[#]
    .name
stringDisplay name for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .description
stringDescription for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .amount
intAmount to be added (optional, this overrides the add_ons value)
add_ons[#]
    .duration
intDuration for the add_on to be billed (optional, this overrides the add_ons value)
discountsarray of objectsEnumerates discounts for a recurring subscription
discounts[#]
    .id
stringID of the referenced discount
discounts[#]
    .name
stringDisplay name for the discount (optional, this overrides the discount value)
discounts[#]
    .description
stringDescription for the discount (optional, this overrides the discount value)
discounts[#]
    .amount
intAmount to be discounted (optional, this overrides the discount value)
discounts[#]
    .duration
intDuration for the discount to be billed (optional, this overrides the discount value)

Get Subscription By ID

Retrieve details for the specified subscription.

Request Method: GET

URL Endpoint: /api/recurring/subscription/{ subscription id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89gftaj8m0oft7upk80",
    "plan_id": "b89g35qj8m0o735i19jg",
    "description": "some description to describe the subscription",
    "customer": {
      "id": "b81ko5qq9qq5v460r9i0",
      "payment_method_type": "card",
      "payment_method_id": "b81ko5qq9qq5v460r9i0",
      "billing_address_id": "b81ko5qq9qq5v460r9i0",
      "shipping_address_id": "b81ko5qq9qq5v460r9i0"
    },
    "amount": 100,
    "total_adds": 0,
    "total_discounts": 50,
    "billing_cycle_interval": 1,
    "billing_frequency": "twice_monthly",
    "billing_days": "1,15",
    "duration": 0,
    "next_bill_date": "2017-11-22",
    "add_ons": null,
    "discounts": [
      {
        "id": "b89flfqj8m0o735i19ig",
        "description": "this will discount the cost of the subscription",
        "amount": 50,
        "percentage": null,
        "duration": 0
      }
    ],
    "created_at": "2017-11-20T16:51:01.798736Z",
    "updated_at": "2017-11-20T16:51:01.798736Z"
  }
}

Update Subscription

Edit details for the specified subscription.

Request Method: POST

URL Endpoint: /api/recurring/subscription/{ subscription id }

NameTypeDefaultDescriptionRequired
plan_idstring""ID of the plan being subscribed to
descriptionstring""Description for the subscription
customerobjectObject containing details for the customer being subscribed to the plan
customer
    .id
stringID for the customer being subscribed to the billing plan*
customer
    .payment_method_type
stringdefault payment method type"card" or "ach"
customer
    .payment_method_id
stringdefault payment method idID of the customer's saved payment method to use for the billing planrequired if payment_method_type is present
customer
    .billing_address_id
stringdefault billing addressID of the customer's saved billing address to use for the billing plan
customer
    .shipping_address_id
stringdefault shipping addressID of the customer's saved shipping address to use for the billing plan
amountintegernullAmount to be billed in cents (100 = $1.00)*
billing_cycle_intervalintegernullHow often to run the billing cycle (run every X months)*
billing_frequencystring literal"monthly"How often to run the subscription within a billing cycle. ("monthly", "twice_monthly", "daily")*
billing_daysstringnullWhich day of the month to bill on. If "twice_monthly" then comma separate dates ("1, 15"). For the last day of the month, use "0".*
charge_on_daybooleanfalseIf true, this will set the billing day to the current day
durationinteger0Number of times for the subscription to be billed (use 0 if you want the subscription to persist until cancelled)
next_bill_datestring "YYYY-MM-DD"The date of the next time the billing plan will be processed
add_onsarray of objectsEnumerates add-ons for a recurring subscription
add_ons[#]
    .id
stringID of the referenced add_on
add_ons[#]
    .name
stringDisplay name for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .description
stringDescription for the add_on (optional, this overrides the add_ons value)
add_ons[#]
    .amount
intAmount to be added (optional, this overrides the add_ons value)
add_ons[#]
    .duration
intDuration for the add_on to be billed (optional, this overrides the add_ons value)
discountsarray of objectsEnumerates discounts for a recurring subscription
discounts[#]
    .id
stringID of the referenced discount
discounts[#]
    .name
stringDisplay name for the discount (optional, this overrides the discount value)
discounts[#]
    .description
stringDescription for the discount (optional, this overrides the discount value)
discounts[#]
    .amount
intAmount to be discounted (optional, this overrides the discount value)
discounts[#]
    .duration
intDuration for the discount to be billed (optional, this overrides the discount value)

Pause Subscription

Pause the specified subscription.

Request Method: GET

URL Endpoint: /api/recurring/subscription/{ subscription id }/status/paused

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "cn9rrqbug2jpf9mtp6c0",
    "plan_id": "cn9rrkrug2jpf9mtp6bg",
    "plan_name": "",
    "status": "paused",
    "description": "",
    "customer_name": "",
    "shared": false,
    "customer": {
      "id": "cn9nrfbug2jpejn1kbeg",
      "payment_method_type": "",
      "payment_method_id": "",
      "billing_address_id": "",
      "shipping_address_id": ""
    },
    "amount": 100,
    "currency": "USD",
    "processor_id": "",
    "total_adds": 0,
    "total_discounts": 0,
    "billing_cycle_interval": 1,
    "billing_frequency": "monthly",
    "billing_days": "1",
    "duration": 0,
    "next_bill_date": "2024-02-19",
    "add_ons": null,
    "discounts": null,
    "expiration_date": "",
    "events": null,
    "created_at": "2024-02-19T20:45:30Z",
    "updated_at": "2024-02-19T20:45:50.953717Z",
    "charge_on_day": false
  }
}

Mark Subscription Past Due

Mark the specified subscription as past due.

Request Method: GET

URL Endpoint: /api/recurring/subscription/{ subscription id }/status/past_due

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "cnb14e3ug2jpf9mtp6k0",
    "plan_id": "cn9rrkrug2jpf9mtp6bg",
    "plan_name": "",
    "status": "past_due",
    "description": "",
    "customer_name": "",
    "shared": false,
    "customer": {
      "id": "cn9nrfbug2jpejn1kbeg",
      "payment_method_type": "",
      "payment_method_id": "",
      "billing_address_id": "",
      "shipping_address_id": ""
    },
    "amount": 100,
    "currency": "USD",
    "processor_id": "",
    "total_adds": 0,
    "total_discounts": 0,
    "billing_cycle_interval": 1,
    "billing_frequency": "monthly",
    "billing_days": "1",
    "duration": 0,
    "next_bill_date": "2024-02-21",
    "add_ons": null,
    "discounts": null,
    "expiration_date": "",
    "events": null,
    "created_at": "2024-02-21T15:09:45Z",
    "updated_at": "2024-02-21T15:13:03.001456Z",
    "charge_on_day": false
  }
}

Cancel Subscription

Cancel the specified subscription.

Request Method: GET

URL Endpoint: /api/recurring/subscription/{ subscription id }/status/cancelled

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "cn9rrqbug2jpf9mtp6c0",
    "plan_id": "cn9rrkrug2jpf9mtp6bg",
    "plan_name": "",
    "status": "cancelled",
    "description": "",
    "customer_name": "",
    "shared": false,
    "customer": {
      "id": "cn9nrfbug2jpejn1kbeg",
      "payment_method_type": "",
      "payment_method_id": "",
      "billing_address_id": "",
      "shipping_address_id": ""
    },
    "amount": 100,
    "currency": "USD",
    "processor_id": "",
    "total_adds": 0,
    "total_discounts": 0,
    "billing_cycle_interval": 1,
    "billing_frequency": "monthly",
    "billing_days": "1",
    "duration": 0,
    "next_bill_date": "2024-02-19",
    "add_ons": null,
    "discounts": null,
    "expiration_date": "",
    "events": null,
    "created_at": "2024-02-19T20:45:30Z",
    "updated_at": "2024-02-19T21:05:39.561726Z",
    "charge_on_day": false
  }
}

Activate Subscription

Activate the specified subscription.

Request Method: GET

URL Endpoint: /api/recurring/subscription/{ subscription id }/status/active

Query Params

NameDefaultDescription
next_bill_dateDate in 'YYYY-MM-DD' format
json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "cn9rrqbug2jpf9mtp6c0",
    "plan_id": "cn9rrkrug2jpf9mtp6bg",
    "plan_name": "",
    "status": "active",
    "description": "",
    "customer_name": "",
    "shared": false,
    "customer": {
      "id": "cn9nrfbug2jpejn1kbeg",
      "payment_method_type": "",
      "payment_method_id": "",
      "billing_address_id": "",
      "shipping_address_id": ""
    },
    "amount": 100,
    "currency": "USD",
    "processor_id": "",
    "total_adds": 0,
    "total_discounts": 0,
    "billing_cycle_interval": 1,
    "billing_frequency": "monthly",
    "billing_days": "1",
    "duration": 0,
    "next_bill_date": "2024-02-19",
    "add_ons": null,
    "discounts": null,
    "expiration_date": "",
    "events": null,
    "created_at": "2024-02-19T20:45:30Z",
    "updated_at": "2024-02-19T21:10:36.976006Z",
    "charge_on_day": false
  }
}

Complete Subscription

Complete the specified subscription.

Request Method: GET

URL Endpoint: /api/recurring/subscription/{ subscription id }/status/completed

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "cn9rrqbug2jpf9mtp6c0",
    "plan_id": "cn9rrkrug2jpf9mtp6bg",
    "plan_name": "",
    "status": "completed",
    "description": "",
    "customer_name": "",
    "shared": false,
    "customer": {
      "id": "cn9nrfbug2jpejn1kbeg",
      "payment_method_type": "",
      "payment_method_id": "",
      "billing_address_id": "",
      "shipping_address_id": ""
    },
    "amount": 100,
    "currency": "USD",
    "processor_id": "",
    "total_adds": 0,
    "total_discounts": 0,
    "billing_cycle_interval": 1,
    "billing_frequency": "monthly",
    "billing_days": "1",
    "duration": 0,
    "next_bill_date": "2024-02-19",
    "add_ons": null,
    "discounts": null,
    "expiration_date": "",
    "events": null,
    "created_at": "2024-02-19T20:45:30Z",
    "updated_at": "2024-02-19T21:25:01.161503Z",
    "charge_on_day": false
  }
}

Delete Subscription

Delete the specified subscription.

Request Method: DELETE

URL Endpoint: /api/recurring/subscription/{ subscription id }

json
{
  "status": "success",
  "msg": "success",
  "data": null
}

Terminals

All transaction requests should be processed via the /transaction endpoint referencing the specific terminal to handle the request. Please see the Processing a Transaction section for more information.

Get All Terminals

Retrieve all terminals associated with the gateway account. This will include inactive/disabled terminals as well.

Request Method: GET

URL Endpoint: /api/terminals

json
{
  "status": "success",
  "msg": "",
  "total_count": 1,
  "data": [
    {
      "id": "1ucio551tlv85l7moe5s",
      "merchant_id": "aucio551tlv85l7moe5g",
      "manufacturer": "dejavoo",
      "model": "z11",
      "serial_number": "1811000XXXX",
      "tpn": "1811000XXXX",
      "description": "front counter z11",
      "status": "active",
      "auth_key": "wcR1c9o1",
      "register_id": "1",
      "auto_settle": true,
      "settle_at": "00:00:00",
      "created_at": "2018-01-12T03:57:59Z",
      "updated_at": "0001-01-01T00:00:00Z"
    }
  ]
}

Invoices

TIP

The invoice ID will be set to the following fields on a transaction when paid:

  • Order ID
  • PO number

This will allow you to look up a transaction by an invoice ID and vice versa. If you set the invoice number field on an invoice, then the transaction order ID field will be this invoice number in place of the invoice ID.

Create Invoice

Create a new invoice.

Request Method: POST

URL Endpoint: /api/invoice

NameTypeDefaultDescriptionRequired
currencystring literalCurrency that invoice amounts should be in ("USD", etc.)*
company_namestringName of company issuing the invoice
company_logo_urlstringHosted location of logo image to include on invoice
customer_numberstringOptional identifier for the invoiced customer to match merchant records
customer_idstringID of the saved customer being invoiced (must be a valid customer id if included)
invoice_numberstringOptional identifier for the invoice to match merchant records
payable_toobjectobject containing details for the person the invoice is being paid to*
payable_to
    .id
stringID of the stored address you want to make the invoice payable to
payable_to
    .first_name
stringFirst name
payable_to
    .last_name
stringLast name
payable_to
    .company
stringCompany name
payable_to
    .address_line_1
stringAddress line 1*
payable_to
    .address_line_2
stringAddress line 2
payable_to
    .city
stringCity*
payable_to
    .state
string literalState, in 2-character format ("KS", "QC", etc.))*
payable_to
    .postal_code
stringPostal code (must be a valid postal code for the country provided)*
payable_to
    .country
string literalCountry, in 2-character format ("US", "CA", "MX", etc.)*
payable_to
    .phone
stringPhone number
payable_to
    .fax
stringFax number
payable_to
    .email
stringEmail address (must be valid email format, "example@mail.com")
bill_toobjectobject containing details for the person the invoice is being billed to*
bill_to
    .id
stringID of the stored address you want to make the invoice billable to
bill_to
    .first_name
stringFirst name
bill_to
    .last_name
stringLast name
bill_to
    .company
stringCompany name
bill_to
    .address_line_1
stringAddress line 1*
bill_to
    .address_line_2
stringAddress line 2
bill_to
    .city
stringCity*
bill_to
    .state
string literalState, in 2-character ("KS", "QC", etc.)format*
bill_to
    .postal_code
stringPostal (must be a valid postal code for the country provided) code*
bill_to
    .country
string literalCountry, in 2-character ("US", "CA", "MX", etc.) format*
bill_to
    .phone
stringPhone number
bill_to
    .fax
stringFax number
bill_to
    .email
stringEmail address (must be valid email format, "example@mail.com")
date_duedatetime stringDate the invoice is due ("2021-02-13T06:00:00.000Z")by*
items[#]object arrayarray containing line items included in the invoice*
items[#]
    .status
string literal"pending" or "paid"*
items[#]
    .type
string""Type of item
items[#]
    .name
string""Name of item
items[#]
    .description
string""Description of item
items[#]
    .unit_price
integerUnit price of item*
items[#]
    .quantity
integerQuantity of item*
items[#]
    .quantity_shipped
integer0Quantity of items shipped to customer
items[#]
    .product_code
string""Product Code of item
items[#]
    .commodity_code
string""Commodity Code of item
items[#]
    .unit_of_measure
string""Unit of measure of item ("lb", "kg", etc.)
items[#]
    .alternate_tax_identifier
string""Alternate tax ID for item
items[#]
    .taxable
booleanfalseWhether local and national tax should be applied at the item level rather than the invoice level
items[#]
    .local_tax_rate
string""Local tax rate for item ("1.000")
items[#]
    .local_tax
integer0Local tax amount to be added to the item's total, expressed in cents (100 = $1.00)
items[#]
    .national_tax_rate
string""National tax rate for item ("1.000")
items[#]
    .national_tax
integer0National tax amount to be added to the item's total, expressed in cents (100 = $1.00)
items[#]
    .tax_rate
string""Combined tax rate for item (local tax + national tax)
items[#]
    .tax_amount
integer0Tax amount to be added to the item's total, expressed in cents (100 = $1.00)
items[#]
    .discount_amount
integer0Discount to take off the item's total amount, expressed in cents (100 = $1.00))
items[#]
    .freight_amount
integer0Freight amount to add to the item's total, expressed in cents (100 = $1.00)
advanced_fieldsbooleanfalseWhether or not to include additional fields for line items (advanced fields include quantity_shipped, freight_amount, unit_of_measure, taxable, local_tax_rate, local_tax, national_tax_rate, national_tax)
enable_taxbooleanfalseWhether or not to enable tax (if enabled, tax applied at the invoice level will override taxes applied at the item level)
enable_shippingbooleanfalseWhether or not to enable shipping
require_shipping_detailsbooleanfalseWhether or not to require shipping details
require_billing_details_on_payment_onlybooleanfalseWhether or not to require billing details only at time of payment
tax_percentstringTax rate to apply to invoice total if enable_tax is true. A rate of "0.000" will cause tax to be read as a flat amount.*
taxintegercalculated amountTotal tax amount of the invoice, expressed in cents (100 = $1.00). If tax_percent is included and is not "0", this field will be overridden with the calculated amount.
shippingintegercalculated amountShipping amount of the invoice, expressed in cents (100 = $1.00)
amount_paidintegercalculated amountAmount of the invoice that has already been paid, expressed in cents (100 = $1.00)
service_fees_paidintegercalculated amountService fee amount that has already been paid, expressed in cents (100 = $1.00)
surcharge_paidintegercalculated amountSurcharge amount that has already been paid, expressed in cents (100 = $1.00)
discount_creditedintegercalculated amountDiscount amount that has already been credited, expressed in cents (100 = $1.00)
adjustmentinteger0Apply a payment adjustment to the total amount of the invoice, expressed in cents (100 = $1.00)
allow_partial_paymentbooleanfalseWhether or not to allow partial payment of the amount due
transaction_typestring literal"sale""sale" or "authorize"
payment_methods[#]string arrayAllowable payment method types ("card", "ach", and/or "mail")*
card_processor_id (can be "")stringID of the payment processor to use for credit card payments*
ach_processor_id (can be "")stringID of the payment processor to use for ACH payments*
messagestringMessage for customers viewing the invoice
send_viastring literalHow to send invoice notifications ("email", "text", "both", or "none")*
email_tostringEmail address (must be valid email format, "xxxxx@xxxxx.xxx")

Get Invoice By ID

Retrieve details for the specified invoice.

Request Method: GET

URL Endpoint: /api/invoice/{ invoice id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "bhi9vado3hogrne0u4tg",
    "currency": "USD",
    "company_name": "ACME Inc.",
    "company_logo_url": "",
    "customer_number": "123Customer",
    "payable_to": {
      "id": "",
      "first_name": "First",
      "last_name": "Last",
      "company": "Merchant Business",
      "address_line_1": "123 Some St",
      "address_line_2": "",
      "city": "Some City",
      "state": "IL",
      "postal_code": "60000",
      "country": "US",
      "phone": "5555555555",
      "fax": "5555555555",
      "email": "info@somewebsite.com"
    },
    "bill_to": {
      "id": "",
      "first_name": "First",
      "last_name": "Last",
      "company": "Some Business",
      "address_line_1": "123 Drury Lane",
      "address_line_2": "",
      "city": "Some City",
      "state": "IL",
      "postal_code": "60000",
      "country": "US",
      "phone": "5555555555",
      "fax": "5555555555",
      "email": "info@somesite.com"
    },
    "created_at": "2019-02-13T22:52:26Z",
    "date_due": "2019-02-13T06:00:00Z",
    "items": [
      {
        "id": "bhi9vado3hogrne0u4t0",
        "name": "Widget",
        "description": "A widget for processors",
        "quantity": 1,
        "quantity_shipped": 0,
        "unit_of_measure": "",
        "unit_price": 100,
        "discount": 0,
        "discount_type": "$",
        "taxable": false,
        "local_tax": "0",
        "national_tax": "0",
        "tax_rate": "0",
        "tax_amount": 0,
        "amount": 100,
        "status": "pending"
      }
    ],
    "advanced_fields": false,
    "subtotal": 100,
    "tax_percent": "0.00",
    "tax": 0,
    "total": 100,
    "amount_paid": 0,
    "adjustment": 0,
    "amount_due": 100,
    "payment_methods": ["card"],
    "card_processor_id": "bhi5qa5o3hogms88jojg",
    "ach_processor_id": "",
    "status": "pending",
    "message": "Thank you for your business!",
    "reject_message": "",
    "send_via": "none",
    "last_sent_at": "0001-01-01T00:00:00Z",
    "updated_at": "2019-02-13T23:15:43Z",
    "public_url": "d038ea94-3f4f-4703-9e94-74792605944e",
    "hosted_url": "http://localhost:8080/invoice/d038ea94-3f4f-4703-9e94-74792605944e"
  }
}

Search Invoices

Retrieve details for all invoices that match provided search criteria.

Request Method: POST

URL Endpoint: /api/invoices/search

NameTypeDescription
idobjectObject containing details for searching by id
id
    .operator
string literal"=" or "!="
id
    .value
stringinvoice id to match or exclude
amount_dueobjectObject containing details for searching by amount_due
amount_due
    .operator
string literal"=", "!=", "<", or ">"
amount_due
    .value
integeramount to match or exclude
date_dueobjectObject containing details for searching by date_due
date_due
    .start_date
date stringSearches by date_due between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
date_due
    .end_date
date stringSearches by date_due between the provided start_date and end_date. (Dates in UTC "YYYY-MM-DDTHH:II:SSZ")
limitintegerMaximum records to return (0-100)
offsetintegerNumber of records to offset the return by

Update Invoice

Update an existing invoice.

Request Method: POST

URL Endpoint: /api/invoice/{ invoice id }

NameTypeDefaultDescriptionRequired
currencystring literalCurrency that invoice amounts should be in ("USD", etc.)*
company_namestringName of company issuing the invoice
company_logo_urlstringHosted location of logo image to include on invoice
customer_numberstringOptional identifier for the invoiced customer to match merchant records
customer_idstringID of the saved customer being invoiced (must be a valid customer id if included)
invoice_numberstringOptional identifier for the invoice to match merchant records
payable_toobjectobject containing details for the person the invoice is being paid to*
payable_to
    .id
stringID of the stored address you want to make the invoice payable to
payable_to
    .first_name
stringFirst name
payable_to
    .last_name
stringLast name
payable_to
    .company
stringCompany name
payable_to
    .address_line_1
stringAddress line 1*
payable_to
    .address_line_2
stringAddress line 2
payable_to
    .city
stringCity*
payable_to
    .state
string literalState, in 2-character format ("KS", "QC", etc.))*
payable_to
    .postal_code
stringPostal code (must be a valid postal code for the country provided)*
payable_to
    .country
string literalCountry, in 2-character format ("US", "CA", "MX", etc.)*
payable_to
    .phone
stringPhone number
payable_to
    .fax
stringFax number
payable_to
    .email
stringEmail address (must be valid email format, "example@mail.com")
bill_toobjectobject containing details for the person the invoice is being billed to*
bill_to
    .id
stringID of the stored address you want to make the invoice billable to
bill_to
    .first_name
stringFirst name
bill_to
    .last_name
stringLast name
bill_to
    .company
stringCompany name
bill_to
    .address_line_1
stringAddress line 1*
bill_to
    .address_line_2
stringAddress line 2
bill_to
    .city
stringCity*
bill_to
    .state
string literalState, in 2-character ("KS", "QC", etc.)format*
bill_to
    .postal_code
stringPostal (must be a valid postal code for the country provided) code*
bill_to
    .country
string literalCountry, in 2-character ("US", "CA", "MX", etc.) format*
bill_to
    .phone
stringPhone number
bill_to
    .fax
stringFax number
bill_to
    .email
stringEmail address (must be valid email format, "example@mail.com")
date_duedatetime stringDate the invoice is due ("2021-02-13T06:00:00.000Z")by*
items[#]object arrayarray containing line items included in the invoice*
items[#]
    .status
string literal"pending" or "paid"*
items[#]
    .type
string""Type of item
items[#]
    .name
string""Name of item
items[#]
    .description
string""Description of item
items[#]
    .unit_price
integerUnit price of item*
items[#]
    .quantity
integerQuantity of item*
items[#]
    .quantity_shipped
integer0Quantity of items shipped to customer
items[#]
    .product_code
string""Product Code of item
items[#]
    .commodity_code
string""Commodity Code of item
items[#]
    .unit_of_measure
string""Unit of measure of item ("lb", "kg", etc.)
items[#]
    .alternate_tax_identifier
string""Alternate tax ID for item
items[#]
    .taxable
booleanfalseWhether local and national tax should be applied at the item level rather than the invoice level
items[#]
    .local_tax_rate
string""Local tax rate for item ("1.000")
items[#]
    .local_tax
integer0Local tax amount to be added to the item's total, expressed in cents (100 = $1.00)
items[#]
    .national_tax_rate
string""National tax rate for item ("1.000")
items[#]
    .national_tax
integer0National tax amount to be added to the item's total, expressed in cents (100 = $1.00)
items[#]
    .tax_rate
string""Combined tax rate for item (local tax + national tax)
items[#]
    .tax_amount
integer0Tax amount to be added to the item's total, expressed in cents (100 = $1.00)
items[#]
    .discount_amount
integer0Discount to take off the item's total amount, expressed in cents (100 = $1.00))
items[#]
    .freight_amount
integer0Freight amount to add to the item's total, expressed in cents (100 = $1.00)
advanced_fieldsbooleanfalseWhether or not to include additional fields for line items (advanced fields include quantity_shipped, freight_amount, unit_of_measure, taxable, local_tax_rate, local_tax, national_tax_rate, national_tax)
enable_taxbooleanfalseWhether or not to enable tax (if enabled, tax applied at the invoice level will override taxes applied at the item level)
enable_shippingbooleanfalseWhether or not to enable shipping
require_shipping_detailsbooleanfalseWhether or not to require shipping details
require_billing_details_on_payment_onlybooleanfalseWhether or not to require billing details only at time of payment
tax_percentstringTax rate to apply to invoice total if enable_tax is true. A rate of "0.000" will cause tax to be read as a flat amount.*
taxintegercalculated amountTotal tax amount of the invoice, expressed in cents (100 = $1.00). If tax_percent is included and is not "0", this field will be overridden with the calculated amount.
shippingintegercalculated amountShipping amount of the invoice, expressed in cents (100 = $1.00)
amount_paidintegercalculated amountAmount of the invoice that has already been paid, expressed in cents (100 = $1.00)
service_fees_paidintegercalculated amountService fee amount that has already been paid, expressed in cents (100 = $1.00)
surcharge_paidintegercalculated amountSurcharge amount that has already been paid, expressed in cents (100 = $1.00)
discount_creditedintegercalculated amountDiscount amount that has already been credited, expressed in cents (100 = $1.00)
adjustmentinteger0Apply a payment adjustment to the total amount of the invoice, expressed in cents (100 = $1.00)
amount_dueintegercalculated amountAmount of the invoice that remains due, expressed in cents (100 = $1.00)
allow_partial_paymentbooleanfalseWhether or not to allow partial payment of the amount due
transaction_typestring literal"sale""sale" or "authorize"
payment_methods[#]string arrayAllowable payment method types ("card", "ach", and/or "mail")*
card_processor_id (can be "")stringID of the payment processor to use for credit card payments*
ach_processor_id (can be "")stringID of the payment processor to use for ACH payments*
messagestringMessage for customers viewing the invoice
send_viastring literalHow to send invoice notifications ("email", "text", "both", or "none")*
email_tostringEmail address (must be valid email format, "xxxxx@xxxxx.xxx")

Delete Invoice

Delete the specified invoice.

Request Method: DELETE

URL Endpoint: /api/invoice/{ invoice id }

json
{
  "status": "success",
  "msg": "success"
}

Customer Vault

TIP

This section describes the canonical methods for creating and managing Customer records. The endpoints described in the Customers (Deprecated) section are still available for use, but be advised that using endpoints from both groups in your application simultaneously can result in unintended behaviors.

Create Customer Record

Creates a new Customer record that can contain stored preferences, payment methods, and addresses.

Request Method: POST

URL Endpoint: /api/vault/customer

NameTypeDefaultDescriptionRequired
idstringgenerated valueOptionally, you may provide a custom id for storing the vaulted customer. Max 40 characters (a-z, A-Z, 0-9)
id_formatstring literalOptionally defines a format for the gateway to use when auto-generating an id ("xid_type_last4"). Cannot be used if providing a custom id.
descriptionstring""Text field, max 255 characters
flagsstring array[]Array containing flags for customer settings ("surcharge_exempt")
default_paymentobjectnullObject containing ach payment method details
default_payment
    .card
objectnullObject containing card payment method details
default_payment
    .card
        .number
string""Card number
default_payment
    .card
        .expiration_date
string""Card expiration date ("MMYY" or "MM/YY")required if default_payment.card is present
default_payment
    .ach
objectnullObject containing ach payment method details
default_payment
    .ach
        .account_number
string""Account number
default_payment
    .ach
        .routing_number
string""Routing number
default_payment
    .ach
        .account_type
string literalAch account type ("checking" or "savings")required if default_payment.ach is present
default_payment
    .ach
        .sec_code
string literalAch sec code ("web", "ccd", or "ppd")required if default_payment.ach is present
default_payment
    .token
stringPayment method token generated by Tokenizer form
default_payment
    .apple_pay
objectnullObject containing Apple Pay payment method details
default_payment
    .apple_pay
        .key_id
string""Merchant Apple Pay IDrequired if default_payment.apple_pay is present
default_payment
    .apple_pay
        .processor_id
string""Processor ID
default_payment
    .apple_pay
        .temporary_token
string""Token from WalletJS responserequired if using WalletJS
default_payment
    .apple_pay
        .pkpaymenttoken
objectnullPKPaymentToken from Apple Pay JS responserequired if using Apple Pay JS
default_payment
    .google_pay_token
object or stringnullObject or string containing a Google Pay token
default_billing_addressobjectnullObject containing billing address details
default_billing_address
    .first_name
string""Addressee first name
default_billing_address
    .last_name
string""Addressee last name
default_billing_address
    .company
string""Company name
default_billing_address
    .line_1
string""Street address
default_billing_address
    .line_2
string""Additional delivery details
default_billing_address
    .city
string""City name
default_billing_address
    .state
string""State code ("CA")
default_billing_address
    .postal_code
string""Postal code ("12345")
default_billing_address
    .country
string""Country code ("US")
default_billing_address
    .email
string""Email address (must be valid email format, "example@mail.com")
default_billing_address
    .phone
string""Phone number ("3216540987")
default_billing_address
    .fax
string""("3216540987")
default_shipping_addressobjectnullObject containing shipping address details
default_shipping_address
    .first_name
string""Addressee first name
default_shipping_address
    .last_name
string""Addressee last name
default_shipping_address
    .company
string""Company name
default_shipping_address
    .line_1
string""Street address
default_shipping_address
    .line_2
string""Additional delivery details
default_shipping_address
    .city
string""City name
default_shipping_address
    .state
string""State code ("CA")
default_shipping_address
    .postal_code
string""Postal code ("12345")
default_shipping_address
    .country
string""Country code ("US")
default_shipping_address
    .email
string""Email address (must be valid email format, "example@mail.com")
default_shipping_address
    .phone
string""Phone number ("3216540987")
default_shipping_address
    .fax
string""("3216540987")

Get Customer Record By ID

Retrieve details for the specified customer.

Request Method: GET

URL Endpoint: /api/vault/{ customer id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "952f250d-fa85-40ac-a45e-3886f98032c6",
    "owner_id": "testmerchant12345678",
    "data": {
      "customer": {
        "addresses": [
          {
            "city": "Some Town",
            "company": "Some Business",
            "country": "US",
            "email": "user@somesite.com",
            "fax": "555555555",
            "first_name": "John",
            "hash": "cV9qS6UvnnRDJCkgfitHqGrKSRfTARDsLy5zfkNNTcM=",
            "id": "bl6nqk69ku6897l45fp0",
            "last_name": "Smith",
            "line_1": "",
            "line_2": "",
            "phone": "5555555555",
            "postal_code": "60187",
            "state": "IL"
          }
        ],
        "defaults": {
          "billing_address_id": "bl6nqk69ku6897l45fp0",
          "payment_method_id": "bl6nqk69ku6897l45fq0",
          "payment_method_type": "card",
          "shipping_address_id": "bl6nqk69ku6897l45fp0"
        },
        "description": "test description",
        "payments": {
          "ach": [],
          "cards": [
            {
              "card_type": "visa",
              "expiration_date": "2020-12-31T00:00:00Z",
              "id": "bl6nqk69ku6897l45fq0",
              "masked_number": "411111******1111"
            }
          ]
        }
      }
    },
    "created_at": "2019-08-09T09:04:00.786094073-05:00",
    "updated_at": "2019-08-09T09:04:00.786094116-05:00"
  }
}

Search Customer Records

Retrieve details for all customer records that match provided search criteria.

Request Method: POST

URL Endpoint: /api/vault/customer/search

NameTypeDefaultDescriptionRequired
idobjectObject containing details defining a customer id to match or exclude
id
    .value
string""Customer record ID to match or exclude
id
    .operator
string"""=" or "!="
address_idobjectObject containing details defining an address id to match or exclude
address_id
    .value
string""Address ID to match or exclude
address_id
    .operator
string"""=" or "!="
first_nameobjectObject containing details defining a customer first name to match or exclude
first_name
    .value
string""Customer first name to match or exclude
first_name
    .operator
string"""=" or "!="
last_nameobjectObject containing details defining a customer last name to match or exclude
last_name
    .value
string""Customer last name to match or exclude
last_name
    .operator
string"""=" or "!="
companyobjectObject containing details defining a company name to match or exclude
company
    .value
string""Customer company to match or exclude
company
    .operator
string"""=" or "!="
address_line_1objectObject containing details defining a street address to match or exclude
address_line_1
    .value
string""Customer street address to match or exclude
address_line_1
    .operator
string"""=" or "!="
address_line_2objectObject containing details defining additional address details to match or exclude
address_line_2
    .value
string""Customer address details to match or exclude
address_line_2
    .operator
string"""=" or "!="
cityobjectObject containing details defining a city to match or exclude
city
    .value
string""Customer city to match or exclude
city
    .operator
string"""=" or "!="
stateobjectObject containing details defining a state to match or exclude
state
    .value
string""Customer state to match or exclude
state
    .operator
string"""=" or "!="
postal_codeobjectObject containing details defining a postal code to match or exclude
postal_code
    .value
string""Customer postal code to match or exclude
postal_code
    .operator
string"""=" or "!="
countryobjectObject containing details defining a country to match or exclude
country
    .value
string""Customer country to match or exclude
country
    .operator
string"""=" or "!="
emailobjectObject containing details defining a customer email to match or exclude
email
    .value
string""Customer email to match or exclude
email
    .operator
string"""=" or "!="
phoneobjectObject containing details defining a phone number to match or exclude
phone
    .value
string""Customer phone to match or exclude
phone
    .operator
string"""=" or "!="
faxobjectObject containing details defining a fax number to match or exclude
fax
    .value
string""Customer fax to match or exclude
fax
    .operator
string"""=" or "!="
payment_method_typeobjectObject containing details defining a payment method type to match or exclude
payment_method_type
    .value
string""Customer payment method type to match or exclude
payment_method_type
    .operator
string"""=" or "!="
billing_address_idobjectObject containing details defining a billing address id to match or exclude
billing_address_id
    .value
string""Customer billing address id to match or exclude
billing_address_id
    .operator
string"""=" or "!="
shipping_address_idobjectObject containing details defining a shipping address id to match or exclude
shipping_address_id
    .value
string""Customer shipping address id to match or exclude
shipping_address_id
    .operator
string"""=" or "!="
created_atobjectObject containing details defining a date range to match
created_at
    .start_date
string""Beginning of date range
created_at
    .end_date
string""End of date range
updated_atobjectObject containing details defining a date range to match
updated_at
    .start_date
string""Beginning of date range
updated_at
    .end_date
string""End of date range
limitinteger10The number of results to return (1-100)
offsetinteger0The number of results to skip (1-1000)

Update Customer Record

Update an existing customer record.

Request Method: POST

URL Endpoint: /api/vault/customer/{ customer id }

NameTypeDefaultDescriptionRequired
descriptionstring""Text field, max 255 characters
notesstring""Text field, max 255 characters
flagsstring array[]Array containing flags for customer settings ("surcharge_exempt")
defaultsobjectnullObject containing id's designating payment methods and addresses to be used as defaults for the customer's transactions
defaults
    .billing_address_id
stringIf only one stored address exists on the customer record, that will be used by defaultId of stored address to use as the default billing address for transactions
defaults
    .shipping_address_id
stringIf only one stored address exists on the customer record, that will be used by defaultId of stored address to use as the default shipping address for transactions
defaults
    .payment_method_id
stringId of stored payment method to use as the default payment method for transactionsrequired if defaults.payment_method_type is present
defaults
    .payment_method_type
string literal""Type of the payment method id supplied ("card" or "ach")required if defaults.payment_method_id is present

Delete Customer Record

Delete the specified customer record.

Request Method: DELETE

URL Endpoint: /api/vault/{ customer id }

json
{
  "status": "success",
  "msg": "success"
}

Create Address Record

Create a new address record that will be stored within the customer record. A stored address can be used as the billing and/or shipping address on transactions processed for the customer.

Request Method: POST

URL Endpoint: /api/vault/customer/{ customer id }/address

NameTypeDefaultDescriptionRequired
first_namestring""Addressee first name
last_namestring""Addressee last name
companystring""Company name
line_1string""Street address
line_2string""Additional delivery details
citystring""City name
statestring""State code ("CA")
postal_codestring""Postal code ("12345")
countrystring""Country code ("US")
emailstring""Email address (must be valid email format, "example@mail.com")
phonestring""Phone number ("3216540987")
faxstring""Fax number ("3216540987")

Get Address Record By ID

TIP

Address records cannot be fetched individually, please use the Get Customer Record By ID endpoint to retrieve the collection of address records for a specified customer.

Update Address Record

Update an existing address within a customer record.

Request Method: POST

URL Endpoint: /api/vault/customer/{ customer id }/address/{ address id }

NameTypeDefaultDescriptionRequired
first_namestring""Addressee first name
last_namestring""Addressee last name
companystring""Company name
line_1string""Street address
line_2string""Additional delivery details
citystring""City name
statestring""State code ("CA")
postal_codestring""Postal code ("12345")
countrystring""Country code ("US")
emailstring""Email address (must be valid email format, "example@mail.com")
phonestring""Phone number ("3216540987")
faxstring""Fax number ("3216540987")

Delete Address Record

Delete the specified address within a customer record.

Request Method: DELETE

URL Endpoint: /api/vault/customer/{ customer id }/address/{ address id }

json
{
  "status": "success",
  "msg": "success"
}

Create Payment Method Record

Create a new stored payment method on the specified customer record. The url endpoint and request body properties vary depending on the type of payment method being created.

Request Method: POST

Create Card - URL Endpoint: /api/vault/customer/{ customer id }/card

Create ACH - URL Endpoint: /api/vault/customer/{ customer id }/ach

Create Card or ACH with Token - URL Endpoint: /api/vault/customer/{ customer id }/token

Create Card with Apple Pay Token - URL Endpoint: /api/vault/customer/{ customer id }/applepay

Create Card with Google Pay Token - URL Endpoint: /api/vault/customer/{ customer id }/googlepay

NameTypeDefaultDescriptionRequired
numberstring""Card number
expiration_datestring""Card expiration date ("MMYY" or "MM/YY")*

Create Payment Method Record Code Samples

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "952f250d-fa85-40ac-a45e-3886f98032c6",
    "owner_id": "testmerchant12345678",
    "data": {
      "customer": {
        "addresses": [
          {
            "city": "Some Town",
            "company": "Some Business",
            "country": "US",
            "email": "user@somesite.com",
            "fax": "555555555",
            "first_name": "John",
            "hash": "cV9qS6UvnnRDJCkgfitHqGrKSRfTARDsLy5zfkNNTcM=",
            "id": "bl6nqk69ku6897l45fp0",
            "last_name": "Smith",
            "line_1": "",
            "line_2": "",
            "phone": "5555555555",
            "postal_code": "60187",
            "state": "IL"
          }
        ],
        "defaults": {
          "billing_address_id": "bl6nqk69ku6897l45fp0",
          "payment_method_id": "bl6nqk69ku6897l45fq0",
          "payment_method_type": "card",
          "shipping_address_id": "bl6nqk69ku6897l45fp0"
        },
        "description": "test description",
        "notes": "",
        "flags": ["surcharge_exempt"],
        "payments": {
          "ach": [],
          "cards": [
            {
              "card_type": "visa",
              "expiration_date": "2020-12-31T00:00:00Z",
              "id": "bl6nqk69ku6897l45fq0",
              "masked_number": "411111******1111"
            }
          ]
        }
      }
    },
    "created_at": "2019-08-09T09:04:00.786094073-05:00",
    "updated_at": "2019-08-09T09:04:00.786094116-05:00"
  }
}

Get Payment Method Record By ID

TIP

Payment method records cannot be fetched individually, please use the Get Customer Record By ID endpoint to retrieve the collection of payment method records for a specified customer.

Update Payment Method Record

Update an existing payment method within a customer record.

Request Method: POST

Update Card - URL Endpoint: /api/vault/customer/{ customer id }/card/{ payment method id }

Update ACH - URL Endpoint: /api/vault/customer/{ customer id }/ach/{ payment method id }

Update Token - URL Endpoint: /api/vault/customer/{ customer id }/token/{ payment method id }

NameTypeDefaultDescriptionRequired
numberstring""Card number
expiration_datestring""Card expiration date ("MMYY" or "MM/YY")*
flagsarray[]"surcharge_exempt", "applepay", "closed_contact", "contact", "locked_security", "locked_stop_recurring"

Update Payment Method Record Code Samples

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "952f250d-fa85-40ac-a45e-3886f98032c6",
    "owner_id": "testmerchant12345678",
    "data": {
      "customer": {
        "addresses": [
          {
            "city": "Some Town",
            "company": "Some Business",
            "country": "US",
            "email": "user@somesite.com",
            "fax": "555555555",
            "first_name": "John",
            "hash": "cV9qS6UvnnRDJCkgfitHqGrKSRfTARDsLy5zfkNNTcM=",
            "id": "bl6nqk69ku6897l45fp0",
            "last_name": "Smith",
            "line_1": "",
            "line_2": "",
            "phone": "5555555555",
            "postal_code": "60187",
            "state": "IL"
          }
        ],
        "defaults": {
          "billing_address_id": "bl6nqk69ku6897l45fp0",
          "payment_method_id": "bl6nqk69ku6897l45fq0",
          "payment_method_type": "card",
          "shipping_address_id": "bl6nqk69ku6897l45fp0"
        },
        "description": "test description",
        "notes": "",
        "flags": ["surcharge_exempt"],
        "payments": {
          "ach": [],
          "cards": [
            {
              "card_type": "visa",
              "expiration_date": "2020-12-31T00:00:00Z",
              "id": "bl6nqk69ku6897l45fq0",
              "masked_number": "411111******1111"
            }
          ]
        }
      }
    },
    "created_at": "2019-08-09T09:04:00.786094073-05:00",
    "updated_at": "2019-08-09T09:04:00.786094116-05:00"
  }
}

Delete Payment Method Record

Delete the specified payment method within a customer record.

Request Method: DELETE

Delete Card - URL Endpoint: /api/vault/customer/{ customer id }/card/{ card id }

Delete ACH - URL Endpoint: /api/vault/customer/{ customer id }/ach/{ ach id }

json
{
  "status": "success",
  "msg": "success"
}