Start QR payment
POST
/integrations/openwaylet/v1/payments/start/qrThis endpoint starts the payment process that the user must finish on Waylet app.
Successful responses will have 201 HTTP status and contain the Waylet identifier for the payment.
Signature
API requests needs a signature:
HMACSHA512(qrContent + amount + commerceId + paymentId + callbackUrl)
using a secret that will be provided by Klikin for test environments.
Callbacks
When the operation is finished a POST request will be sent to the callbackUrl.
Callback signature calculation
The signature that will send the request to the API will be calculated in the following way (in pseudo-code):
HMACSHA512(paymentId + wayletPaymentId + status + amount)
using a secret that will be provided by Klikin for test environments.
POST {$request.body.callbackUrl}
Campo | Descripci贸n |
---|---|
paymentId | Trade operation identifier |
wayletPaymentId | Waylet operation identifier matching the identifier returned in the request |
status | You may receive one of the following values: PAID, REFUSED or CANCELED |
errorCode | If status = REFUSED, you receive the error code |
errorDescription | If status = REFUSED, you receive the error description |
amount | Amount requested to be collected |
signature |
Request
QR code that identifies a Waylet payment operation.
Amount to be charged.
Waylet commerce identifier. Will be provided by Klikin.
Callback URL that will be invoked when payment ends.
Payment identifier. Must be unique for any given commerceId
Shopping cart items
Item count.
Item description.
Item unit price.
Item total price.
Item should generate cashback. True by default.
{
"qrContent": "fbcb80a6ca299a2b7b8dc4ed",
"amount": 300,
"commerceId": "2db2b0eaff308cb7bc3dabb3",
"callbackUrl": "https://soft-temporary.net",
"paymentId": "202305248569",
"items": [
{
"units": 2,
"description": "Small Granite Mouse",
"unitPrice": 100,
"totalPrice": 200,
"generateCashback": false
}
],
"signature": "d5c5af0d7ef3c22da4d2accc"
}
Responses
Open Waylet internal payment identifier.
{
"_id": "bf48b9abf84cd8cd61cc40d7"
}