Skip to main content

Cancel a PayID

POST 

https://api.cleverhub.co/api/v1/payment_requests/cancel_payid

Cancel an active pending PayID transaction, which will deregister the PayID and update the transaction status to expired. This action is irreversible and will prevent the PayID from being used for further transactions.

This endpoint is useful when a customer decides not to complete the payment, or if the PayID needs to be invalidated for other reasons. Once cancelled, the PayID will no longer be recognised as valid within the system.

Request

Bodyrequired

    payidstringrequired

    The unique PayID to be cancelled, associated with the pending transaction.

    Example: abc.xyz@example.co

Responses

PayID cancelled successfully.

Schema
    payidstring

    The PayID that was cancelled.

    Example: abc.xyz@example.co

Authorization: app-id

name: app-idtype: apiKeyin: headerdescription: A unique identifier assigned to each application.
name: secret-keytype: apiKeyin: headerdescription: A secure token associated with the `app-id`.
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v1/payment_requests/cancel_payid");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var content = new StringContent("{\n \"payid\": \"abc.xyz@example.co\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.cleverhub.co/api
Auth
Body required
{
  "payid": "abc.xyz@example.co"
}
ResponseClear

Click the Send API Request button above and see the response here!