Skip to main content

Capture a Transaction

POST 

https://useast.api.elasticpath.com/v2/orders/:orderID/transactions/:transactionID/capture

Use this endpoint to capture a previously authorized payment. In this step, you can also pass in a custom reference, such as the payment reference from your chosen gateway.

Request

Responses

Response Headers

    Authorization: http

    name: bearerAuthtype: httpscheme: bearer
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://useast.api.elasticpath.com/v2/orders/:orderID/transactions/:transactionID/capture");
    request.Headers.Add("Accept", "application/json");
    request.Headers.Add("Authorization", "Bearer <TOKEN>");
    var content = new StringContent("{\n \"data\": {\n \"options\": {\n \"soft_descriptor\": \"string\",\n \"note_to_payer\": \"string\"\n }\n }\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://useast.api.elasticpath.com
    Auth
    Parameters
    — pathrequired
    — pathrequired
    Body
    {
      "data": {
        "options": {
          "soft_descriptor": "string",
          "note_to_payer": "string"
        }
      }
    }
    
    ResponseClear

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