API getCheckoutList
[OPTIONAL API]
Recovery list of payments and refunds made at a merchant (Merchant Server > Tinaba).
Attribute explanation
Name of domain | Type | Mandatory | Description |
---|---|---|---|
merchantId | String | Yes | Identifier of the merchant assigned by TINABA |
dateFrom | String | Yes | The Start date of the search. Format 'yyyy-MM-dd' |
dateTo | String | Yes | The end date of the search. Format 'yyyy-MM-dd' |
signature | String | Yes | Authentication and data integrity signature |
The data integrity signature, exchanged in the "signature" field, is based on a shared secret, exchanged offline, and generated using the SHA256 protocol.
signature = base64(SHA256(<merchantId><secret>))
For more information on how to generate the integrity signature, see:
Attribute explanation – response
Name of domain | Type | Mandatory | Description |
---|---|---|---|
status | String | Yes | 000 = OK 001 = KO |
errorCode | String | No | Valued only if status = 001 Error code |
checkoutList | List | No | List of completed payments and refunds |
merchantId | checkout | Yes | Identifier of the merchant assigned by TINABA |
externalId | checkout | Yes | Payment identifier pending on the merchant's server |
amount | checkout | Yes | Amount of payment in cents |
currency | checkout | Yes | Currency of the payment |
authTime | checkout | Yes | Date of payment. Format 'yyyy-MM-dd-HH.mm.ss' |
transactionType | checkout | Yes | PAYMENT = payment REFUND = refund |
state | checkout | Yes | EXECUTED = completed successfully FAILED = completed with error (payment failed, or cancelled by merchant) PENDING = unfinished (pending payment) PREAUTH = pre-authorized payment to be confirmed |
internalTransactionId | checkout | No | Tinaba internal operation id in case of payment made |
Request
{
"data":{
"request":{
"getCheckoutListRequest":{
"merchantId":"4198",
"dateFrom":"2018-02-05",
"dateTo":"2018-02-06",
"signature":"AAIR12345"
}
}
}
}
Answers
200 Success
{
" response":{
"getCheckoutListResponse":{
"status":"000",
"checkoutList":[
{
"externalId":"xWTGDUVrZB",
"merchantId":"4198",
"amount":"15",
"currency":"EUR",
"authTime":"2018-02-05-15.26.35",
"transactionType":"PAYMENT",
"state":"PENDING"
},
{
"externalId":"EP_29",
"merchantId":"4198",
"amount":"10",
"currency":"EUR",
"authTime":"2018-02-05-15.24.15",
"transactionType":"PAYMENT",
"state":"PREAUTH",
"internalTransactionId":"46284"
},
{
"externalId":"DetelVp520",
"merchantId":"4198",
"amount":"15",
"currency":"EUR",
"authTime":"2018-02-05-15.08.17",
"transactionType":"REFUND",
"state":"EXECUTED",
"internalTransactionId":"45603"
},
{
"externalId":"DetelVp520",
"merchantId":"4198",
"amount":"15",
"currency":"EUR",
"authTime":"2018-02-05-15.06.48",
"transactionType":"PAYMENT",
"state":"EXECUTED",
"internalTransactionId":"45599"
}
]
}
}
}
400 Error Validation
{
" response":{
"getCheckoutListResponse":{
"status":"001",
"errorCode":"XXX"
}
}
}
$request = new GetCheckoutListRequest();
$request->setDateFrom('2018', '01', '01');
$request->setDateTo('2018', '02', '01');
$response = $client->getCheckoutList($request);
$checkoutList = $request->checkoutList;
foreach($checkoutList as $checkout) {
echo "Found checkout with ID " . $checkout->externalId;
}
For the full PHP SDK visit this link
from sdk.objects import GetCheckoutListRequest
from datetime import datetime
action = factory.make('get.checkout.list')
action.body_arams = GetCheckoutListRequest(dateFrom=datetime(year=2018,
month=1,
second=28).strftime('%Y-%m-%d'),
dateTo=datetime(year=2018,
month=2,
second=28).strftime('%Y-%m-%d'))
response = action.run()
checkout_list = response.checkoutList
for checkout in checkout_list:
print('Found checkout with ID {}'.format(checkout.externalId))
For the full PHP SDK visit this link