Capture Authorization

Do not execute a capture while another is in progress. Wait for the current operation to complete before starting a new one.

This request captures a payment that was previously authorized. This action is required to finalize a payment when an authorization was created with the capture option set false. Depending on the payment provider, the capture could be partial (including multiple captures) or total.

Note that this request requires an X-Idempotency-Key. Check the Authentication page for more information.

POST/payments/{payment_id}/transactions/{transaction_id}/capture

Path Parameters

payment_idstringrequired

The unique identifier of the payment (UUID, 36 chars).

transaction_idstringrequired

The unique identifier of the transaction (UUID, 36 chars)

Body application/json

merchant_referencestringrequired

Identification of the payment transaction defined by the merchant (MAX 255; MIN 3)

amountobjectrequired

Specifies the amount object for capturing.

Show amount properties
currencystringrequired

The currency used to make the payment. For a full list of currency codes, see Country reference (MAX 3; MIN 3; ISO 4217).

valuenumber<float>required

The payment amount (multiple of 0.0001).

reasonstringrequired

Indicating the reason for the capture. For example: PRODUCT_CONFIRMED and REQUESTED_BY_CUSTOMER.

additional_dataobject

Additional data to complement the payment capture

Show additional_data properties
orderobject

Specifies the order object.

Show order properties
shipping_amountnumber<float>

The shipping amount of the order (multiple of 0.0001)

fee_amountnumber<float>

The fee amount of the order (multiple of 0.0001)

itemsobject[]

Specifies the items array of object.

Show items properties
idstringrequired

The unique identifier of the item (MAX 255; MIN 3).

namestringrequired

The name of the item (MAX 255; MIN 3).

quantityinteger<int32>required

The quantity of the item.

unit_amountnumber<float>required

The unit amount of the item (multiple of 0.0001).

category"art" | "baby" | "coupons" | "beauty_&_personal_care" | "donations" | "computing" | "books" | "grocery_&_gourmet_food" | "cameras" | "video_games" | "television" | "car_electronics" | "electronics" | "automotive" | "toys_&_games" | "musical_instruments" | "handmade" | "garden_&_outdoor" | "entertainment" | "industrial_&_scientific" | "fashion" | "games" | "pet_supplies" | "home" | "musical" | "phones" | "services" | "learnings" | "tickets" | "travels" | "virtual_goods" | "others"

The category of the item. Check the Item category reference.

brandstring

The brand of the item (MAX 255; MIN 3).

sku_codestring

The stock keeping unit (SKU) of the item (MAX 255; MIN 3).

manufacture_part_numberstring

The manufacture part number of the item

airlineobject

Specifies the airline object.

Show airline properties
pnrstring

Passenger name record (MAX 10; MIN 1).

legsobject[]

Specifies the legs array of objects.

Show legs properties
departure_airportstringrequired

IATA code. See http://www.iata.org (MAX 3; MIN 3).

departure_datetimestring<date-time>required

The departure date and time in UTC time (ISO 8601, MAX 27; MIN 27).

departure_airport_timezonestringrequired

Airport timezone (MAX 6; MIN 6).

arrival_airportstringrequired

IATA airport code. See http://www.iata.org (MAX 3; MIN 3).

carrier_codestringrequired

IATA carrier code. See http://www.iata.org (MAX 2; MIN 2).

carrier_namestring

The name of the airline carrier (MAX 100; MIN 1).

flight_numberstringrequired

The flight number assigned by the airline carrier (MAX 5; MIN 1).

fare_basis_codestringrequired

Code base rate provides specific information on the fare in addition to the class service, both required for booking (MAX 15; MIN 1).

fare_class_code"F" | "FR" | "B" | "CR" | "Y" | "YD"required

The fare class code of the airline (MAX 1; MIN 1). The values can be a letter (A-Z) but may vary depending on the airline’s definition. Check the Airline information reference.

base_farenumber<float>

The transaction amount, excluding taxes and fees, the smallest unit of currency (multipleOf 0.0001).

base_fare_currencystring

The currency used to transaction amount (MAX 3; MIN 3; ISO 4217).

stopover_codestring

1-letter code that indicates whether the passenger is allowed to make a stopover. Only two types of characters are allowed: O: Stopover allowed (the letter “O”, not zero) / X: Stopover not allowed. (MAX 1; MIN 1)

passengersobject[]

Specifies the passengers array of objects associated to the tickets.

Show passengers properties
first_namestring

The passenger first name (MAX 255; MIN 3).

last_namestring

The passenger last name (MAX 255; MIN 3)

middle_namestring

The passenger middle name (MAX 255; MIN 3).

type"A" | "C" | "I"

The passenger type (MAX 1; MIN 1). Check the Airline information reference.

date_of_birthstring<date>

The passenger date of birth in the YYYY-MM-DD (MAX 10; MIN 10).

