Swiped Credit Card Payments

Making a Swiped Credit Card Payment

POST /api/pp/payments/authorize
POST /api/pp/payments/preauthorize

Request Parameters
Field Description Required Format Max Len
method Payment method Yes "CARD" 10
amount US Dollar amount of payment Yes 9999.99 12
track_data Track 2 data from magnetic stripe Yes    
tracking_id Customer provided value for tracking payment No   50
memo Short memo or transaction descriptor No   100
save_profile Save payment profile No 1 = Yes, 0 = No 1

Patient Request Parameters
Field Description Required Format Max Len
patient_id Unique ID for the patient No UUID 36
patient_external_id Unique value for identifying the patient in your system No   50
patient_prefix Prefix No   50
patient_first_name First Name No [A-z] 50
patient_last_name Last Name No [A-z] 50
patient_suffix Suffix No   50
patient_gender Gender No M|F 1
patient_birth_date Date of Birth No mm/dd/yyyy 10
patient_address_line1 Address Line 1 No   50
patient_address_line2 Address Line 2 No   50
patient_city City No   50
patient_state State No [A-Z] 2
patient_zip_code ZIP Code No 999999999 9
patient_primary_phone Primary Phone Number No 9999999999 10
patient_mobile_phone Mobile Phone Number No 9999999999 10
patient_email_address Email Address No   128

Payment Plan Request Parameters
Field Description Required Format Max Len
payment_plan_id Unique ID for the payment plan No UUID 36

Response Parameters
Field Description Format Max Len
id Unique ID for this payment UUID 36
method Payment method "CARD" 10
action Payment action See below 10
results Result of transaction See below 10
code Approval or error code   6
message Approval or error message   32
cvv_indicator CVV Indicator See below 1
avs_indicator AVS Indicator See below 1
risk_indicator Risk Indicator See below 1
timestamp Date and time the transaction was made YYYY-MM-DDThh:mm:ssZ 25
tracking_id Customer provided value for tracking payment   50
settlement_date Date the transaction settled YYYY-MM-DD 10
repaid_date Date the transaction was funded to client YYYY-MM-DD 10
gateway Payment gateway used See below 50
memo Short memo or transaction descriptor   100

Payment Action Values
Value Description
AUTHORIZE A payment authorization
VOID A void of a previous PAYMENT
CREDIT A credit (refund) of a previous PAYMENT
PREAUTHORIZE A payment preauthorization
DEAUTHORIZE A cancel of a previous preauthorization
CAPTURE A capture of a previous preauthorization

Payment Results Values
Value Description
APPROVED Payment was approved
DECLINED Payment was declined
FAILED Payment attempt failed

CVV Indicator Values

See this page for a list of CVV response codes.

AVS Indicator Values

See this page for a list of AVS response codes.

Payment Gateway Values
Value Description
VANTIV Vantiv/Worldpay VAP
TRIPOS Worldpay TriPOS EMV/Express
SAGE Sage/Paya/Nuvei
TSYS TSYS/Global Payments

Example
POST /api/pp/payments/authorize
Content-Type: application/json
Content-Type: application/x-www-form-urlencoded

Parameters
Field Value
methodcard
amount1000.00
track_data%3B1234567890123445%3D99011200XXXX00000000%3F*
tracking_idPM1234-009
memoMonthly Payment

Response


{
	"id" : "aa5122c7-f0fb-489b-ac68-aa0e21068cbb",
	"method" : "CARD",
	"action" : "AUTHORIZE",
	"results" : "APPROVED",
	"code" : "050605",
	"message" : "APPROVED 050605",
	"cvv_indicator" : "P",
	"avs_indicator" : "Y",
	"risk_indicator" : "00",
	"timestamp" : "2013-01-31T16:00:00Z",
	"tracking_id" : "PM1234-009",
	"settlement_date" : null,
	"repaid_date" : null,
	"gateway" : "VANTIV",
	"client_id" : "T5QRP4B8",
	"memo" : "Monthly Payment"
}

Getting a Payment

GET /api/pp/payments/{id}

Example
GET /api/pp/payments/aa5122c7-f0fb-489b-ac68-aa0e21068cbb

Response


{
	"id" : "aa5122c7-f0fb-489b-ac68-aa0e21068cbb",
	"method" : "CARD",
	"action" : "AUTHORIZE",
	"results" : "APPROVED",
	"code" : "050605",
	"message" : "APPROVED 050605",
	"cvv_indicator" : "P",
	"avs_indicator" : "Y",
	"risk_indicator" : "00",
	"timestamp" : "2013-01-31T16:00:00Z",
	"tracking_id" : "PM1234-009",
	"settlement_date" : "2013-02-01",
	"repaid_date" : "2013-02-02",
	"gateway" : "VANTIV",
	"client_id" : "T5QRP4B8",
	"memo" : "Monthly Payment"
}

Getting a list of Payments

GET /api/pp/payments?start_time={start_time}&end_time={end_time}

