Card API
Integrating directly with Acquired.com’s platform using our CARD API is a great choice if you have enhanced security capabilities. That’s because you’ll be responsible for PCI DSS (that’s Payment Card Industry Data Security Standard) yourself, with the more complicated requirement of completing SAQ (Self-Assessment Questionnaire) D.
Void
An almost-sale, we hate these too. A ‘void’ transaction removes a transaction from the current batch so the customer is not charged at all. When this happens, you need to set the transaction_type
parameter to VOID
.
Below is a list of mandatory and additional parameters that may accompany a request, and some handy sample code.
Request
Parameter | Format | Length | Description |
---|---|---|---|
timestamp Required |
date |
14 | Date and time of transaction submission. Acceptable Characters: 0-9 in the format yyyymmddhhmmss |
company_id Required |
int |
1-11 | API Company ID we issue to merchants. Acceptable Characters: 0-9 |
company_pass Required |
string |
1-30 | API Password we issue to merchants. Acceptable Characters: 0-9 a-z A-z |
request_hash Required |
string |
64 | Verification hash value. Acceptable Characters: 0-9 a-z A-z _ - |
transaction | object |
||
transaction_type Required |
string |
1-20 | Transaction type is VOID. Acceptable Characters: a-z A-Z _ |
original_transaction_id Required |
string |
1-10 | transaction_id value we generated and returned in the original request. Acceptable Characters: 0-9 |
{
"timestamp": "20190620101530",
"company_id": "113",
"company_pass": "password",
"request_hash": "f0a18260b08a0bfacb.....",
"transaction": {
"transaction_type": "VOID",
"original_transaction_id": "5436756"
}
}
Again, after processing the transaction request we’ll return a response to confirm the outcome. Take a look at the handy sample code alongside.
Response
Parameter | Format | Length | Description |
---|---|---|---|
timestamp | date |
14 | Date and time of transaction submission. Acceptable Characters: 0-9 in the format yyyymmddhhmmss |
response_code | int |
1-3 | Transaction result code. Acceptable Characters: 0-9 |
response_message | string |
1-100 | Transaction result text. Acceptable Characters: 0-9 a-z A-z _ - ()[]{};~!@#$%^*,./\?:”’ +=` |
company_id | int |
1-11 | API Company ID we issue to merchants, repeated from the request message. Acceptable Characters: 0-9 |
mid | int |
1-11 | MID_ID the transaction was processed through. Acceptable Characters: 0-9 |
transaction_id | int |
1-10 | Unique ID we generate to identify the transaction. Acceptable Characters: 0-9 |
response_hash | string |
64 | Verification hash value. Acceptable Characters: a-z A-Z 0-9 |
{
"timestamp": "20190620101532",
"response_code": "1",
"response_message": "Transaction Success",
"company_id": "133",
"mid": "1025",
"transaction_id": "6784323",
"response_hash": "835956a9fe56d65416....."
}
Capture
Let’s get some money in the bank - it’s time to submit or ‘capture’ a batch of authorised transactions for settlement. The transaction_type parameter gets the valueCAPTURE
.
We didn’t forget, here’s your list of mandatory and additional parameters that may accompany the request. Again, some handy sample code alongside.
Request
Parameter | Format | Length | Description |
---|---|---|---|
timestamp Required |
date |
1-10 | Date and time of transaction submission. Acceptable Characters: 0-9 in the format yyyymmddhhmmss |
company_id Required |
int |
1-11 | API Company ID we issue to merchants. Acceptable Characters: 0-9 |
company_pass Required |
string |
1-30 | API Password we issue to merchants. Acceptable Characters: 0-9 a-z A-z |
request_hash Required |
string |
64 | Verification hash value. Acceptable Characters: 0-9 a-z A-z _ - |
transaction | object |
||
transaction_type Required |
string |
1-20 | Transaction type is CAPTURE. Acceptable Characters: a-z A-Z _ |
original_transaction_id Required |
int |
1-10 | Transaction_id value we generated and returned in the original request. Acceptable Characters: 0-9 |
amount Required |
int |
1-11 | Transaction amount you want to capture. Acceptable Characters: 0-9 in the format DDDDDD.CC |
{
"timestamp": "20170612200234",
"company_id": "133",
"company_pass": "password",
"request_hash": "335956a9fe56d65455.....",
"transaction": {
"transaction_type": "CAPTURE",
"original_transaction_id": 5436756,
"amount": "14.99"
}
}
You guessed it! After processing the transaction request, we’ll return a response to confirm the outcome. There’s sample code alongside in case you need it.
Response
Parameter | Format | Length | Description |
---|---|---|---|
timestamp | date |
14 | Date and time of transaction submission. Acceptable Characters: 0-9 in the format yyyymmddhhmmss |
response_code | int |
1-3 | Transaction result code. Acceptable Characters: 0-9 |
response_message | string |
1-100 | Transaction result text. Acceptable Characters: 0-9 a-z A-z _ - ()[]{};~!@#$%^*,./\?:”’ +=` |
company_id | int |
1-11 | API Company ID we issue to merchants, repeated from the request message. Acceptable Characters: 0-9 |
mid | int |
1-11 | Merchant ID the transaction was processed through. Acceptable Characters: 0-9 |
transaction_id | int |
1-10 | Unique ID we generate to identify the transaction. Acceptable Characters: 0-9 |
response_hash | string |
64 | Verification hash value. Acceptable Characters: a-z A-Z 0-9 |
{
"timestamp":"20170612200235",
"response_code":"1",
"response_message":"Transaction Success",
"company_id":113,
"mid":1045,
"transaction_id":6784323,
"response_hash":"835956a9fe56d65416....."
}
Refund
Someone wants their money back. In other words, you need to return the total amount of a previously captured transaction back to the cardholder. It’s not the end of the world. A refund transaction gets captured in the current batch for settlement, and the transaction_type parameter gets the value REFUND
.
For reference, here’s the mandatory and additional parameters that may accompany a request. In case you need it, there is some sample code on the right too.
Request
Parameter | Format | Length | Description |
---|---|---|---|
timestamp Required |
date |
14 | Date and time of transaction submission. 0-9 in the format yyyymmddhhmmss |
company_id Required |
int |
1-11 | API Company ID we issue to merchants. Acceptable Characters: 0-9 |
company_pass Required |
string |
1-30 | API Password we issue to merchants. Acceptable Characters: 0-9 a-z A-z |
request_hash Required |
string |
64 | Verification hash value. Acceptable Characters: 0-9 a-z A-z _ - |
transaction | object |
||
transaction_type Required |
string |
1-20 | Transaction type is REFUND. Acceptable Characters: a-z A-Z _ |
original_transaction_id Required |
int |
1-10 | Transaction_id value we generated and returned in the original request. Acceptable Characters: 0-9 |
amount Required |
int |
1-11 | Transaction amount you want to refund back to the cardholder. Acceptable Characters: 0-9 in the format DDDDDD.CC |
{
"timestamp": "20170612200234",
"company_id": 113,
"company_pass": "password",
"request_hash": "f0a18260b08a0bfacb.....",
"transaction": {
"transaction_type": "REFUND",
"original_transaction_id": "5436756",
"amount": "14.99"
}
}
Just like other transaction types, after processing the request we’ll return a response to confirm the outcome. Your sample code is to the right.
Response
Parameter | Format | Length | Description |
---|---|---|---|
timestamp |
date |
14 | Date and time of transaction submission. Acceptable Characters: 0-9 in the format yyyymmddhhmmss |
response_code |
int |
1-3 | Transaction result code. Acceptable Characters: 0-9 |
company_id |
int |
1-11 | API Company ID we issue to merchants, repeated from the request message. Acceptable Characters: 0-9 |
mid |
string |
1-11 | MID_ID the transaction was processed through. Acceptable Characters: 0-9 |
transaction_id | int |
1-10 | Unique ID we generate to identify the transaction. Acceptable Characters: 0-9 |
transaction_type |
string |
1-12 | Transaction type, repeated from the request message. Acceptable Characters: a-z A-Z _ |
avsaddress |
string |
1-2 | AVS check on the first line of the customer’s address, when available. Acceptable Characters: a-z A-Z |
avszipcode |
string |
1-2 | AVS check on the customer’s postcode or zipcode, when available. Acceptable Characters: a-z A-Z |
cvvresult |
string |
1-2 | Result of CVV2 security check. Acceptable Characters: a-z A-Z |
response_hash |
string |
64 | Verification hash value. Acceptable Characters: a-z A-Z 0-9 |
{
"timestamp": "20191119161310",
"response_code": "1",
"response_message": "Transaction Success",
"company_id": "198",
"mid": "1698",
"transaction_id": "31345918",
"transaction_type": "REFUND",
"avsaddress": "NC",
"avszipcode": "NC",
"cvvresult": "NP",
"response_hash": "6ca59b64a2278c4e76014062a5748b85cdea09577d6de4da6a60c75247e70ba3"
}