Genome Documentation

Query on demand API

Query on demand API

With the help of Genome query on demand API you will be able to get the historical data for each transaction processed by you.

Access to Genome Qod API

Genome live and test query on demand API could be reached by the following URL:

Web ServiceURL
Live QOD Servicehttps://api.genome.eu/api/pf/qod

QoD Workflow

The Merchant requests transactions data for own account from QOD Service API using the methods defined below. QOD Service API returns reports for each request according for the requested type and transaction report type.

QoD Request formats

  • POST-request
    To use POST type a request header should contain “Content-Type: application/x-www-form-urlencoded”, request content should be transmitted as a serialized string key1=value1&key2=value2

  • JSON-request
    To use JSON type a request header should contain “Content-Type: application/json”, request content should be transmitted as a json-object

Request parameters are general for all request types

Parameter nameRequiredFormat and ruleDESCRIPTION
api_versionyesfloat (1)
Possible value: 1
API version
merchant_accountyesstring (6-32)Merchant API login
merchant_passwordyesstring (6-32)Merchant API password
time_fromyesstring (unix timestamp)Processing transaction time FROM
time_toyesstring (unix timestamp)Processing transaction time TO
qod_typeyesstring
Possible values: transactions, chargebacks
Transaction types are used for the request: transactions, chargebacks
orderno1string
Possible values: acs, desc
Ordering ASC (by default)/DESC
pageno2string (1-12)Fetching page number. If response contains transactions quantity more than limit, paged fetching is possible. A page contains the Limited number of records (Limit).
limitno3string (1-1000)Quantity of the fetched transactions. 1000 by default. Can’t be greater than 1000

Sample code of the Transaction request in "application/json" format:

{
"api_version": 1,
"merchant_account": "Account_MP_TRX",
"merchant_password": "password123",
"time_from": "1508001644",
"time_to": "1808001645",
"qod_type": "transactions",
"order": "asc",
"page": "1",
"limit": "50"
}

Note 1: If Order is not defined, uses ASC ordering
Note 2: If Page is not defined, only transactions for 1st page should be fetched according to the set Limit
Note 3: If Limit is not defined, 1000 transactions should be fetched.

QoD Response formats

  • JSON-document is used by default

The information should be requested page by page, divided on 1000 records on page. It is possible to request any page by number.

Transactions

Purpose: Use transactions request qod_type allows to get all of transactions processed on the merchant account.

Response parameters:

Parameter nameRequiredFormat and ruleDescription
api_versionyesfloat (1)
Possible value: 1
API version
timestampyesinteger
unix timestamp
Query on Demand API response time
session_idyesstring (36)Unique session Id of the request
merchant_accountyesstring (6-32)Merchant API login
transactionsyesarrayContains of transactions data
transaction_typeyesstring
Possible values: SALE, AUTH, AUTH3D, SALE3D, SETTLE, REFUND, VOID
Type of the transaction
statusyesstring
Possible values: SUCCESS, DECLINED, ERROR, MALFORMED, FRAUDED, CHARGEDBACK, REFUNDED, VOIDED, PARTIAL-REFUNDED, WRONGREF
Status of the transaction
modeyesstring
Possible values: CC, TOKEN, REF, CASCADE
Transaction mode.
  • CC - by credit card.
  • TOKEN - by token.
  • REF - by reference.
  • CASCADE - by cascade mode.
