Skip to main content

create Transaction

POST 

https://api.mtrust.io/api/package/v1/transactions

create a generic Transaction

Request

Bodyrequired

    serviceCode stringrequired
    actionCode stringrequired
    consumer string
    payload object
    error object
    score number
    actionName string
    serviceName string

Responses

Schema
    projectId stringrequired
    clientId stringrequired
    serviceCode stringrequired
    serviceName stringrequired
    actionCode stringrequired
    actionName stringrequired
    isCore boolean
    consumer string
    status stringrequired

    Possible values: [pending, confirmed, canceled, error]

    score numberrequired
    payload object
    error object
    createdAt date-timerequired
    _id ObjectIdrequired

    Possible values: Value must match regular expression ^[0-9a-fA-F]{24}

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.mtrust.io/api/package/v1/transactions");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"serviceCode\": \"string\",\n \"actionCode\": \"string\",\n \"consumer\": \"string\",\n \"payload\": {},\n \"error\": {},\n \"score\": 0,\n \"actionName\": \"string\",\n \"serviceName\": \"string\"\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.mtrust.io
Body required
{
"serviceCode": "string",
"actionCode": "string",
"consumer": "string",
"payload": {},
"error": {},
"score": 0,
"actionName": "string",
"serviceName": "string"
}
ResponseClear

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