Request Parameters
Field Description Format Max Len
start_time Beginning date / time YYYY-MM-DDThh:mm:ssZ 20
end_time Ending date / time YYYY-MM-DDThh:mm:ssZ 20

Example
GET /api/pp/payments?start_time=2013-01-31T16:00:00Z&end_time=2013-01-31T16:15:00Z

Response
[


{
	"id" : "aa5122c7-f0fb-489b-ac68-aa0e21068cbb",
	"method" : "CARD",
	"action" : "AUTHORIZE",
	"results" : "APPROVED",
	"code" : "050605",
	"message" : "APPROVED 050605",
	"cvv_indicator" : "P",
	"avs_indicator" : "Y",
	"risk_indicator" : "00",
	"timestamp" : "2013-01-31T16:00:00Z",
	"tracking_id" : "PM1234-009",
	"settlement_date" : "2013-02-01",
	"repaid_date" : "2013-02-02",
	"gateway" : "VANTIV",
	"client_id" : "T5QRP4B8",
	"memo" : "Monthly Payment"
}
,


{
	"id" : "e3835b53-509d-42f9-8e26-3405fd200917",
	"method" : "ACH",
	"action" : "AUTHORIZE",
	"results" : "APPROVED",
	"code" : null,
	"message" : "ACCEPTED",
	"risk_indicator" : "00",
	"timestamp" : "2013-01-31T16:10:00Z",
	"tracking_id" : "PM1234-010",
	"settlement_date" : "2013-02-01",
	"repaid_date" : "2013-02-02",
	"gateway" : "VANTIV",
	"client_id" : "T5QRP4B8",
	"memo" : "Monthly Payment"
}
]

Voiding a Payment

POST /api/pp/payments/{id}/void

Response Parameters
Field Description Format Max Len
id Unique ID for this void UUID 36
method Payment method "CARD" 10
action Payment action "VOID" 10
results Result of transaction See below 10
code Approval or error code   6
message Approval or error message   32
timestamp Date and time the transaction was made YYYY-MM-DDThh:mm:ssZ 25

Example
POST /api/pp/payments/aa5122c7-f0fb-489b-ac68-aa0e21068cbb/void

Response
{
	"id" : "71a0e499-5a63-4e7f-8656-fb7b7eecd9c2",
	"method" : "CARD",
	"action" : "VOID",
	"results" : "APPROVED",
	"code" : null,
	"message" : "APPROVED",
	"timestamp" : "2013-01-31T16:20:00Z"
}

Crediting/Refunding a Payment

POST /api/pp/payments/{id}/credit

Parameters
Field Value
amount1000.00
tracking_idPM1234-009
memoMonthly Payment

Response Parameters
Field Description Format Max Len
id Unique ID for this credit UUID 36
method Payment method "CARD" 10
action Payment action "CREDIT" 10
results Result of transaction See below 10
code Approval or error code   6
message Approval or error message   32
timestamp Date and time the transaction was made YYYY-MM-DDThh:mm:ssZ 25

Example
POST /api/pp/payments/aa5122c7-f0fb-489b-ac68-aa0e21068cbb/credit

Response
{
	"id" : "71a0e499-5a63-4e7f-8656-fb7b7eecd9c2",
	"method" : "CARD",
	"action" : "CREDIT",
	"results" : "APPROVED",
	"code" : null,
	"message" : "APPROVED",
	"timestamp" : "2013-01-31T16:20:00Z"
}

Deauthorizing a Payment

POST /api/pp/payments/{id}/deauthorize

Response Parameters
Field Description Format Max Len
id Unique ID for this deauthorize UUID 36
method Payment method "CARD" 10
action Payment action "DEAUTHORIZE" 10
results Result of transaction See below 10
code Approval or error code   6
message Approval or error message   32
timestamp Date and time the transaction was made YYYY-MM-DDThh:mm:ssZ 25

Example
POST /api/pp/payments/aa5122c7-f0fb-489b-ac68-aa0e21068cbb/deauthorize

Response
{
	"id" : "71a0e499-5a63-4e7f-8656-fb7b7eecd9c2",
	"method" : "CARD",
	"action" : "DEAUTHORIZE",
	"results" : "APPROVED",
	"code" : null,
	"message" : "APPROVED",
	"timestamp" : "2013-01-31T16:20:00Z"
}

Capturing a Payment

POST /api/pp/payments/{id}/capture

Response Parameters
Field Description Format Max Len
id Unique ID for this capture UUID 36
method Payment method "CARD" 10
action Payment action "CAPTURE" 10
results Result of transaction See below 10
code Approval or error code   6
message Approval or error message   32
timestamp Date and time the transaction was made YYYY-MM-DDThh:mm:ssZ 25

Example
POST /api/pp/payments/aa5122c7-f0fb-489b-ac68-aa0e21068cbb/capture

Response
{
	"id" : "71a0e499-5a63-4e7f-8656-fb7b7eecd9c2",
	"method" : "CARD",
	"action" : "CAPTURE",
	"results" : "APPROVED",
	"code" : null,
	"message" : "APPROVED",
	"timestamp" : "2013-01-31T16:20:00Z"
}