referenceyesstring (20)Reference of the transaction in Genome system.
base_referenceyesnull or string (20)Base reference of the transaction in Genome system if exists.
amountyesfloat (0 - 9999999.9999)Transaction amount
currencyyesstring (3)
ISO 4217 (alfa-3)
Transaction currency
merchantyesarray or nullContains of merchant data
merchant_accountyesstring (6-32)Merchant API login
descriptor_merchantyesnull or string (0-255)Merchant descriptor
descriptor_phoneyesnull or string (0-255)Merchant descriptor phone
merchant_domain_nameyesnull or string (0-255)Merchant website name
merchant_product_nameyesnull or string (0-255)Merchant product name
merchant_affiliate_idyesnull or string (0-255)Merchant affiliate identifier
merchant_user_idyesnull or string (0-32)Unique user Id in Merchant system
end of the merchant array-//--//-End of the merchant array
useryesarray or nullContains of user data
first_nameyesstring (1-32)The first name of the customer
last_nameyesstring (1-32)The last name of the customer
countryyesstring (3)
ISO 3166-1 alpha-3
Customer's country
stateyesnull or string (1-32)Customer's state
cityyesnull or string (2-32)Customer's city
addressyesnull or string (2-64)Customer's address
zipyesnull or string (2-10)Customer's zip
user_ipyesstring (IPv4, IPv6)Customer's IP address
user_emailyesstring (6-255)Customer's email
user_phoneyesnull or string (7-15)Customer's phone number
end of the user array-//--//-End of the user array
cardyesarray or nullContains of custmer's card data
card_holderyesstring (2-32)Card holder name
brandyesstring (0-255)Card brand - VISA, MASTERCARD, AMEX, JCB etc
bankyesstring (0-255)Issuer bank
levelyesstring (0-255)Level of the card - ELECTRON, CLASSIC etc
typeyesstring (0-255)Type of the card - CREDIT, DEBIT etc
binyesstring (6)The first 6 digits of the card
lastyesstring (4)The last 4 digits of the card
exp_monthyesstring (2)Card expiration month
exp_yearyesstring (4)Card expiration year
end of the card array-//--//-End of the card array
bankyesarray or nullContains of acquirer data
idyesinteger (0-20)Bank identifier code
authcodeyesstring (0-45)Bank authorization code
timeyesfloat or nullBank transaction time
end of the bank array-//--//-End of the bank array
timeyesfloat or nullTransaction time in Genome system, UTC timezone
tokenyesstring (36)Hashed value of card number, expiry date and cardholder name.
transaction_unique_idyesstring (11-45)Transaction unique identifier in Merchant system.
paresyesstring (0-65535)The hashed value of the result of 3D Secure authorization
codeyesnull or integer(1-4)Transaction response code, check the response codes table below
messageyesnull or string (6-255)Transaction response message, check the response codes table below
end of transactions array-//--//-End of the transactions array
statusyesstring
Possible values: success, error
Status of the request to QoD API
codeyesinteger (1-4)Response code of the request to QoD API
messageyesstring (6-255)Response message of the request to QoD API

Sample code of the Transaction response in "application/json" format:

{
"api_version": 1,
"timestamp": 1545117788.019275,
"session_id": "FbIBcVN/Ht5LorIpqfsm",
"merchant_account": "Account_MP_TRX",
"transactions": [
{
"transaction_type": "AUTH",
"status": "SUCCESS",
"mode": "CC",
"reference": "ATFF00000000395376F6",
"base_reference": null,
"amount": 10,
"currency": "GBP",
"merchant": {
"merchant_account": "Account_MP_TRX",
"descriptor_merchant": "",
"descriptor_phone": "",
"merchant_domain_name": "",
"merchant_product_name": "",
"merchant_affiliate_id": "",
"merchant_user_id": ""
},
"user": {
"first_name": "John",
"last_name": "Doe",
"country": "GBR",
"state": "",
"city": "London",
"address": "123 Streetname",
"zip": "11111",
"user_ip": "127.0.0.1",
"user_email": "johndoe@test.com",
"user_phone": "+123456789012"
},
"card": {
"card_holder": "John Doe",
"brand": "VISA",
"bank": "TEST BANK",
"level": "CLASSIC",
"type": "DEBIT",
"bin": "400002",
"last": "1234",
"exp_month": "06",
"exp_year": "2023"
},
"bank": {
"id": 1,
"authcode": "111737",
"time": 1532542316.3496
},
"time": 1520447215.4163,
"token": "54817d79-8b5c-4c6f-a266-7f2264ed02ad",
"transaction_unique_id": "accept.1420447212.1505680771",
"pares": "",
"code": 0,
"message": "SUCCESS"
}
],
"status": "success",
"code": 0,
"message": "Transaction processed successfully"
}

Chargebacks

Purpose: Use сhargebacks request qod_type allows to get all chargebacked transactions on the merchant account.

Response parameters:

Parameter nameRequiredFormat and ruleDescription
api_versionyesfloat (1)
Possible value: 1
API version
timestampyesinteger
unix timestamp
Query on Demand API response time
session_idyesstring (36)Unique session Id of the request
merchant_accountyesstring (6-32)Merchant API login
chargebacksyesarrayContains of chargebacks data
transactionyesarrayContains of transaction data
transaction_typeyesstring
Possible values: SALE, SALE3D, SETTLE
Type of the transaction
statusyesstring
Possible value: CHARGEDBACK
Status of the transaction
modeyesstring
Possible values: CC, TOKEN, REF, CASCADE
Transaction mode.
  • CC - by credit card.
  • TOKEN - by token.
  • REF - by reference.
  • CASCADE - by cascade mode.
