A reference guide for webhook event payloads and their parameters.

This page provides details on webhook event payloads for various API endpoints. Each webhook delivers a URL-encoded payload with specific parameters relevant to the transaction type.


Handling Webhook Responses

The webhook will continue to be sent at regular intervals until the developer provides a response indicating success. To stop the retries, the application must return a "success" message as a confirmation that the webhook was received and processed correctly.

Node.js example


app.post('/webhook', (req, res) => {
  console.log('Webhook received:', req.body);
  
  // Respond with the string "success"
  res.status(200).send("success");
});

Java example


import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/webhook")
public class WebhookController {

    @PostMapping
    public String handleWebhook(@RequestBody String payload) {
        System.out.println("Webhook received: " + payload);
        return "success"; // Respond with string 
    }
}

PHP example

<?php
header("Content-Type: text/plain");

$input = file_get_contents("php://input");
error_log("Webhook received: " . $input);

echo "success"; // Respond with string 
?>

C# - ASP.NET Core example

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System.Threading.Tasks;

[ApiController]
[Route("webhook")]
public class WebhookController : ControllerBase
{
    private readonly ILogger<WebhookController> _logger;

    public WebhookController(ILogger<WebhookController> logger)
    {
        _logger = logger;
    }

    [HttpPost]
    public IActionResult HandleWebhook([FromBody] object payload)
    {
        _logger.LogInformation("Webhook received: {Payload}", payload);
        return Ok("success"); // Respond with string
    }
}



Webhook Events


