Start payment
POST
/integrations/openwaylet/v1/payments/startThis 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:
HMAC_SHA512(customer + 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
User ID. The user's email or phone number or the user's unique Repsol registration identifier may be sent.
Charge amount
Identifier of the merchant making the charge. Provided by Klikin.
Identifier of the operation in the trade. It must be unique per transaction.
Number of items
Item description
Price item
Price total
Indicates whether cashback is generated or not, by default, true.
{
"customer": "Loraine_Hessel@example.com",
"amount": 300,
"commerceId": "f86edbb51682cee8fcdb13ff",
"callbackUrl": "https://whirlwind-starter.org",
"paymentId": "202305248569",
"items": [
{
"units": 2,
"description": "Electronic Rubber Computer",
"unitPrice": 100,
"totalPrice": 200,
"generateCashback": false
}
],
"signature": "a77eebdac8f8b8dbe0fdf8d3"
}
Responses
Waylet payment identifier
{
"_id": "bf48b9abf84cd8cd61cc40d7"
}