referenceyesstring (20)Reference of the transaction in Genome system.
base_referenceyesnull or string (20)Base reference of the transaction in Genome system if exists.
amountyesfloat (0 - 9999999.9999)Transaction amount
currencyyesstring (3)
ISO 4217 (alfa-3)
Transaction currency
merchantyesarray or nullContains of merchant data
merchant_accountyesstring (6-32)Merchant API login
descriptor_merchantyesnull or string (0-255)Merchant descriptor
descriptor_phoneyesnull or string (0-255)Merchant descriptor phone
merchant_domain_nameyesnull or string (0-255)Merchant website name
merchant_product_nameyesnull or string (0-255)Merchant product name
merchant_affiliate_idyesnull or string (0-255)Merchant affiliate identifier
merchant_user_idyesnull or string (0-32)Unique user Id in Merchant system
end of the merchant array-//--//-End of the merchant array
useryesarray or nullContains of user data
first_nameyesstring (1-32)The first name of the customer
last_nameyesstring (1-32)The last name of the customer
countryyesstring (3)
ISO 3166-1 alpha-3
Customer's country
stateyesnull or string (1-32)Customer's state
cityyesnull or string (2-32)Customer's city
addressyesnull or string (2-64)Customer's address
zipyesnull or string (2-10)Customer's zip
user_ipyesstring (IPv4, IPv6)Customer's IP address
user_emailyesstring (6-255)Customer's email
user_phoneyesnull or string (7-15)Customer's phone number
end of the user array-//--//-End of the user array
cardyesarray or nullContains of custmer's card data
card_holderyesstring (2-32)Card holder name
brandyesstring (0-255)Card brand - VISA, MASTERCARD, AMEX, JCB etc
bankyesstring (0-255)Issuer bank
levelyesstring (0-255)Level of the card - ELECTRON, CLASSIC etc
typeyesstring (0-255)Type of the card - CREDIT, DEBIT etc
binyesstring (6)The first 6 digits of the card
lastyesstring (4)The last 4 digits of the card
exp_monthyesstring (2)Card expiration month
exp_yearyesstring (4)Card expiration year
end of the card array-//--//-End of the card array
bankyesarray or nullContains of acquirer data
idyesinteger (0-20)Bank identifier code
authcodeyesstring (0-45)Bank authorization code
timeyesfloat or nullBank transaction time
end of the bank array-//--//-End of the bank array
timeyesfloat or nullTransaction time in Genome system, UTC timezone
tokenyesstring (36)Hashed value of card number, expiry date and cardholder name.
transaction_unique_idyesstring (11-45)Transaction unique identifier in Merchant system.
paresyesstring ( 0-65535)The hashed value of the result of 3D Secure authorization
codeyesnull or integer(1-4)Transaction response code, check the response codes table below
messageyesnull or string (6-255)Transaction response message, check the response codes table below
end of transaction array-//--//-End of the transaction array
chargebackyesarrayContains of chargeback data
statusyesstring Possible values: OPENED, REVERSED, CLOSED, REPRESENTEDChargeback status
typeyesstring Possible values: FIRST_CHARGEBACK, SECOND_THIRD_CHARGEBACK, CHARGEBACK_REVERSAL, LOST_REPRESENTMENT, REPRESENTMENT, RETRIEVAL_REQUESTChargeback type
reasonyesstring (0-255)Chargeback reason
descriptionyesstring (0-255)Chargeback description
transaction_typeyesstring
Possible value: CHARGEBACK
Chargeback transaction type
transaction_statusyesstring
Possible values: SUCCESS, ERROR
Chargeback transaction status
modeyesstring
Possible value: REF
Chargeback transaction mode
referenceyesstring (20)Reference of the chargebacked transaction in Genome system
base_referenceyesstring (20)Base reference of the chargebacked transaction in Genome system
amountyesfloat (0 - 9999999.9999)Amount of the chargebacked transaction
currencyyesstring (3)
ISO 4217 (alfa-3)
Currency of the chargebacked transaction
transaction_unique_idyesstring (11-45)Unique chargebacked transaction identifier in Merchant system.
arnyesnull or string (0-255)Actual Reference number
case_idyesnull or string (0-255)Identifier from acquirer side.
bankyesarray or nullContains of acquirer data
idyesinteger (0- 20)Bank identifier code
authcodeyesstring (0-45)Bank authorization code
timeyesfloat or nullChargeback time by bank
update_timeyesfloat or nullTransaction status updated time by bank
end of the bank array-//--//-End of the bank array
timeyesfloat or nullTime of updating a transaction status at Genome system
end of the chargeback array-//--//-End of the chargeback array
end of the chargebacks array-//--//-End of the chargebacks array
statusyesstring
Possible values: success, error
Status of the request to QoD API
codeyesinteger (1-4)Response code of the request to QoD API
messageyesstring (6-255)Response message of the request to QoD API