Capture API Webhook {#capture-api}

Payload

{
  "amount": "20.00",
  "completedAt": "2025-02-06T13:23:39Z",
  "currency": "USD",
  "customerNo": "2000299440486216204525",
  "reference": "hwI8KhTcOS",
  "settleCurrency": "USD",
  "status": "success",
  "transactionNo": "378265991124154801",
  "verifySign": "183487986641f350b02c9285493d5adb"
}

Parameters


ParameterTypeDescription
amountstringTransaction amount
completedAtstringTransaction date time
currencystringTransaction currencies. (Ex. "USD", "CNY", "PHP", "IDR", "KRW", "HKD", "THB", "MYR", "GBP", "BDT", "PKR")
customerNostringThe user's ID in Pockyt System;
referencestringTransaction reference
settleCurrencystringThe currency in which the transaction will be settled.
statusstringTransaction status
transactionNostringTransaction ID
verifySignstringThe parameter signature. It is the calculated MD5 hash value of the API token used to encrypt the request message and authorize transaction requests.

Capture API Vaulting 3DS Webhook {#capture-api-3ds}

Payload

{
  "amount": "20.00",
  "completedAt": "2025-02-03T17:08:48Z",
  "currency": "USD",
  "customerNo": "2000357955353018248632",
  "reference": "8IbLIMznnn",
  "settleCurrency": "USD",
  "status": "success",
  "transactionNo": "378020295495416687",
  "vaultId": "pp_760a0aa12f0b45049e0ee08a85489d9d",
  "verifySign": "620a20b9392630717e6177de70a73d9a"
}
 

Parameters

ParameterTypeDescription
amountstringTransaction amount
completedAtstringTransaction date time
currencystringTransaction currencies. (Ex. "USD", "CNY", "PHP", "IDR", "KRW", "HKD", "THB", "MYR", "GBP", "BDT", "PKR")
customerNostringThe user's ID in Pockyt System;
referencestringTransaction reference
settleCurrencystringThe currency in which the transaction will be settled.
statusstringTransaction status
transactionNostringTransaction ID
vaultIdstringUnique identifier for a stored customer, used for recurring payments
verifySignstringThe parameter signature. It is the calculated MD5 hash value of the API token used to encrypt the request message and authorize transaction requests.

SecurePay API Webhook for Creating Vaults {#securepay-api-vaulting}

Payload

{
  "amount": "13.00",
  "completedAt": "2025-01-31T22:21:38Z",
  "currency": "USD",
  "customerNo": "2000357955353018248632",
  "reference": "KMRR44lKoU",
  "settleCurrency": "USD",
  "status": "success",
  "transactionNo": "377867816112957930",
  "vaultId": "pp_9cb9eb1892da49d2867c3d41bd73fedc",
  "verifySign": "57f4e4612a54a006e07d94f8cbb2e3c0"
}

Parameters


ParameterTypeDescription
amountstringTransaction amount
completedAtstringTransaction date time
currencystringTransaction currencies. (Ex. "USD", "CNY", "PHP", "IDR", "KRW", "HKD", "THB", "MYR", "GBP", "BDT", "PKR")
customerNostringThe user's ID in Pockyt System;
referencestringTransaction reference
settleCurrencystringThe currency in which the transaction will be settled.
statusstringTransaction status
transactionNostringTransaction ID
vaultIdstringUnique identifier for a stored customer, used for recurring payments
verifySignstringThe parameter signature. It is the calculated MD5 hash value of the API token used to encrypt the request message and authorize transaction requests.

SecurePay API Webhook {#securepay-api}

Payload

{
  "amount": "13.00",
  "currency": "USD",
  "note": "test note",
  "reference": "D3sOazxl7H",
  "settleCurrency": "USD",
  "status": "success",
  "time": "20250204060018",
  "transactionNo": "378125668329873881",
  "verifySign": "e981f9efd19aeee623fed7a25c352f79"
}

Parameters

ParameterTypeDescription
amountstringTransaction amount.
timestringExact time the transaction was performed.
currencystringTransaction currencies. (Ex. "USD", "CNY", "PHP", "IDR", "KRW", "HKD", "THB", "MYR", "GBP", "BDT", "PKR").
notestringNote added to the transaction.
referencestringTransaction reference.
settleCurrencystringThe currency in which the transaction will be settled.
statusstringTransaction status.
transactionNostringTransaction ID.
verifySignstringThe parameter signature. It is the calculated MD5 hash value of the API token used to encrypt the request message and authorize transaction requests.


SecurePay API Future Payments-Vaulting {#securepay-api-vaulting}

Payload

{
  "amount": "13.00",
  "customerNo": "2000357955353018248632",
  "paymentTime": "2025-02-03T17:08:08Z",
  "reference": "dXtIe0IMSn",
  "status": "success",
  "transactionNo": "378020298842332804",
  "vaultId": "pp_9cb9eb1892da49d2867c3d41bd73fedc"
}

Parameters

ParameterTypeDescription
amountstringTransaction amount
customerNostringThe user's ID in Pockyt System;
paymentTimestringExact time the transaction was performed.
referencestringTransaction reference
statusstringTransaction status
transactionNostringTransaction ID
vaultIdstringUnique identifier for a stored customer, used for recurring payments

Transfer Payout API Webhook {#payouts-transfer-api}

Payload

{
  "accountToken": "2010378228689186077976",
  "amount": "500.00",
  "currency": "USD",
  "invoiceId": "MQE1jGec7cMWDwNfpQdT",
  "paymentTime": "2025-02-03T20:19:04Z",
  "status": "pending",
  "transactionFee": "1.00",
  "transactionNo": "378159286791449567",
  "vendor": "BANK_ACCOUNT",
  "verifySign": "f51906caca3348641b9a760b860263f3"
}

Parameters

ParameterTypeDescription
amountstringTransaction amount.
accountTokenstringInternal Bank account Identifier in pockyt systems.
paymentTimestringExact time the transaction was performed.
currencystringTransaction currencies. (Ex. "USD", "CNY", "PHP", "IDR", "KRW", "HKD", "THB", "MYR", "GBP", "BDT", "PKR").
invoiceIdstringThe payment unique ID in the merchant's system.
statusstringTransaction status.
transactionNostringTransaction ID.
transactionFeestringThe fee charged for processing the transaction.
vendorstringThe provider that processes the payment.( PAYPAL, BANK_ACCOUNT, VENMO)
verifySignstringThe parameter signature. It is the calculated MD5 hash value of the API token used to encrypt the request message and authorize transaction requests.