Get transactions integration
Introduction
This function allows you to find one or multiple transactions using the TRANSACTIONID
or ORDERID
.
In this mode, you have to send a POST
request containing your order’s parameters over HTTPS
to the Dalenys platform.
The result can be displayed in a JSON table (synchronous) or sent in a compressed csv file by email with MAILTO
parameter or to url with CALLBACKURL
parameter (asynchronous).
Refer to the: dedicated exportable columns appendice.
Example of getTransactions
Here are some server to server request examples:
Synchronous getTransactions
$> curl --request POST --url "https://secure-test.dalenys.com/front/service/rest/export" \
--data "method=getTransactions" \
--data "params[HASH]=15477dcb8687adf90fa51e418f3c1a2d025f40b177a978c2734514734633b3c4" \
--data "params[IDENTIFIER]=Demo Shop" \
--data "params[OPERATIONTYPE]=getTransactions" \
--data "params[ORDERID]=1234" \
--data "params[VERSION]=3.0" \
--data "params[COLUMNS]=IDENTIFIER;DATE;TRANSACTIONID;ORDERID;OPERATIONTYPE;AMOUNT;CURRENCY;BILLINGFEES INCL. VAT;EXECCODE;CLIENTEMAIL;CLIENTADDRESS;CARDFULLNAME;CARDTYPE;CARDCOUNTRY;3DSECURE;3DSGLOBALSTATUS;RULE APPLIED;SCHEDULE;RETRY" \
If neither the MAILTO
nor the CALLBACKURL
parameter are specified, data is directly returned in the form of a JSON encoded array.
Example of JSON array
{
"OPERATIONTYPE":"getTransactions",
"EXECCODE":"0000",
"MESSAGE":"Operation accepted.",
"DATA":[
{
"IDENTIFIER":"myshop.com",
"DATE":"2017-03-01 10:28:30",
"TRANSACTIONID":"A123456",
"ORDERID":"2017-03-01_561385de3b41d",
"OPERATIONTYPE":"payment",
"AMOUNT":"123.90",
"CURRENCY":"EUR",
"EXECCODE":"0",
"CLIENTEMAIL":"john.doe@email.com",
"CLIENTADDRESS":"",
"CARDFULLNAME":"John Doe",
"CARDTYPE":"VISA",
"CARDCOUNTRY":"FR",
"3DSECURE":"no",
"3DSGLOBALSTATUS":"",
"RULE APPLIED":"",
"SCHEDULE":"",
"RETRY":""
},
{
"IDENTIFIER":"myshop.com",
"DATE":"2017-03-01 10:29:16",
"TRANSACTIONID":"A123457",
"ORDERID":"2017-03-01_56138639d3928",
"OPERATIONTYPE":"payment",
"AMOUNT":"53.50",
"CURRENCY":"EUR",
"EXECCODE":"0",
"CLIENTEMAIL":"john.smith@msn.com",
"CLIENTADDRESS":"",
"CARDFULLNAME":"John Smith",
"CARDTYPE":"VISA",
"CARDCOUNTRY":"DE",
"3DSECURE":"no",
"3DSGLOBALSTATUS":"",
"RULE APPLIED":"",
"SCHEDULE":"[1-3]",
"RETRY":"[1-1]"
}]
}
Asynchronous getTransactions via CALLBACKURL
Request results are sent to an URL in a zipped csv file.
$> curl --request POST --url "https://secure-test.dalenys.com/front/service/rest/export" \
--data "method=getTransactions" \
--data "params[OPERATIONTYPE]=getTransactions" \
--data "params[IDENTIFIER]=Demo Shop" \
--data "params[HASH]=15477dcb8687adf90fa51e418f3c1a2d025f40b177a978c2734514734633b3c4" \
--data "params[ORDERID]=1234" \
--data "params[VERSION]=3.0" \
--data "params[CALLBACKURL]=http://mydomain.com/webservices/callbacks" \
--data "params[COMPRESSION]=zip" \
--data "params[COLUMNS]=IDENTIFIER;DATE;TRANSACTIONID;ORDERID;OPERATIONTYPE;AMOUNT;CURRENCY;BILLINGFEES INCL. VAT;EXECCODE;CLIENTEMAIL;CLIENTADDRESS;CARDFULLNAME;CARDTYPE;CARDCOUNTRY;3DSECURE;3DSGLOBALSTATUS;RULE APPLIED;SCHEDULE;RETRY" \
Asynchronous getTransactions via MAILTO
Request results are sent by email in a zipped csv file.
$> curl --request POST --url "https://secure-test.dalenys.com/front/service/rest/export" \
--data "method=getTransactions" \
--data "params[COLUMNS]=IDENTIFIER;DATE;TRANSACTIONID;ORDERID;OPERATIONTYPE;AMOUNT;CURRENCY;BILLINGFEES INCL. VAT;EXECCODE;CLIENTEMAIL;CLIENTADDRESS;CARDFULLNAME;CARDTYPE;CARDCOUNTRY;3DSECURE;3DSGLOBALSTATUS;RULE APPLIED;SCHEDULE;RETRY" \
--data "params[COMPRESSION]=zip" \
--data "params[HASH]=15477dcb8687adf90fa51e418f3c1a2d025f40b177a978c2734514734633b3c4" \
--data "params[IDENTIFIER]=Demo Shop" \
--data "params[MAILTO]=john.doe@email.com" \
--data "params[OPERATIONTYPE]=getTransactions" \
--data "params[ORDERID]=1234" \
--data "params[VERSION]=3.0" \
Parameters
-
CALLBACKURL string(1-32)
Web services callback URL (mutually exclusive with
MAILTO
). Exports destination URL.Example: http://mydomain.com/webservices/callbacks
-
COLUMNS string(
Column list to be included in an export. (List of compatible columns)
Example: IDENTIFIER;DATE;TRANSACTIONID;ORDERID;OPERATIONTYPE;AMOUNT;CURRENCY;BILLINGFEES INCL. VAT;EXECCODE;CLIENTEMAIL;CLIENTADDRESS;CARDFULLNAME;CARDTYPE;CARDCOUNTRY;3DSECURE;3DSGLOBALSTATUS;RULE APPLIED;SCHEDULE;RETRY
-
COMPRESSION
zip
,gzip
,bzip
The compression method.
Example: zip
-
HASH string(64)
The transaction’s hash as described in the dedicated section.
Example: 15477dcb8687adf90fa51e418f3c1a2d025f40b177a978c2734514734633b3c4
-
IDENTIFIER string(1-32)
Your processing account technical identifier.
Example: Demo Shop
-
MAILTO email
Web services callback email (mutually exclusive with
CALLBACKURL
).Example: john.doe@email.com
-
OPERATIONTYPE
getTransactions
The action you want to process.
Example: payment
-
ORDERID string(1-40)
Unique ID associated to an order in the merchant’s database (as specified in your initial POST request)
Example: 1234
-
SCOPE
CLIENTSGROUP
,CLIENT
,ACCOUNT
Account hierarchy to be exported.
Example: CLIENTSGROUP
-
TIMEZONE string(1-128)
Timezone / default value : UTC. Please see the Data sheet dedicated list of available timezones.
Example: Europe/Paris
-
TRANSACTIONID string(1-32)
Unique Dalenys transaction ID. Make sure to store this ID in your database.
Example: A1123456
-
VERSION
3.0
The API protocol version.
Example: 3.0
Request result
Here is the request result from the platform:
-
EXECCODE string(4)
The operation result code. (See the complete list of execution code)
Example: 0000
-
MESSAGE string(no length limit)
The operation result description linked to
EXECCODE
.Example: The transaction has been accepted
-
OPERATIONTYPE
getTransactions
The action you want to process.
Example: payment