Skip to main content

Payin request simulation

POST 

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

This API allows you to simulate a payin request completion. This is useful for testing purposes and works only in sandbox environment. To complete the payment, it must be in a PENDING status.

Request

Body

    uuidstringrequired

    Payment UUID

    Example: MB3Y26GO
    amountnumber

    Amount simulate

    Example: 500
    statusstringrequired

    The desired transaction status, with two possible statuses completed or failed.

    Example: completed

Responses

OK

Schema
    statusstring

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/simulate");
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\": \"MB3Y26GO\",\n \"amount\": 500,\n \"status\": \"completed\"\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": "MB3Y26GO",
  "amount": 500,
  "status": "completed"
}
ResponseClear

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