# PayPal Initiate This request initiates a PayPal transaction. - Host Direct See the Integration Methods and URLs Section sections of the Development Quick Start guide for details regarding each processing option. Endpoint: POST /paypal/initiate Version: 1.7.43 Security: AccessToken ## Header parameters: - `InterfaceVersion` (string, required) Refers to the version of the program or application that is sending requests to Shift4. The following special characters are not allowed: $ % : ^ - ~ , ? “ ” ‘ ’ { } [ ] \ + = Example: "2.1" - `InterfaceName` (string, required) Refers to the name of the program or application that is sending requests to Shift4. This should be the name of the program that you purchased or created. The following special characters are not allowed: $ % : ^ - ~ ` , ? “ ” ‘ ’ { } [ ] \ + = Example: "ForwardPOS" - `CompanyName` (string, required) Refers to the vendor or partner that designed and certified the interface. The information you use in this field should match what Shift4 has on file or what was agreed upon in your Integration Plan. The following special characters are not allowed: $ % : ^ - ~ ` , ? “ ” ‘ ’ { } [ ] \ + = Example: "PAWS" - `AccessToken` (string, required) A security credential used to authenticate API requests and all i4Go® authorizeClient/preauthorizeClient requests. An Access Token is the alias for the merchant account and interface being used. The Access Token is required in all requests except an Access Token Exchange request, which generates an Access Token using an and . Example: "EA79FB05-3AA7-4500-AF9A-73F986FF2C1D" ## Request fields (application/json): - `amount` (object, required) - `amount.tax` (number, required) The amount of sales tax charged for a transaction. The tax amount is used by businesses to track tax expenses for accounting purposes. Identifying the tax amount also helps consumers understand the total amount that they were billed. This field is part of Level 2 card data. - `amount.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. - `currencyCode` (string, required) Transaction currency code. See the [Currency Codes](/guides/appendices/currency-codes) section for details. - `customer` (object, required) - `customer.addressLine1` (string, required) Cardholder’s street address exactly as it appears on their billing statement. This field is used in AVS. - `customer.city` (string, required) Customer address city. - `customer.country` (string, required) 2 character ISO Country Code. See the [ISO](https://www.iso.org/obp/ui/#search/code/) website for details. - `customer.emailAddress` (string, required) Customer email address. - `customer.firstName` (string, required) Specifies a consumer’s first name. This field is used in AVS. If the interface sends this field, the value specified by the interface will be returned in the response, unless the API Option [USECARDNAME](/guides/appendices/api-options#usecardname) is included in the request and a Commerce Engine or UTG-controlled PIN pad is in use. If the interface does not send the object, the consumer's name will be returned in the object if the name is present in the card's EMV or track data. - `customer.lastName` (string, required) Specifies a consumer’s last name. This field is used in AVS. If the interface sends this field, the value specified by the interface will be returned in the response, unless the API Option [USECARDNAME](/guides/appendices/api-options#usecardname) is included in the request and a Commerce Engine or UTG-controlled PIN pad is in use. If the interface does not send the object, the consumer's name will be returned in the object if the name is present in the card's EMV or track data. - `customer.ipAddress` (string, required) Public source IP Address where the request originates, not the IP Address of the web server. - `customer.phoneNumber` (string, required) Customer phone number - `customer.phoneCountry` (string, required) Country calling code of the phone number. Required when sending . - `customer.region` (string, required) A level 2 country subdivision code according to ISO-3166-2. - `customer.externalId` (string, required) Your external identifier for the Customer - `customer.enrollDate` (string, required) Date of the user's first transaction in your system, regardless of payment method used. The date and time must be passed in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm) - `dateTime` (string, 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 - `sourceIp` (string, required) Public source IP Address where the request originates, not the IP Address of the web server. - `transaction` (object, required) - `transaction.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. - `transaction.vendorReference` (string, required) Optional field for information that can be searched in the merchant portal. - `transaction.ota` (object) - `transaction.ota.changeGuest` (string, required) Whether the guest (the person being served) is able to be changed. Fraudsters tend to pay for services that can change the guest. Enum: "Y", "N" - `transaction.ota.serviceEndDate` (string, required) OTA service end date in YYYY-MM-DD format. A consumer booking a service such as a hotel for too many days elevates risk. - `transaction.ota.serviceStartDate` (string, required) OTA service start date in YYYY-MM-DD format. A service start date that is very close to the transaction date elevates risk. - `transaction.ota.startCity` (string, required) OTA start city. - `transaction.ota.startCountry` (string, required) OTA start country in ISO 3166 Alpha-2 format.; for example, country where bus ticket was purchased. - `transaction.ota.startZipCode` (string, required) OTA start zip code. - `transaction.ota.type` (array, required) OTA transaction type array. Enum: "hotel", "trainticket", "ferry", "bus", "multimodal", "airline", "cruise", "carrental" ## Response 200 fields (application/json): - `result` (array) - `result.amount` (object, required) - `result.amount.tax` (number, required) The amount of sales tax charged for a transaction. The tax amount is used by businesses to track tax expenses for accounting purposes. Identifying the tax amount also helps consumers understand the total amount that they were billed. This field is part of Level 2 card data. - `result.amount.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. - `result.dateTime` (string, 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 - `result.payPal` (object, required) - `result.payPal.clientToken` (string, required) A Base64 encoded string used to initialize client SDKs. - `result.payPal.clientMetaDataId` (string) Identifier for completing risk check. Returned if is sent in the request. - `result.server` (object, required) - `result.server.name` (string, required) The name of the server that processed the request. - `result.transaction` (object, required) - `result.transaction.authSource` (string, 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) Enum: "E", "O", "A", "F" - `result.transaction.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. - `result.transaction.vendorReference` (string) Optional field for information that can be searched in the merchant portal.