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.

Endpoints

Time to play - access your API using these endpoints:

Authorisation

Card transactions result in one of two transaction_type parameters for authorisation:

  • AUTH_ONLY verifies the customer account and okays the transaction now. The payment completes when you process the CAPTURE later.
  • AUTH_CAPTURE performs both actions in one step to process payment now.

Here’s a list of mandatory and additional parameters that may accompany a request. Alongside, 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 10-30 API Password we issue to merchants.
Acceptable Characters: 0-9 a-z A-z
company_mid_id int 1-11 Targets a specific mid_id within the company structure. Leave it blank (or don't pass it) to balance traffic across multiple mid_ids (banks).
Acceptable Characters: 0-9
user_agent string 1-1000 useragent data.
vt boolean 1 Additional parameter to flag a transaction as MOTO - include if processing payments via phone or an IVR solution.
Acceptable Characters: 0/1
request_hash
Required
string 64 Verification hash value - please see here.
Acceptable Characters: 0-9 a-z A-z _ -
transaction
Required
object Click here.
merchant_order_id
Required
string 1-50 Unique ID you’ll use to identify each transaction.
Acceptable Characters: a-z A-Z 0-9 _ -
transaction_type
Required
string 1-20 The type of transaction you are trying to perform - possible values for this request are either AUTH_ONLY or AUTH_CAPTURE.
Acceptable Characters: a-z A-Z _
amount
Required
string 0-11 Transaction amount.
Acceptable Characters: 0-9 in the format DDDDDD.CC
currency_code_iso3
Required
string 3 Transaction currency, an ISO 4217 3-digit code.
Acceptable Characters: a-z A-Z
subscription_type string 1-20 If you want to tokenise the card details for future use - set this field to INIT. See here for more information.
Acceptable Characters: a-Z A-Z _
merchant_customer_id string 0-50 Your internal unique customer reference. You can use this field to link multiple transactions to a single customer.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_1 string 0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_2 string 0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_3 string 0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions. If you are using our dynamic descriptor feature, you will not be able to use the merchant_custom_3 field as the dynamic descriptor value should be passed in this field.
Acceptable Characters: a-z A-Z 0-9 , . - _
customer
MCC 6012
object Click here. Click here.
customer_fname string 0-50 Customer’s first name.
Acceptable Characters: a-z A-Z , . - _
customer_lname
MCC 6012
string 0-50 Customer’s last name.
Acceptable Characters: a-z A-Z , . - _
customer_ipaddress string The customer’s IP address used in submitting the transaction.
Acceptable Characters: 0-9 in the format XXX.XXX.XXX.XXX (IPv4 / IPv6 )
customer_dob
MCC 6012
string 10 Customer’s date of birth.
Acceptable Characters: 0-9 in the format YYYY-MM-DD
billing
Required
object Click here. Click here.
cardholder_name
SCA
string 0-100 Cardholder’s name as printed on their card.
Acceptable Characters: a-z A-Z , . - '
cardnumber
Required
int 12-19 Card number used for the transaction.
Acceptable Characters: 0-9
cardcvv int 3-4 Card verification value, formatted as three or four digits (for AMEX) depending on the card type.
Acceptable Characters: 0-9 in the format XXXX
cardexp
Required
string 6 Expiration date of the card used for the transaction, formatted as MMYYYY.
Acceptable Characters: 0-9 in the format MMYYYY
billing_street
AVS & SCA
string 0-50 Cardholder’s billing street address.
Acceptable Characters: a-z A-Z 0-9 , . - _
billing_street2
SCA
string 0-50 Cardholder’s billing street address, line 2.
Acceptable Characters: a-z A-Z 0-9 , . - _
billing_city
SCA
string 0-100 Cardholder’s billing city.
Acceptable Characters: a-z A-Z 0-9 , . - _
billing_state string 0-100 Cardholder’s billing state or province.
Acceptable Characters: a-z A-Z 0-9 , . - _
billing_zipcode
MCC 6012 & AVS & SCA
string 0-100 Cardholder’s billing ZIP or postal code.
Acceptable Characters: a-z A-Z 0-9 , . - _
billing_country_code_iso2
SCA
string 2 Cardholder’s billing country, an ISO 3166 2-character code.
Acceptable Characters: a-z A-Z
billing_phone_code
SCA
string 3 Cardholder’s billing phone number country code (For example, 44 for the UK).
Acceptable Characters: 0-9 ( ) -
billing_phone
SCA
string 7-20 Cardholder’s billing phone number.
Acceptable Characters: 0-9 ( ) + -
billing_email
SCA
string 0-50 Cardholder’s billing email address.
Acceptable Characters: 0-9 a-z A-z _ - . @
shipping object Click here.
shipping_street string 0-100 Cardholder’s shipping street address.
Acceptable Characters: a-z A-Z 0-9 , . - _
shipping_street2 string 0-100 Cardholder’s shipping street address, line 2.
Acceptable Characters: a-z A-Z 0-9 , . - _
shipping_city string 0-100 Cardholder’s shipping city.
Acceptable Characters: a-z A-Z 0-9 , . - _
shipping_state string 0-100 Cardholder’s shipping state or province.
Acceptable Characters: a-z A-Z 0-9 , . - _
shipping_zipcode string 0-100 Cardholder’s shipping ZIP or postal code.
Acceptable Characters: a-z A-Z 0-9 , . - _
shipping_country_code_iso2 string 2 Cardholder’s shipping country, an ISO 3166 2-character code.
Acceptable Characters: a-z A-Z
shipping_phone_code string 2 Cardholder’s shipping phone number country code (For example, 44 for the UK).
Acceptable Characters: 0-9 ( ) + -
shipping_phone string 7-20 Cardholder’s shipping phone number.
Acceptable Characters: 0-9 ( ) + -
shipping_email string 0-50 Cardholder’s shipping email address.
Acceptable Characters: 0-9 a-z A-z _ - . @
{
  "timestamp":"20190620101530",
  "company_id":113,
  "company_pass":"password",
  "company_mid_id":1045,
  "vt":"",
  "useragent":"",
  "request_hash" : "f0a18260b08a0bfacb.....",
"transaction":{
    "merchant_order_id":"a9f0ce93-6f0d-4a15-a18b-45f1304b4bc0",
    "transaction_type":"AUTH_CAPTURE",
    "amount":"14.99",
    "currency_code_iso3":"GBP",
    "subscription_type":"INIT",
    "merchant_customer_id":"",
    "merchant_custom_1":"",
    "merchant_custom_2":"",
    "merchant_custom_3":""
    
},
"customer" : {
    "customer_fname":"Edward",
    "customer_lname":"Johnson",
    "customer_ipaddress":"127.0.0.1",
    "customer_dob":"1988-10-03"
    
},
"billing" : {
    "cardholder_name":"",
    "cardnumber":4000011180138710,
    "cardcvv":123,
    "card_exp":"022020",
    "billing_street":"Suite 2, 4th Floor",
    "billing_street2":"44 Baker Street",
    "billing_city":"London",
    "billing_state":"",
    "billing_zipcode":"W1U7AL",
    "billing_country_code_iso2":"GB",
    "billing_phone":"+44(0)2039826580",
    "billing_email":"support@acquired.com"
    
},
"shipping" : {
    "shipping_street":"Suite 2, 4th Floor",
    "shipping_street2":"44 Baker Street",
    "shipping_city":"London",
    "shipping_state":"",
    "shipping_zipcode":"W1U7AL",
    "shipping_country_code_iso2":"GB",
    "shipping_phone":"+44(0)2039826580",
    "shipping_email":"support@acquired.com"
    
},
}
Do you require to authenticate your customer via 3-D Secure? There is an additional tds object you need to add to your request. Please see here for Version 1. or Version 2

After processing the transaction request, we’ll return a response to confirm the outcome. Again, some handy sample code alongside.

Response

Parameter Format Length Description
timestamp date 14 Date and time of transaction response.
Acceptable Characters: 0-9 in the format yyyymmddhhmmss
response_code int 3 Code describing the transaction result.
Acceptable Characters: 0-9
response_message string 1-100 Text describing the transaction response.
Acceptable Characters: 0-9 a-z A-z _ - ()[]{};~!@#$%^*,./\?:”’ +=`
company_id int 1-11 API Company ID we issue to merchants.
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 _
merchant_order_id string 1-50 Unique ID you’ll use to identify each transaction, repeated from the request.
Acceptable Characters: a-z A-Z 0-9 _ -
amount string 1-11 Transaction amount.
Acceptable Characters: 0-9 in the format DDDDDD.CC
currency_code_iso3 string 3 Transaction currency, an ISO 4217 3-digit code.
Acceptable Characters: a-z A-Z
authorization_code string 0-50 Authorisation code returned by the issuing bank.
Acceptable Characters: 0-9
acquirer_reference_number string 0-50 Value set by the acquirer to track the transaction, when present.
Acceptable Characters: 0-9
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
bank_response_code int 2 Transaction result code communicated by the issuing bank.
Acceptable Characters: 0-9
bin object
issuing_bank string 0-50 Name of the bank issuing the card used for the transaction.
Acceptable Characters: a-z A-Z .
card_category string 0-30 Category of the card used, for example CREDIT or DEBIT.
Acceptable Characters: a-z A-Z
card_level string 0-30 Level of the card used, for example CLASSIC.
Acceptable Characters: a-z A-Z
issuing_country string 0-50 Country issuing the card used for the transaction.
Acceptable Characters: a-z A-Z
issuing_country_iso2 string 2 Country issuing the card used for the transaction, an ISO2 two-letter code.
Acceptable Characters: a-z A-Z
response_hash string 64 Verification hash value.
Acceptable Characters: a-z A-Z 0-9

{
    "timestamp": "20190620101531",
    "response_code": "1",
    "response_message": "Transaction Success",
    "company_id": 113,
    "mid": 1045,
    "transaction_id": "5436756",
    "transaction_type": "AUTH_CAPTURE",
    "amount": "14.99",
    "currency_code_iso3": "GBP",
    "authorization_code": "123456",
    "acquirer_reference_number": "7270912091283121",
    "avsaddress": "M",
    "avszipcode": "M",
    "cvvresult": "M",
    "bank_response_code": "1",
    "bin": {
        "issuing_bank": "ACQUIRED.COM",
        "card_category": "DEBIT",
        "card_level": "STANDARD",
        "issuing_country": "United Kingdom",
        "issuing_country_iso2": "GB"
    },
    "response_hash": "835956a9fe56d65416....."
}

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.

Please note - you can only process a VOID the day the transaction is processed.

Below is a list of mandatory and additional parameters that may accompany a request. Alongside, 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, some sample code is below 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"
}