WAAVE Checkout integration Custom install
Cecilia
Last Update 3 jaar geleden
Version 1 - last updated 11-23-2020
Javascript SDK
OVERVIEW
- To use your own checkout button, invoke the WAAVE Checkout Dialog with a call to create a transaction.
- Using your API key, pass on the vendor id supplying the products in the cart (venue-id), the total amount to charge, and your cart’s URL.
- When the User clicks on the WAAVE Checkout button, a new browser window will guide them through WAAVE login/registration, payment method selection, and present a transaction summary for their approval.
- The User accepts and pays. WAAVE site will display confirmation, send Customer a receipt over email, pass on success message to the Client site, and redirect the user back to a Client site where Client can display their own transaction success summary.
1. Requirements
a. Access Key
b. Venue ID
2. Javascript SDK
a. Javascript SDK URLs:
i. Test: https://staging-pg.getwaave.co/js/waave-checkout-sdk.js
ii. Prod: https://pg.getwaave.co/js/waave-checkout-sdk.js
b. Test Payment Method:
Use the payment method below.
Please, keep transactions under $1.

3. HTML Sample
<div class="waavepay-checkout"
data-access-key="670ce9a7160ee0ba5411b6e9d398adb6"
data-venue-id="79021"
data-reference-id="1"
data-amount="1"
data-currency="USD"
data-return-url="http://localhost/"
data-cancel-url="https://localhost/"
data-env="test">
</div>
4. Parameters

5. Redirect to Client site:
Query string sample: ?success=1&transaction=b701cf5735e0d60e26dc42e1d8a742cb
TRANSACTION API
1. Base URL
2. Authorization Header
- “X-Api-Key” : The Access Key
- “X-Api-Signature”: A signature used to verify the request was sent by the account holder.
How to get it:
- Concatenate the API Secret Key, the request URL and the json encoded of the request body (if the request body is empty, use an empty string instead)
- Hash the string above with SHA-256.
- Example for GET/CANCEL transaction - the request body is empty: (with PHP)
Url: https://staging-pg.getwaave.co/waavepay/api/transaction/3dcb8ea99fc6c3651b97fcb1224c6200
hash(‘sha256’, ‘9e2aee3285f54e6e0f08042d694feb7ahttps://staging-pg.getwaave.co/waavepay/api/transaction/3dcb8ea99fc6c3651b97fcb1224c6200’) = ‘638a2a33d44b670e1c070d064b9a9c248639378cbeaf884c585f034e70e58eec’
→ “X-Api-Key” : 9c719461b080911df0fe93f64feafe47
→ “X-Api-Signature”: 638a2a33d44b670e1c070d064b9a9c248639378cbeaf884c585f034e70e58eec
3. Get Transaction info
a. Endpoint:
GET /api/transaction/{transactionId}
b. Result sample:
- Success: http code 200
{
"id": "308199ae0eacc31c1c04f84a866ae522",
"venue_id": 79021,
"status": "completed",
"amount": 20.52,
"currency": "USD",
"reference_id": "3215",
"return_url": "http://widget-demo.getwaave.co/",
"cancel_url": "http://widget-demo.getwaave.co/",
"created_at": "2020-10-06 06:10:12"
}
- Error: http code 404
{
"error": true,
"message": "Transaction not found!"
}
4. Cancel Transaction:
a. Endpoint:
PUT /api/transaction/{transactionId}/cancel
b. Result sample:
- Success: http code 200
{"success": true,
"id": "308199ae0eacc31c1c04f84a866ae522",
"status": "canceled"
}
- Error: http code 400
{
"error": true,
"message": "Transaction has been canceled!"
}