nationality"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY"

The passenger nationality (MAX 2; MIN 2; ISO 3166-1).

documentobject

Specifies the passengers’ document object.

Show document properties
document_numberstring

Document number for passenger (MAX 40; MIN 3).

document_type"DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC" | ""

The passenger’s document type (MAX 6, MIN 2; (Country reference)).

country"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY"

Country where the document was issued (MAX 2; MIN 2; ISO 3166-1).

loyalty_numberstring

Number of passenger loyalty program.

loyalty_tier"1" | "2" | "3"

Tier of passenger loyalty program. Check the Airline information reference.

phoneobject

Specifies the phone object for the passenger.

ticketsobject[]

Specifies the array of ticket objects associated to the passengers.

Show tickets properties
ticket_numberstring

Ticket number (MAX 14; MIN 1).

e_ticketboolean

Is this an e-ticket? (true) (false).

restrictedboolean

Indicates if the ticket is refunfable or not (true/false)

total_fare_amountnumber<float>

Total fare amount in the smallest unit of currency (multiple of 0.0001).

total_tax_amountnumber<float>

Total taxes amount in the smallest unit of currency (multiple of 0.0001).

total_fee_amountnumber<float>

Total fee amount in the smallest unit of currency (multiple of 0.0001).

issueobject

Specifies the issue object.

Show issue properties
carrier_prefix_codestring

Issuing or Validating carrier. This is the AWB Prefix (Air waybill) 3-numeric code (MAX 3; MIN 3).

travel_agent_codestring

Code of the travel agent issuing the ticket (MAX 9; MIN 8).

travel_agent_namestring

The name under which the point of sale appears on the agency list or franchise name (MAX 32; MIN 1).

datestring<date-time>

Ticket issuing date (MAX 27; MIN 27).

addressstring

Address of the agent whose sold the ticket (MAX 255; MIN 3).

citystring

City name of the agent whose sold the ticket (MAX 255; MIN 3).

country"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY"

Country code alpha 2 where the ticket was issued (MAX 2; MIN 2; ISO 3166-1).

seller_detailsobject

Specifies the seller’s details object.

Show seller_details properties
namestring

The seller’s legal name (MAX 255; MIN 3).

emailstring

The seller’s e-mail (MAX 255; MIN 3).

referencenumber<float>

The seller’s identification code (MAX 255; MIN 3).

websitestring

The seller’s website URL (MAX 255; MIN 3).

industrystring

The seller’s industry (MAX 235; MIN 1) For more information access the Industry category reference page.

merchant_category_codestring

MCC - The merchant category code (MAX 235; MIN 1).

country"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY" | ""

The seller’s country (MAX 255; MIN 3; ISO 3166-1).

documentobject

Specifies the document object of the seller.

Show document properties
document_numberstring

The seller’s document number (MAX 40; MIN 3).

document_type"DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC" | ""

The seller’s document type (MAX 6, MIN 2; Document Type List).

phoneobject

Specifies the seller’s phone number object.

Show phone properties
country_codestring

The country calling code of the seller’s phone (MAX 3; MIN 1). Check the Country reference to see the phone codes.

numberstring

The seller’s phone number, without the country code (MAX 32; MIN 1).

addressobject

Specifies the seller’s address object.

Show address properties
address_line_1string

The primary address line of the seller (MAX 255; MIN 3).

address_line_2string

The secondary billing address line of the seller (MAX 255; MIN 3).

citystring

The city considered for the seller’s address (MAX 255; MIN 3).

country"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY" | ""

The country considered for the seller’s address (MAX 2; MIN 2; ISO 3166-1).

statestring

The state considered for the seller’s address (MAX 255; MIN 3).

zip_codestring

The zipcode considered for the seller’s address (MAX 11; MIN 4).

simplified_modeboolean

Determines whether WHITELABEL should automatically attempt to capture a payment after an initial error or decline. When set to true, WHITELABEL will retry the process if the first attempt fails. By default, this is set to false. Access Transaction Retries for more details.

Response

200

idstring
typestring
statusstring
categorystring
amountobject
Show amount properties
capturedinteger
currencystring
refundedinteger
valueinteger
merchant_referencestring
created_atstring
updated_atstring
provider_dataobject
Show provider_data properties
idstring
transaction_idstring
account_idstring
statusstring
status_detailstring
response_messagestring
response_codestring
iso8583_response_codestring
iso8583_response_messagestring
raw_requestobject

Obfuscated copy of the request WHITELABEL sent to the provider. Only returned for allowlisted organizations.

