The design of the service attempt to be clear and simple as possible. The core purchase workflow is compound of two stages:
The first stage is done between merchant and w-ha backend by a REST service call. This first call is necessary to define the purchase requirements (css framework, amount, currency, return Url) and to authenticate the merchant transaction. For security reasons all method calls are securised by a hash computation described in Authentification section.
Transaction initiation example:
Header : AUTHORIZATION:API_PUBLIC_KEY:timeStamp:version:hash
POST https://contodeo.w-ha.com/contodeo/api/transaction/init
{
"amount": 12,
"external_id": "T-D12131321",
"auto_confirm": true
"return_url": "https://achile-service.com/payment-return"
}
Transaction initiation result:
{
"payment_token": "45544d734467414141576d416f7a68664142524252564d7651304a444c31424c51314d315547466b5a476c755a77434141424
14145434b416a47592b583351436b64574959386774394963414141425162724b3453647452794b4154474d695648307035484
15450705651495a6a6c71623954636d7535774743666a64587861614f38536e73594b6c4a56627272342b69534858506331736
7685a4f634a46685554666b6a6b3035792b744d374d4c6a2f61657971624b6a364c774146484e6e4935466e444673377139354
9587a7954773050334b466b61",
"payment_url": "https://contodeo.w-ha.com/secure-node-contodeo/purchase-form",
"redirect_url": "https://contodeo.w-ha.com/secure-node-contodeo/purchase-form?token=45544d734467414141576d416f7a68664142524252564d7651304a444c31424c51314d315547466b5a476c755a77434
14142414145434b416a47592b583351436b64574959386774394963414141425162724b3453647452794b4154474d695648307
03548415450705651495a6a6c71623954636d7535774743666a64587861614f38536e73594b6c4a56627272342b69534858506
3317367685a4f634a46685554666b6a6b3035792b744d374d4c6a2f61657971624b6a364c774146484e6e4935466e444673377
1393549587a7954773050334b466b61"
}
The initiation call delivers 3 informations :
These informations will be necessary to establish the second stage, the display of purchase panel.
The second stage of the workflow is to display the purchase form. There is two ways to achieve this:
payment_url
, you can perform this with a server redirection or a client redirection. The credit card formulary will be the quiet simple default one using the specified css library. Field Labels and errors messages will be localized according to the language provided during the first stage.
All the common display functionnalities are group in the transaction initiation. You can alter the global behavior with parameter :
This common parameters are describes in the specifications at core functionnality chapeter and webAuthorizeBody detail section.
An advantage of the direct integration is more fine tuning of the display. It allows you to make Look and feel customization like :
All this customization are directly described using html into the div injection target.
The two type a display integration will be discuss in specific pages of this documentation.
After the validation of paiement panel Contodeo will foward the client to a return url provided during initiation:
POST /transaction/init
,
{
...
"return_url": "https://achile-service.com/payment-return"
}
The return url will be appended will transaction information like this :
https://achile-service.com/payment-return?trx_id=886cdc70-08a7-49bc-35077d2bda44
The trx_id parameter will be used to interogate the API with different operations:
All this operation are describes in the API specifications.
© W-HA 2019. Tous droits réservés - www.contodeo.com - Mentions légales