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

Path Parameters

    orderID stringrequired

    The UUID of the order.

    transactionID stringrequired

    The UUID of the transaction to capture.

Body

    data object
    options object
    soft_descriptorstring
    note_to_payerstring

Responses

Response Headers
    Schema
      data objectrequired
      iduuid

      The ID of the transaction.

      referencestring

      The payment gateway reference.

      namestring

      A custom name associated with the payment method.

      custom_referencestring

      A reference associated with the payment method. This might include loyalty points or gift card identifiers. We recommend you not to include personal information in this field.

      gatewaystring

      The name of the payment gateway used.

      Possible values: [adyen, authorize_net, braintree, card_connect, cyber_source, elastic_path_payments_stripe, manual, paypal_express_checkout, stripe, stripe_connect, stripe_payment_intents, stripe_platform_account]

      amountnumber

      The amount for this transaction.

      refunded_amountnumber

      The refunded amount.

      currencystring

      The transaction currency.

      transaction-typestring

      The type of transaction, such as purchase, capture, authorize or refund.

      statusstring

      The status provided by the gateway for this transaction, such as complete or failed.

      relationships object
      order object
      data object
      typestring

      Represents the type of the object being returned. It is always order.

      iduuid

      The ID of the order.

      meta object
      display_price object
      amountnumber

      The raw total.

      currencystring

      The currency set for this amount.

      formattedstring

      The formatted total based on the amount and currency.

      display_refunded_amount object
      amountnumber

      The raw total.

      currencystring

      The currency set for this amount.

      formattedstring

      The formatted total based on the amount and currency.

      timestamps object
      created_atstring

      The date this was created.

      Example: 2023-11-07T23:04:18.845Z
      updated_at

      The date this was last updated.

      Example: 2023-11-07T23:04:18.845Z

    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!