raw_responseany
third_party_transaction_idany
third_party_account_idany
connection_dataobject
Show connection_data properties
idstring
namestring
response_codestring
response_messagestring
paymentobject
Show payment properties
idstring
account_idstring
descriptionstring
countrystring
statusstring
sub_statusstring
merchant_order_idstring
created_atstring
updated_atstring
amountobject
Show amount properties
capturedinteger
currencystring
refundedinteger
valueinteger
additional_dataobject
Show additional_data properties
airlineany
orderany
seller_detailsany

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/payments/<payment_id>/transactions/<transaction_id>/capture" \
  -H "Content-Type: application/json" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -H "X-Idempotency-Key: <X-Idempotency-Key>" \
  -d '{
  "merchant_reference": "string",
  "amount": {
    "currency": "string",
    "value": 0
  },
  "reason": "string",
  "additional_data": {
    "order": {
      "shipping_amount": 0,
      "fee_amount": 0,
      "items": [
        {
          "id": "string",
          "name": "string",
          "quantity": 0,
          "unit_amount": 0,
          "category": "art",
          "brand": "string",
          "sku_code": "string",
          "manufacture_part_number": "string"
        }
      ]
    },
    "airline": {
      "pnr": "string",
      "legs": [
        {
          "departure_airport": "string",
          "departure_datetime": "1970-01-01T00:00:00.000Z",
          "departure_airport_timezone": "string",
          "arrival_airport": "string",
          "carrier_code": "string",
          "carrier_name": "string",
          "flight_number": "string",
          "fare_basis_code": "string",
          "fare_class_code": "F",
          "base_fare": 0,
          "base_fare_currency": "string",
          "stopover_code": "string"
        }
      ],
      "passengers": [
        {
          "first_name": "string",
          "last_name": "string",
          "middle_name": "string",
          "type": "A",
          "date_of_birth": "2024-01-01",
          "nationality": "AR",
          "document": {
            "document_number": "string",
            "document_type": "DNI",
            "country": "AR"
          },
          "loyalty_number": "string",
          "loyalty_tier": "1",
          "phone": {}
        }
      ],
      "tickets": [
        {
          "ticket_number": "string",
          "e_ticket": true,
          "restricted": true,
          "total_fare_amount": 0,
          "total_tax_amount": 0,
          "total_fee_amount": 0,
          "issue": {
            "carrier_prefix_code": "string",
            "travel_agent_code": "string",
            "travel_agent_name": "string",
            "date": "1970-01-01T00:00:00.000Z",
            "address": "string",
            "city": "string",
            "country": "AR"
          }
        }
      ]
    },
    "seller_details": {
      "name": "string",
      "email": "string",
      "reference": 0,
      "website": "string",
      "industry": "string",
      "merchant_category_code": "string",
      "country": "AR",
      "document": {
        "document_number": "string",
        "document_type": "DNI"
      },
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "address": {
        "address_line_1": "string",
        "address_line_2": "string",
        "city": "string",
        "country": "AR",
        "state": "string",
        "zip_code": "string"
      }
    }
  },
  "simplified_mode": true
}'
Response
{
  "id": "89fd7fd0-951d-4335-ad1b-ef899a79630d",
  "type": "CAPTURE",
  "status": "SUCCEEDED",
  "category": "CARD",
  "amount": {
    "captured": 0,
    "currency": "USD",
    "refunded": 0,
    "value": 30000
  },
  "merchant_reference": "AAB01-432245",
  "created_at": "2024-06-06T14:26:41.535489Z",
  "updated_at": "2024-06-06T14:26:41.615608Z",
  "provider_data": {
    "id": "YUNO_TEST_PAYMENT_GW",
    "transaction_id": "1173513e-2422-4ba0-ba40-fd568a4904f9",
    "account_id": "493e9374-510a-4201-9e09-de669d75f256",
    "status": "SUCCEEDED",
    "status_detail": "",
    "response_message": "Transaction successful",
    "response_code": "",
    "iso8583_response_code": "00",
    "iso8583_response_message": "Approved or completed successfully",
    "raw_request": {},
    "raw_response": null,
    "third_party_transaction_id": null,
    "third_party_account_id": null
  },
  "connection_data": {
    "id": "58cc35f4-faef-4107-8e09-d18d60121d38",
    "name": "Connection name"
  },
  "response_code": "SUCCEEDED",
  "response_message": "Transaction successful",
  "payment": {
    "id": "af170f9d-e8c1-47e4-a988-25535e0f88a1",
    "account_id": "",
    "description": "Test",
    "country": "US",
    "status": "SUCCEEDED",
    "sub_status": "CAPTURED",
    "merchant_order_id": "0000023",
    "created_at": "2024-06-06T14:26:22.933194Z",
    "updated_at": "2024-06-06T14:26:41.655119Z",
    "amount": {
      "captured": 30000,
      "currency": "USD",
      "refunded": 0,
      "value": 30000
    },
    "additional_data": {
      "airline": null,
      "order": null,
      "seller_details": null
    }
  }
}