Sample code of the Chargebacks response in "application/json" format:

{
"api_version": 1,
"timestamp": 1545117788.019275,
"session_id": "FbIBcVN/Ht5LorIpqfsm",
"merchant_account": "Account_MP_TRX",
"chargebacks": [
{
"transaction": {
"transaction_type": "SETTLE",
"status": "CHARGEDBACK",
"mode": "REF",
"reference": "STFF0000000039546C12",
"base_reference": "ATFF0000000039546BBF",
"amount": 10,
"currency": "GBP",
"merchant": {
"merchant_account": "Account_MP_TRX",
"descriptor_merchant": "",
"descriptor_phone": "",
"merchant_domain_name": "",
"merchant_product_name": "",
"merchant_affiliate_id": "",
"merchant_user_id": ""
},
"user": {
"first_name": "John",
"last_name": "Doe",
"country": "GBR",
"state": "",
"city": "London",
"address": "123 Streetname",
"zip": "11111",
"user_ip": "127.0.0.1",
"user_email": "johndoe@test.com",
"user_phone": "+123456789012"
},
"card": {
"card_holder": "John Doe",
"brand": "VISA",
"bank": "TEST BANK",
"level": "CLASSIC",
"type": "DEBIT",
"bin": "400002",
"last": "1234",
"exp_month": "06",
"exp_year": "2023"
},
"bank": {
"id": 1,
"authcode": "111575",
"time": null
},
"time": 1621938805.751,
"token": "",
"transaction_unique_id": "transaction_52525251",
"pares": "",
"code": 0,
"message": "SUCCESS"
},
"chargeback": {
"status": "OPENED",
"type": "CHARGEBACK_REVERSAL",
"reason": "3102",
"description": "Lost/Stolen card",
"transaction_type": "CHARGEBACK",
"transaction_status": "SUCCESS",
"mode": "REF",
"reference": "CBFF000000003958A4B1",
"base_reference": "STFF0000000039546C12",
"amount": 10,
"currency": "GBP",
"transaction_unique_id": "transaction_52525251",
"arn": "",
"case_id": "",
"bank": {
"id": 1,
"authcode": "",
"time": 1628576548.6336,
"update_time": 1628576548.6336
},
"time": 1728576550.499
}
}
],
"status": "success",
"code": 0,
"message": "Transaction processed successfully"
}

Request validation specified (not API) response codes

CodeMessage (can be extended depending on case)
400Cannot read incoming request data

Empty response

Purpose: The following fieldset should be transmitted in case of empty response data.

Response parameters:

Parameter nameRequiredFormat and ruleDescription
api_versionyesfloat (1)
Possible value: 1
API versionAPI version
merchant_accountyesstring (6-32)Merchant API login
timestampyesinteger
unix timestamp
Query on Demand API response time
transactions \ chargebacksyesarray or nullQOD type
statusyesstring
Possible values: success, error
Status of the request to QoD API
codeyesinteger (1-4)Response code of the request to QoD API
messageyesstring (6-255)Response message of the request to QoD API

Erroneous response

Purpose: The following fieldset should be transmitted in case of erroneous request/response data.

Response parameters:

Parameter nameRequiredFormat and ruleDescription
api_versionyesfloat (1)
Possible value: 1
API versionAPI version
merchant_accountyesstring (6-32)Merchant API login
timestampyesinteger
unix timestamp
Query on Demand API response time
transactions \ chargebacksyesarray or nullQOD type
statusyesstring
Possible value: error
Status of the request to QoD API
codeyesinteger (1-4)Response code of the request to QoD API
messageyesstring (6-255)Response message of the request to QoD API

Example of response in JSON:

{
"api_version": 1,
"transactions": [],
"merchant_account": "Account_MP_TRX",
"timestamp": 1532216783.6329,
"status": "error",
"code": 5008,
"message": "Time from cannot be greater than Time to"
}

Response statuses

CodeDescription
successSuccessful QOD response
errorUnsuccessful QOD response

QoD API specified response codes

CodeMessageDescription (can be extended depending on case)
5000QOD GENERAL ERRORQoD general error
5001QOD UNSUPPORTED API VERSIONUnsupported QoD API version
5002INVALID TIME ORDERTime from cannot be more than time to