---
title: "PayPal Sale Transaction"
method: POST
path: "/paypal/sale"
tags: ["PayPal"]
---

# PayPal Sale Transaction

`POST /paypal/sale`

This authorizes and captures the transaction. In addition, it will return a payload that includes the transaction's  sale details.

**Integration Methods:**
- Host Direct

See the [Integration Methods](/guides/quickstart#integration-methods) and [URLs Section](/guides/quickstart#urls) sections of the Development Quick Start guide for details regarding each processing option.

## Headers

- `InterfaceVersion` string, required
- `InterfaceName` string, required
- `CompanyName` string, required
- `AccessToken` string, uuid, required

## Request body

- object
  - `dateTime` string, ISO 8601, required — The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm). Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00
  - `amount` object, required
    - `total` number, required — The amount being charged for a particular transaction. If other amount fields are sent, they must be included in the total amount. Amount cannot be zero.
  - `payPal` object, required
    - `payerId` string, required — The ID belonging to the PayPal account.
    - `paymentMethodNonce` string, required — A payment method nonce is a secure, one-time-use reference to payment information. It's the key element that allows your server to communicate sensitive payment information to Braintree without ever touching the raw data.
    - `paymentMethodIdUsage` 'S' | 'M' — Dictates whether paymentMethodId returned will be single or multi-use payment token Value|Description -----|----------- S | Single Use M | Multiple Use
    - `deviceData` string, required — The customer's device information.
  - `transaction` object, required
    - `invoice` string, required — 10-digit invoice number assigned by the interface to identify a transaction. An invoice number serves as a unique key that identifies a transaction within a batch in Shift4's Gateway. **Note: For US and Canadian processing: Although the invoice number is sent as a JSON string it is a numeric value. No alpha characters are allowed.** **For processing outside of the US and Canada alpha characters are allowed.**
    - `airline` AirlineRequestPayPal — **Conditional: Utilize this object for Airline transactions**
      - `carrierCode` string, required — The code of the airline carrier issuing the ticket.
      - `flightLegs` AirlineFlightLegsPayPal[], required — Array of flight trip leg info. Maximun 4 legs to a trip allowed. Note: At least one instance of flight trip leg info should be provided.
        - `carrierCode` string — Code indicating name of carrier (United Airlines, Jet Blue, etc.) for the leg.
        - `conjunctionTicketIndicator` 'Y' | 'N' — Indicates whether the itinerary contains more than four segments of travel. Value | Description -------|------------------- Y | Yes N | No
        - `couponNumber` number — Number of coupons in the ticket for the leg.
        - `destAirportCode` string, required — Indicates destination city's airport code for the leg.
        - `exchangeTicketNumber` string — The original ticket number that was replaced by a new ticket number.
        - `fareBasis` string, required — This field contains primary and secondary discount codes that indicate the class of service and fare level associated with the ticket for the leg. Truncate at 24 bytes, if necessary.
        - `flightNumber` string, required — Number of the airline flight to be taken on Leg of the trip.
        - `legArrivalDateTime` string, ISO 8601 — The date and time the flight is scheduled to arrive for the leg. The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).
        - `legDepartureDateTime` string, ISO 8601, required — The date and time the flight is scheduled to depart for the leg. The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).
        - `originAirportCode` string, required — Indicates origination city's airport code for the leg.
        - `restrictedTicketIndicator` '0' | '1' — Indicates whether this ticket is non-refundable. Value | Description -------|------------------- 0 | No restriction 1 | Restricted (non-refundable) ticket
        - `serviceClass` string, required — Indicates service class for leg. Value | Description -------|--------------- FC | First Class BC | Business Class EC | Economy/Coach Class
        - `stopOverCode` string, required — Indicates whether a stopover is allowed on this ticket for leg. The entry must be a D, O, or X. Value | Description -------|--------------- O | Stopover allowed X | Stopover not allowed D | Destination point
        - `taxAmount` number — The tax amount
      - `issueDate` string, ISO 8601, required — The date the ticket was issued to the customer. The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).
      - `passengerArrivalDate` string, ISO 8601 — Date that the ticket holder is scheduled to arrive at their destination at the time of issuance of the original ticket. The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).
      - `passengerBirthDate` string, YYYY-MM-DD — The passenger's date of birth in YYYY-MM-DD format
      - `passengerCode` string — The code supplied by the customer using a purchase card. Maximum 17 characters.
      - `passengerCountryCode` string, ISO 3166 Alpha-2 — The passenger's nationality in ISO 3166 Alpha-2 format.
      - `restrictedTicketIndicator` '0' | '1' — Indicates whether this ticket is non-refundable. Value | Description -------|------------------- 0 | No restriction 1 | Restricted (non-refundable) ticket
      - `taxAmount` number — The tax amount
      - `tickets` AirlineTicketsPayPal[], required — Array of ticket number and passenger name. Note: At least one instance of ticket number and passenger name info should be provided.
        - `passengerName` string, required — Name of the passenger to whom the ticket was issued. This field contains the Passenger Name in format: `SURNAME FIRSTNAME MIDDLEINITIAL TITLE` Example: "Doe Jane M Mrs"
        - `ticketNumber` string, required — The ticket number provided by the Carrier for the passenger.
        - `ticketFare` number — Ticket fare is the total amount for each ticket, including service fee or any other fee for each ticket.
      - `travelAgencyCode` string — Code identifying travel agency if the ticket was issued by a travel agency. **Conditional: Send if a travel agency service was used.**
      - `travelAgencyName` string — Name of travel agency if the ticket was issued by a travel agency. **Conditional: Send if a travel agency service was used.**
    - `notes` string — A free-form notes field that supports the use of HTML tags. This can be used for reference in [Lighthouse Transaction Manager](https://ltm.shift4test.com/) and is not sent to the authorization host. Escaped quotation marks should not be sent in the Notes field.
    - `vendorReference` string — Optional field for information that can be searched in the merchant portal.
  - `currencyCode` string, ISO 4217 3 Character Alphabetic Code, required — Transaction currency code. See the [Currency Codes](/guides/appendices/currency-codes) section for details. **Note: This is currently supported when processing for a merchant outside of the US and Canada. If processing for a US or Canadian merchant then this field will be ignored and the transaction will process in the merchant's configured currency.**
  - `sourceIp` string, required — Public source IP Address where the request originates, not the IP Address of the web server.
  - `customer` object, required
    - `browserType` string, required — Internet browser or simply a browser.

## Response `200`

Transaction was processed

- object
  - `result` object[]
    - `dateTime` string, ISO 8601, required — The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm). Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00
    - `amount` object, required
      - `total` number, required — The amount being charged for a particular transaction. If other amount fields are sent, they must be included in the total amount. Amount cannot be zero.
    - `merchant` MerchantResponse
      - `mid` number — The merchant ID associated with the merchant account.
      - `name` string — The merchant’s business name as configured with Shift4.
    - `transaction` object, required
      - `authSource` 'E' | 'O' | 'A' | 'F', required — In a response, a code returned by the processor to indicate which host issued the response. Value | Description -------|---------------------------- E | Engine (Online) O | Offline A | APM (Online) F | Payment Platform (Online)
      - `invoice` string, required — 10-digit invoice number assigned by the interface to identify a transaction. An invoice number serves as a unique key that identifies a transaction within a batch in Shift4's Gateway. **Note: For US and Canadian processing: Although the invoice number is sent as a JSON string it is a numeric value. No alpha characters are allowed.** **For processing outside of the US and Canada alpha characters are allowed.**
      - `responseCode` 'A' | 'C' | 'D' | 'e' | 'f' | 'P' | 'R' | 'X' | 'S' | 'I', required — Code indicating the Shift4 host response. Value | Description | Details -------|---------------------------------------------------------------------------------------|-------- A | Approved | The transaction is approved. C | Approved | The transaction is approved without requiring additional authorization because it is less than or equal to a ceiling amount. (The ceiling amount is the original authorization amount multiplied by the tolerance per the merchant’s settings with Shift4.) D | Declined | The transaction is declined. <b>Note: Shift4 automatically declines AVS/CSC failures if the [POSHANDLEAVSFAIL Api Option](/guides/appendices/api-options#poshandleavsfail) was not sent in the request.</b> e | [Error](/guides/appendices/error-codes) | There is an error condition. f | [AVS or CSC failure](/guides/response-handling/understanding-avs-and-csc-verification)| An AVS or CSC failure has occurred (credit card only). <b>Note: This value will only be returned if the [POSHANDLEAVSFAIL Api Option](/guides/appendices/api-options#poshandleavsfail) was sent in the request.</b> P | [Partial approval](/guides/advanced-concepts/partial-approval) | A partial approval has occurred. Check `amount.total` for the approved amount. R | Voice referral | The transaction requires a voice referral. [blank]| Status is unknown | The approval status is unknown. X | Expired card | There is an error condition due to the card being expired. S | SCA Online PIN required | The contactless EMV transaction requires strong customer authentication to continue. The terminal must gather the online PIN if supported by the device form factor and CVM list then resubmit the transaction request. I | SCA Interface switch required | The contactless EMV transaction requires strong customer authentication to continue. The terminal must look at the form factor indicator to determine if the transaction should be declined, switched to EMV contact or tapped again using CDCVM. J | Soft decline after exemption request | Transaction was soft declined. Returned when requesting an exemption by sending `transaction.exemptionAction = 02` and the card issuer rejects the exemption.
    - `server` object, required
      - `name` string, required — The name of the server that processed the request.
    - `payPal` object, required
      - `transactionId` string, required — Unique identifier.
      - `legacyId` string, required — Legacy unique identifier.
      - `orderId` string, required — Additional information about the transaction.
      - `status` string, required — The current status of this transaction.
      - `authorizationId` string, required — If the transaction was successfully authorized, the PayPal ID for the authorization.
      - `captureId` string, required — If funds for the transaction have settled, the PayPal ID for the capture of funds.
      - `paymentMethodId` string — Identifier for a single or multi-use payment token

---

[API](https://skmtc.dev/shift4/apis/shift4-payment-api.md) · [All operations](https://skmtc.dev/shift4/apis/shift4-payment-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/shift4/shift4-payment-api/revisions/2f85c87cc9e5/schema)
