API verifyCheckout

[OPTIONAL API]

Check the status of a payment (Merchant Server > Tinaba).

Attribute explanation

Name of domainTypeMandatoryDescription
merchantIdStringYesIdentifier of the merchant assigned by TINABA
externalIdStringYes

The identifier of the pending payment on the merchant's server. It must be unique for each call

signatureStringYesAuthentication 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><externalId><secret>))

For more information on how to generate the integrity signature, see:

Data integrity >

Attribute explanation – response

Name of domainTypeMandatoryDescription
statusStringYes000 = OK







001 = KO
checkoutStateStringNoValued only if status = 000



000 = completed successfully



001 = completed with error (failed payment, or payment cancelled by merchant)



002 = payment expired



003 = unfinished (pending payment)



004 = completed without payment (the user has already paid for the product previously). Used only if the paymentMode in the initCheckout = MEDIA



005 = pre-authorized payment to be confirmed. Used only if the paymentMode in the initCheckout = PREAUTH
errorCodeStringNoValued only if status = 001









Error code
externalIdStringNoPayment identifier pending on the merchant's server
merchantIdStringNoIdentifier of the merchant assigned by TINABA
amountStringNoAmount in cents
currencyStringNoCurrency (EUR)
userAddressuserAddressYesIf one-click mode is configured, it contains the shipping and billing information of the user who ended the payment
userAddress.nameStringYesName Tinaba User
userAddress.surnameStringYesLast name Tinaba user
userAddress.emailStringYesEmail Tinaba user
userAddress.shippingAddressshippingAddressNoShipping address
userAddress.billingAddressbillingAddressYesBilling address
shippingAddress.receiverNameStringYesFull name on address
shippingAddress.addressStringYesAddress
shippingAddress.streetNumberStringYesNumber
shippingAddress.cityStringYesCity
shippingAddress.capStringYes

Zip Code

shippingAddress.districtStringYesProvince
shippingAddress.countryStringYes

Country

shippingAddress.sendAtStringNoAt
shippingAddress.phoneNumberStringNoPhone number
billingAddress.receiverNameStringYesBilling first and last name
billingAddress.addressStringYesAddress
billingAddress.streetNumberStringYesNumber
billingAddress.cityStringYesCity
billingAddress.capStringYesZip Code
billingAddress.districtStringYesProvince
billingAddress.countryStringYesCountry
billingAddress.fiscalCodeStringYesTax code

Request


{  
   "data":{  
      "request":{  
         "verifyCheckoutRequest":{  
            "merchantId":"12",
            "externalId":"TR_1",
            "signature":"AAIR12345"
         }
      }
   }
}

Answers

200 Success


{  
   "response":{  
      "verifyCheckoutResponse":{  
         "status":"000",
         "checkoutState":"000",
         "merchantId":"12",
         "externalId":"TR_1",
         "amount":"100",
         "currency":"EUR"
      }
   }
}

400 Error Validation


{  
   "response":{  
      "verifyCheckoutResponse":{  
         "status":"001",
         "errorCode":"XXX"
      }
   }
}

$request = new VerifyCheckoutRequest();

$request->setExternalId('TR_01');

$response = $client->verifyCheckout($request);

echo "The checkout status is " . $response->checkoutStatus;

For the full PHP SDK visit this link


from sdk.objects import VerifyCheckoutRequest
action = factory.make('verify.checkout')
action.body_params = VerifyCheckoutRequest(externalId='TR_01')
response = action.run()
print('The checkout state is {}'.format(response.checkoutState))

For the full PHP SDK visit this link