Skip to main content

Refund Payin

POST 

https://api.cleverhub.co/api/v2/payins/refund

Initiate a refund request on a completed payin (with received status). Before initiating the refund, check if the payin method is refundable (is_refundable == true).

Request

Body

    uuidintegerrequired

    Payment request ID

    amountnumber

    Refund amount, must be numeric. If not specified, the refund amount will be the same as the total amount.

    descriptionstringrequired

    Partial refund reason, must be at least 5 characters long

Responses

Refund Started

Schema
    total_amountstring

    Total amount of the transaction

    refund_amountstring

    Amount refunded

    descriptionstring

    Reason for the refund

    payin_request object
    uuidstring

    Unique identifier of the payin request

    namestring
    descriptionstring
    emailstring
    external_idstring
    statusreturn_pending
    pay_code object
    pay_idstring

    PayID associated with the refund

    currencystring
    gstboolean
    amountstring
    gst_amountnumber
    totalstring
    paid_amountstring
    payment_methodstring
    is_refundableboolean
    expried_atdate-time
    pay_bydate-time
    payin_notification object
    endpoint_urlstring
    authorization_headerstring

Authorization: app-id

name: app-idtype: apiKeydescription: The app-id is registered and secured inside Hello Clever system and only required when client has initiated or in the middle of the transaction.in: header
name: secret-keytype: apiKeydescription: The secret-key is our client's secret of the source. Required if a publishable key is used to retrieve the source.in: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.cleverhub.co/api/v2/payins/refund");
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 \"uuid\": \"APU221YS\",\n \"amount\": 10,\n \"description\": \"Partial Refund Reason\"\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
{
  "uuid": "APU221YS",
  "amount": 10,
  "description": "Partial Refund Reason"
}
ResponseClear

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