paypal.orders
Module paypal.orders
API
Definitions

ballerinax/paypal.orders Ballerina library
Overview
PayPal is a global online payment platform enabling individuals and businesses to securely send and receive money, process transactions, and access merchant services across multiple currencies.
The ballerinax/paypal.orders
package provides a Ballerina connector for interacting with the PayPal Orders API v2, allowing you to create, capture, authorize, and manage orders in your Ballerina applications.
Setup guide
To use the PayPal Orders connector, you must have access to a PayPal Developer account.
Step 1: Create a business account
-
Open the PayPal Developer Dashboard.
-
Click on "Sandbox Accounts" under "Testing Tools".
-
Create a Business account
Note: Some PayPal options and features may vary by region or country; check availability before creating an account.
Step 2: Create a REST API app
-
Navigate to the "Apps and Credentials" tab and create a new merchant app.
Provide a name for the application and select the Business account you created earlier.
Step 3: Obtain Client ID and Client Secret
-
After creating your new app, you will see your Client ID and Client Secret. Make sure to copy and securely store these credentials.
Quickstart
To use the paypal.orders
connector in your Ballerina application, update the .bal
file as follows:
Step 1: Import the module
Import the paypal.orders
module.
import ballerinax/paypal.orders as paypal;
Step 2: Instantiate a new connector
- Create a
Config.toml
file and configure the obtained credentials in the above steps as follows:
clientId = "<test-client-id>" clientSecret = "<test-client-secret>" serviceUrl = "<paypal-service-url>" tokenUrl = "<paypal-token-url>"
- Create a
paypal:ConnectionConfig
with the obtained credentials and initialize the connector with it.
configurable string clientId = ?; configurable string clientSecret = ?; configurable string serviceUrl = ?; configurable string tokenUrl = ?;
final paypal:Client paypal = check new ({ auth: { clientId, clientSecret, tokenUrl } }, serviceUrl);
Step 3: Invoke the connector operation
Now, utilize the available connector operations.
Create an order
public function main() returns error? { paypal:Order response = check paypal->/orders.post({ intent: "CAPTURE", purchase_units: [{ amount: { currency_code: "USD", value: "100.00" } }] }); }
Step 4: Run the Ballerina application
bal run
Examples
The PayPal Orders
connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
-
Order lifecycle: Process a complete PayPal order from creation and updates through confirming and capturing payments.
-
Manage shipping: Enrich an order with shipping details, add or update tracking information, and push shipment updates back to PayPal.
Clients
paypal.orders: Client
An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders.
Constructor
Gets invoked to initialize the connector
.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api-m.sandbox.paypal.com/v2/checkout" - URL of the target service
post orders
function post orders(OrderRequest payload, OrdersCreateHeaders headers) returns Order|error
Create order
Parameters
- payload OrderRequest -
- headers OrdersCreateHeaders (default {}) - Headers to be sent with the request
Return Type
get orders/[string id]
function get orders/[string id](map<string|string[]> headers, *OrdersGetQueries queries) returns Order|error
Show order details
Parameters
- queries *OrdersGetQueries - Queries to be sent with the request
Return Type
patch orders/[string id]
function patch orders/[string id](PatchRequest payload, map<string|string[]> headers) returns error?
Update order
Parameters
- payload PatchRequest -
Return Type
- error? - A successful request returns the HTTP
204 No Content
status code with an empty object in the JSON response body
post orders/[string id]/confirm-payment-source
function post orders/[string id]/confirm\-payment\-source(ConfirmOrderRequest payload, OrdersConfirmHeaders headers) returns Order|error
Confirm the Order
Parameters
- payload ConfirmOrderRequest -
- headers OrdersConfirmHeaders (default {}) - Headers to be sent with the request
Return Type
post orders/[string id]/authorize
function post orders/[string id]/authorize(OrderAuthorizeRequest payload, OrdersAuthorizeHeaders headers) returns OrderAuthorizeResponse|error
Authorize payment for order
Parameters
- payload OrderAuthorizeRequest -
- headers OrdersAuthorizeHeaders (default {}) - Headers to be sent with the request
Return Type
- OrderAuthorizeResponse|error - A successful response to an idempotent request returns the HTTP
200 OK
status code with a JSON response body that shows authorized payment details
post orders/[string id]/capture
function post orders/[string id]/capture(OrderCaptureRequest payload, OrdersCaptureHeaders headers) returns Order|error
Capture payment for order
Parameters
- payload OrderCaptureRequest -
- headers OrdersCaptureHeaders (default {}) - Headers to be sent with the request
Return Type
post orders/[string id]/track
function post orders/[string id]/track(OrderTrackerRequest payload, OrdersTrackCreateHeaders headers) returns Order|error
Add tracking information for an Order.
Parameters
- payload OrderTrackerRequest -
- headers OrdersTrackCreateHeaders (default {}) - Headers to be sent with the request
Return Type
patch orders/[string id]/trackers/[string trackerId]
function patch orders/[string id]/trackers/[string trackerId](PatchRequest payload, map<string|string[]> headers) returns error?
Update or cancel tracking information for a PayPal order
Parameters
- payload PatchRequest -
Return Type
- error? - A successful request returns the HTTP
204 No Content
status code with an empty object in the JSON response body
Records
paypal.orders: ActivityTimestamps
The date and time stamps that are common to authorized payment, captured payment, and refund transactions
Fields
- update_time? DateTime -
- create_time? DateTime -
paypal.orders: AddressDetails
The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.
For example, address_portable.address_line_1
is usually a combination of address_details.street_number
, street_name
, and street_type
Fields
- building_name? string - A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, <code>Craven House</code>
- street_number? string - The street number
- street_type? string - The street type. For example, avenue, boulevard, road, or expressway
- sub_building? string - The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment
- delivery_service? string - The delivery service. Post office box, bag number, or post office name
- street_name? string - The street name. Just
Drury
inDrury Lane
paypal.orders: AddressDetails1
The non-portable additional address details include fine-grain address information for Compliance, Risk, and other scenarios. This isn't portable with common third-party and open source applications. This can include data that is redundant with core fields. For example, address_portable.address_line_1
is usually a combination of address_details.street_number
, street_name
, and street_type
Fields
- building_name? string - A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, <code>Craven House</code>
- street_number? string - The street number
- street_type? string - The street type. For example, avenue, boulevard, road, or expressway
- sub_building? string - The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment
- delivery_service? string - The delivery service. Post office box, bag number, or post office name
- street_name? string - The street name. Just
Drury
inDrury Lane
paypal.orders: AddressPortable
The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
Fields
- country_code CountryCode -
- admin_area_1? string - The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example,
CA
and notCalifornia
. Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.</li><li>Japan. A prefecture.</li><li>Switzerland. A kanton.</li></ul>
- address_line_1? string - The first line of the address. For example, number or street. For example,
173 Drury Lane
. Required for data entry and compliance and risk checks. Must contain the full address
- admin_area_3? string - A sub-locality, suburb, neighborhood, or district. Smaller than
admin_area_level_2
. Value is:<ul><li>Brazil. Suburb, bairro, or neighborhood.</li><li>India. Sub-locality or district. Street name information is not always available but a sub-locality or district can be a very small area.</li></ul>
- address_details? AddressDetails -
- admin_area_2? string - A city, town, or village. Smaller than
admin_area_level_1
- address_line_3? string - The third line of the address, if needed. For example, a street complement for Brazil, direction text, such as
next to Walmart
, or a landmark in an Indian address
- address_line_2? string - The second line of the address. For example, suite or apartment number
- admin_area_4? string - The neighborhood, ward, or district. Smaller than
admin_area_level_3
orsub_locality
. Value is:<ul><li>The postal sorting code for Guernsey and many French territories, such as French Guiana.</li><li>The fine-grained administrative levels in China.</li></ul>
- postal_code? string - The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See postal code
paypal.orders: AddressPortable2
The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
Fields
- country_code CountryCode2 -
- admin_area_1? string - The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example,
CA
and notCalifornia
. Value, by country, is:<ul><li>UK. A county.</li><li>US. A state.</li><li>Canada. A province.</li><li>Japan. A prefecture.</li><li>Switzerland. A kanton.</li></ul>
- address_line_1? string - The first line of the address, such as number and street, for example,
173 Drury Lane
. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address
- admin_area_3? string - The sub-locality, suburb, neighborhood, or district. This is smaller than
admin_area_level_2
. Value is:<ul><li>Brazil. Suburb, bairro, or neighborhood.</li><li>India. Sub-locality or district. Street name information isn't always available, but a sub-locality or district can be a very small area.</li></ul>
- address_details? AddressDetails1 -
- admin_area_2? string - A city, town, or village. Smaller than
admin_area_level_1
- address_line_3? string - The third line of the address, if needed. Examples include a street complement for Brazil, direction text, such as
next to Walmart
, or a landmark in an Indian address
- address_line_2? string - The second line of the address, for example, a suite or apartment number
- admin_area_4? string - The neighborhood, ward, or district. This is smaller than
admin_area_level_3
orsub_locality
. Value is:<ul><li>The postal sorting code that is used in Guernsey and many French territories, such as French Guiana.</li><li>The fine-grained administrative levels in China.</li></ul>
- postal_code? string - The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See postal code
paypal.orders: AmountBreakdown
The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any
Fields
- insurance? Money - The currency and amount for a financial transaction, such as a balance or payment due
- tax_total? Money -
- shipping? Money - The currency and amount for a financial transaction, such as a balance or payment due
- shipping_discount? Money -
- discount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- item_total? Money -
- handling? Money - The currency and amount for a financial transaction, such as a balance or payment due
paypal.orders: AmountWithBreakdown
The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify amount.breakdown
, the amount equals item_total
plus tax_total
plus shipping
plus handling
plus insurance
minus shipping_discount
minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes
Fields
- Fields Included from *Money
- value string
- currency_code CurrencyCode
- anydata...
- Fields Included from *AmountWithBreakdownAllOf2
- breakdown AmountBreakdown
- anydata...
paypal.orders: AmountWithBreakdownAllOf2
Fields
- breakdown? AmountBreakdown - The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any
paypal.orders: ApplePayDecryptedTokenData
Information about the Payment data obtained by decrypting Apple Pay token
Fields
- transaction_amount? Money -
- tokenized_card Card -
- payment_data? ApplePayPaymentData -
- device_manufacturer_id? string - Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party and supports Unicode
- payment_data_type? "3DSECURE"|"EMV" - Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV
paypal.orders: ApplePayPaymentData
Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator
Fields
- pin? string - Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode
- emv_data? string - Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode
- eci_indicator? string - ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode
- cryptogram? string - Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode
paypal.orders: ApplePayRequest
Information needed to pay using ApplePay
Fields
- email_address? EmailAddress -
- decrypted_token? ApplePayDecryptedTokenData -
- stored_credential? CardStoredCredential -
- name? FullName - The full name representation like Mr J Smith
- phone_number? Phone -
- attributes? ApplePayAttributes -
- id? string - ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode
- vault_id? VaultId -
paypal.orders: AuthenticationResponse
Results of Authentication such as 3D Secure
Fields
- authentication_flow? AuthenticationFlow -
- liability_shift? LiabilityShift -
- exemption_details? ExemptionDetails -
- three_d_secure? ThreeDSecureAuthenticationResponse -
paypal.orders: Authorization
The authorized payment transaction
Fields
- Fields Included from *AuthorizationStatus
- status_details AuthorizationStatusDetails
- status "CREATED"|"CAPTURED"|"DENIED"|"PARTIALLY_CAPTURED"|"VOIDED"|"PENDING"
- anydata...
- Fields Included from *AuthorizationAllOf2
- id string
- amount Money
- invoice_id string
- custom_id string
- network_transaction_reference NetworkTransactionReference
- seller_protection SellerProtection
- expiration_time DateTime
- links LinkDescription[]
- anydata...
- Fields Included from *ActivityTimestamps
paypal.orders: AuthorizationAllOf2
Fields
- id? string - The PayPal-generated ID for the authorized payment.
- amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- invoice_id? string - The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
- custom_id? string - The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
- network_transaction_reference? NetworkTransactionReference - Reference values used by the card network to identify a transaction
- seller_protection? SellerProtection - The level of protection offered as defined by PayPal Seller Protection for Merchants
- expiration_time? DateTime - The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>
- links? LinkDescription[] - An array of related HATEOAS links.
paypal.orders: AuthorizationStatus
The status fields for an authorized payment
Fields
- status_details? AuthorizationStatusDetails -
- status? "CREATED"|"CAPTURED"|"DENIED"|"PARTIALLY_CAPTURED"|"VOIDED"|"PENDING" - The status for the authorized payment
paypal.orders: AuthorizationStatusDetails
The details of the authorized payment status
Fields
- reason? "PENDING_REVIEW" - The reason why the authorized status is
PENDING
paypal.orders: AuthorizationWithAdditionalData
The authorization with additional payment details, such as risk assessment and processor response. These details are populated only for certain payment methods
Fields
- Fields Included from *Authorization
- status_details AuthorizationStatusDetails
- status "CREATED"|"CAPTURED"|"DENIED"|"PARTIALLY_CAPTURED"|"VOIDED"|"PENDING"
- id string
- amount Money
- invoice_id string
- custom_id string
- network_transaction_reference NetworkTransactionReference
- seller_protection SellerProtection
- expiration_time DateTime
- links LinkDescription[]
- update_time DateTime
- create_time DateTime
- anydata...
- Fields Included from *AuthorizationWithAdditionalDataAllOf2
- processor_response ProcessorResponse
- anydata...
paypal.orders: AuthorizationWithAdditionalDataAllOf2
Fields
- processor_response? ProcessorResponse - The processor response information for payment requests, such as direct credit card transactions
paypal.orders: Bancontact
Information used to pay Bancontact
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- attributes? AltpayRecurringAttributes -
- card_last_digits? string - The last digits of the card used to fund the Bancontact payment
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
- iban_last_chars? IbanLastChars -
paypal.orders: BancontactRequest
Information needed to pay using Bancontact
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
- attributes? AltpayRecurringAttributesRequest -
paypal.orders: BinDetails
Bank Identification Number (BIN) details used to fund a payment
Fields
- bin? string - The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card
- bin_country_code? CountryCode -
- issuing_bank? string - The issuer of the card instrument
- products? BinDetailsProductsItemsString[] - The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE
paypal.orders: Blik
Information used to pay using BLIK
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- one_click? BlikOneClickResponse -
- email? EmailAddress - The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>
paypal.orders: BlikExperienceContext
Customizes the payer experience during the approval process for the BLIK payment
Fields
- Fields Included from *ExperienceContextBase
- Fields Included from *BlikExperienceContextAllOf2
paypal.orders: BlikExperienceContextAllOf2
Fields
- consumer_ip? IpAddress - An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses
- consumer_user_agent? string - The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).
paypal.orders: BlikOneClick
Information used to pay using BLIK one-click flow
Fields
- consumer_reference string - The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant
- alias_key? string - A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference
- alias_label? string - A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts
- auth_code? string - The 6-digit code used to authenticate a consumer within BLIK
paypal.orders: BlikOneClickResponse
Information used to pay using BLIK one-click flow
Fields
- consumer_reference? string - The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant
paypal.orders: BlikRequest
Information needed to pay using BLIK
Fields
- experience_context? BlikExperienceContext -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
- one_click? BlikOneClick -
- level_0? BlikSeamless -
- email? EmailAddress - The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>
paypal.orders: BlikSeamless
Information used to pay using BLIK level_0 flow
Fields
- auth_code string - The 6-digit code used to authenticate a consumer within BLIK
paypal.orders: Capture
A captured payment
Fields
- Fields Included from *CaptureStatus
- status_details CaptureStatusDetails
- status "COMPLETED"|"DECLINED"|"PARTIALLY_REFUNDED"|"PENDING"|"REFUNDED"|"FAILED"
- anydata...
- Fields Included from *CaptureAllOf2
- id string
- amount Money
- invoice_id string
- custom_id string
- network_transaction_reference NetworkTransactionReference
- seller_protection SellerProtection
- final_capture boolean
- seller_receivable_breakdown SellerReceivableBreakdown
- disbursement_mode DisbursementMode
- links LinkDescription[]
- processor_response ProcessorResponse
- anydata...
- Fields Included from *ActivityTimestamps
paypal.orders: CaptureAllOf2
Fields
- id? string - The PayPal-generated ID for the captured payment.
- amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- invoice_id? string - The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
- custom_id? string - The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
- network_transaction_reference? NetworkTransactionReference - Reference values used by the card network to identify a transaction
- seller_protection? SellerProtection - The level of protection offered as defined by PayPal Seller Protection for Merchants
- final_capture boolean(default false) - Indicates whether you can make additional captures against the authorized payment. Set to
true
if you do not intend to capture additional payments against the authorization. Set tofalse
if you intend to capture additional payments against the authorization.
- seller_receivable_breakdown? SellerReceivableBreakdown - The detailed breakdown of the capture activity. This is not available for transactions that are in pending state
- disbursement_mode? DisbursementMode - The funds that are held on behalf of the merchant
- links? LinkDescription[] - An array of related HATEOAS links.
- processor_response? ProcessorResponse - The processor response information for payment requests, such as direct credit card transactions
paypal.orders: CaptureStatus
The status of a captured payment
Fields
- status_details? CaptureStatusDetails -
- status? "COMPLETED"|"DECLINED"|"PARTIALLY_REFUNDED"|"PENDING"|"REFUNDED"|"FAILED" - The status of the captured payment
paypal.orders: CaptureStatusDetails
The details of the captured payment status
Fields
- reason? "BUYER_COMPLAINT"|"CHARGEBACK"|"ECHECK"|"INTERNATIONAL_WITHDRAWAL"|"OTHER"|"PENDING_REVIEW"|"RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION"|"REFUNDED"|"TRANSACTION_APPROVED_AWAITING_FUNDING"|"UNILATERAL"|"VERIFICATION_REQUIRED" - The reason why the captured payment status is
PENDING
orDENIED
paypal.orders: Card
The payment card to use to fund a payment. Can be a credit or debit card
Fields
- number? string - The primary account number (PAN) for the payment card
- security_code? string - The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when
payment_initiator=MERCHANT
- name? string - The card holder's name as it appears on the card
- billing_address? AddressPortable -
- attributes? CardAttributes - Additional attributes associated with the use of this card
- id? InstrumentId - The identifier of the instrument
- expiry? DateYearMonth - The year and month, in ISO-8601
YYYY-MM
date format. See Internet date and time format
- card_type? CardBrand -
- 'type? CardType - Type of card. i.e Credit, Debit and so on
- last_digits? string - The last digits of the payment card
- brand? CardBrand - The card network or brand. Applies to credit, debit, gift, and payment cards
paypal.orders: CardAttributes
Additional attributes associated with the use of this card
Fields
- vault? VaultInstructionBase - Basic vault instruction specification that can be extended by specific payment sources that supports vaulting
- customer? Customer - The details about a customer in PayPal's system of record
paypal.orders: CardAttributesResponse
Additional attributes associated with the use of this card
Fields
- vault? VaultResponse - The details about a saved payment source
paypal.orders: CardExperienceContext
Customizes the payer experience during the 3DS Approval for payment
Fields
- return_url? Url -
- cancel_url? Url -
paypal.orders: CardFromRequest
Representation of card details as received in the request
Fields
- expiry? DateYearMonth - The year and month, in ISO-8601
YYYY-MM
date format. See Internet date and time format
- last_digits? string - The last digits of the payment card
paypal.orders: CardRequest
The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide.
Fields
- Fields Included from *Card
- number string
- security_code string
- name string
- billing_address AddressPortable
- attributes CardAttributes
- id InstrumentId
- expiry DateYearMonth
- card_type CardBrand
- type CardType
- last_digits string
- brand CardBrand
- anydata...
- Fields Included from *CardRequestAllOf2
- vault_id VaultId
- stored_credential CardStoredCredential
- network_token NetworkTokenRequest
- experience_context CardExperienceContext
- anydata...
paypal.orders: CardRequestAllOf2
Fields
- vault_id? VaultId - The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions
- stored_credential? CardStoredCredential - Provides additional details to process a payment using a
card
that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).<br/>Parameter compatibility:<br/><ul><li>payment_type=ONE_TIME
is compatible only withpayment_initiator=CUSTOMER
.</li><li>usage=FIRST
is compatible only withpayment_initiator=CUSTOMER
.</li><li>previous_transaction_reference
orprevious_network_transaction_reference
is compatible only withpayment_initiator=MERCHANT
.</li><li>Only one of the parameters -previous_transaction_reference
andprevious_network_transaction_reference
- can be present in the request.</li></ul>
- network_token? NetworkTokenRequest - The Third Party Network token used to fund a payment
- experience_context? CardExperienceContext - Customizes the payer experience during the 3DS Approval for payment
paypal.orders: CardResponse
The payment card to use to fund a payment. Card can be a credit or debit card
Fields
- from_request? CardFromRequest -
- authentication_result? AuthenticationResponse -
- bin_details? BinDetails -
- name? string - The card holder's name as it appears on the card
- available_networks? CardBrand[] - Array of brands or networks associated with the card
- attributes? CardAttributesResponse - Additional attributes associated with the use of this card
- expiry? DateYearMonth - The year and month, in ISO-8601
YYYY-MM
date format. See Internet date and time format
- 'type? "CREDIT"|"DEBIT"|"PREPAID"|"UNKNOWN" - The payment card type
- last_digits? string - The last digits of the payment card
- brand? CardBrand - The card network or brand. Applies to credit, debit, gift, and payment cards
paypal.orders: CardStoredCredential
Provides additional details to process a payment using a card
that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
payment_type=ONE_TIME
is compatible only withpayment_initiator=CUSTOMER
.usage=FIRST
is compatible only withpayment_initiator=CUSTOMER
.previous_transaction_reference
orprevious_network_transaction_reference
is compatible only withpayment_initiator=MERCHANT
.- Only one of the parameters -
previous_transaction_reference
andprevious_network_transaction_reference
- can be present in the request.
Fields
- payment_type StoredPaymentSourcePaymentType -
- usage? StoredPaymentSourceUsageType - Indicates if this is a
first
orsubsequent
payment using a stored payment source (also referred to as stored credential or card on file)
- payment_initiator PaymentInitiator -
- previous_network_transaction_reference? NetworkTransactionReference -
paypal.orders: CardSupplementaryData
Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout
Fields
- level_3? Level3CardProcessingData -
- level_2? Level2CardProcessingData -
paypal.orders: CobrandedCard
Details about the merchant cobranded card used for order purchase
Fields
- payee? PayeeBase - The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee
- amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- labels? CobrandedCardLabelsItemsString[] - Array of labels for the cobranded card
paypal.orders: ConfirmOrderRequest
Payer confirms the intent to pay for the Order using the provided payment source
Fields
- payment_source PaymentSource - The payment source definition
- processing_instruction? ProcessingInstruction - The instruction to process an order
- application_context? OrderConfirmApplicationContext - Customizes the payer confirmation experience
paypal.orders: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth OAuth2ClientCredentialsGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nil
values are treated as optional, and absent fields are handled asnilable
types. Enabled by default.
paypal.orders: Customer
The details about a customer in PayPal's system of record
Fields
- email_address? Email -
- phone? PhoneWithType - The phone information
- id? MerchantPartnerCustomerId - The unique ID for a customer generated by PayPal
paypal.orders: Eps
Information used to pay using eps
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
paypal.orders: EpsRequest
Information needed to pay using eps
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
paypal.orders: ExchangeRate
The exchange rate that determines the amount to convert from one currency to another currency
Fields
- source_currency? CurrencyCode -
- target_currency? CurrencyCode -
- value? string - The target currency amount. Equivalent to one unit of the source currency. Formatted as integer or decimal value with one to 15 digits to the right of the decimal point
paypal.orders: ExperienceContextBase
Customizes the payer experience during the approval process for the payment
Fields
- return_url? Url -
- brand_name? string - The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode
- locale? Language - The language tag for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the ISO 639-2 language code, the optional ISO-15924 script tag, and the ISO-3166 alpha-2 country code or M49 region code
- cancel_url? Url -
- shipping_preference "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" (default "GET_FROM_FILE") - The location from which the shipping address is derived
paypal.orders: Giropay
Information needed to pay using giropay
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
paypal.orders: GiropayRequest
Information needed to pay using giropay
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
paypal.orders: Ideal
Information used to pay using iDEAL
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- attributes? AltpayRecurringAttributes -
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
- iban_last_chars? IbanLastChars -
paypal.orders: IdealRequest
Information needed to pay using iDEAL
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
- attributes? AltpayRecurringAttributesRequest -
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
paypal.orders: Item
The details for the items to be purchased
Fields
- quantity string - The item quantity. Must be a whole number
- name string - The item name or title
- description? string - The detailed item description
- tax? Money - The currency and amount for a financial transaction, such as a balance or payment due
- unit_amount Money -
- sku? string - The stock keeping unit (SKU) for the item
- category? "DIGITAL_GOODS"|"PHYSICAL_GOODS"|"DONATION" - The item category type
paypal.orders: Level2CardProcessingData
The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business
Fields
- tax_total? Money -
- invoice_id? string - Use this field to pass a purchase identification value of up to 12 ASCII characters for AIB and 17 ASCII characters for all other processors
paypal.orders: Level3CardProcessingData
The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business
Fields
- shipping_amount? Money -
- duty_amount? Money -
- ships_from_postal_code? string - Use this field to specify the postal code of the shipping location
- discount_amount? Money -
- shipping_address? AddressPortable -
- line_items? LineItem[] - A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf
paypal.orders: LineItem
The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf
Fields
- Fields Included from *Item
- Fields Included from *LineItemAllOf2
paypal.orders: LineItemAllOf2
Fields
- commodity_code? string - Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used.
- discount_amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- total_amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- unit_of_measure? string - Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK).
paypal.orders: LinkDescription
The request-related HATEOAS link information
Fields
- method? "GET"|"POST"|"PUT"|"DELETE"|"HEAD"|"CONNECT"|"OPTIONS"|"PATCH" - The HTTP method required to make the related call
- rel string - The link relation type, which serves as an ID for a link that unambiguously describes the semantics of the link. See Link Relations
- href string - The complete target URL. To make the related call, combine the method with this URI Template-formatted link. For pre-processing, include the
$
,(
, and)
characters. Thehref
is the key HATEOAS component that links a completed call with a subsequent call
paypal.orders: MerchantPayableBreakdown
The breakdown of the refund
Fields
- platform_fees? PlatformFee[] - An array of platform or partner fees, commissions, or brokerage fees for the refund
- net_amount_in_receivable_currency? Money -
- total_refunded_amount? Money -
- paypal_fee? Money -
- gross_amount? Money -
- paypal_fee_in_receivable_currency? Money -
- net_amount? Money -
- net_amount_breakdown? NetAmountBreakdownItem[] - An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds
paypal.orders: Money
The currency and amount for a financial transaction, such as a balance or payment due
Fields
- value string - The value, which might be:<ul><li>An integer for currencies like
JPY
that are not typically fractional.</li><li>A decimal fraction for currencies likeTND
that are subdivided into thousandths.</li></ul>For the required number of decimal places for a currency code, see Currency Codes
- currency_code CurrencyCode -
paypal.orders: Mybank
Information used to pay using MyBank
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
- iban_last_chars? IbanLastChars -
paypal.orders: MybankRequest
Information needed to pay using MyBank
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
paypal.orders: Name
The name of the party
Fields
- full_name? string - When the party is a person, the party's full name
- prefix? string - The prefix, or title, to the party's name
- surname? string - When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname
- given_name? string - When the party is a person, the party's given, or first, name
- middle_name? string - When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name
- suffix? string - The suffix for the party's name
- alternate_full_name? string - DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business
paypal.orders: Name2
The name of the party
Fields
- full_name? string - When the party is a person, the party's full name
- prefix? string - The prefix, or title, to the party's name
- surname? string - When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname
- given_name? string - When the party is a person, the party's given, or first, name
- middle_name? string - When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name
- suffix? string - The suffix for the party's name
paypal.orders: NetAmountBreakdownItem
The net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the merchant holds their funds
Fields
- exchange_rate? ExchangeRate -
- converted_amount? Money -
- payable_amount? Money -
paypal.orders: NetworkTokenRequest
The Third Party Network token used to fund a payment
Fields
- number string - Third party network token number
- eci_flag? EciFlag -
- expiry DateYearMonth - The year and month, in ISO-8601
YYYY-MM
date format. See Internet date and time format
- token_requestor_id? string - A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud
- cryptogram? string - An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions
paypal.orders: NetworkTransactionReference
Reference values used by the card network to identify a transaction
Fields
- date? string - The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date
- acquirer_reference_number? string - Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks
- id string - Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -
- network? CardBrand - The card network or brand. Applies to credit, debit, gift, and payment cards
paypal.orders: OAuth2ClientCredentialsGrantConfig
OAuth2 Client Credentials Grant Configs
Fields
- tokenUrl string(default "https://api-m.sandbox.paypal.com/v1/oauth2/token") - Token URL
paypal.orders: Order
The order details
Fields
- Fields Included from *ActivityTimestamps
- Fields Included from *OrderAllOf2
- id string
- payment_source PaymentSourceResponse
- intent CheckoutPaymentIntent
- processing_instruction ProcessingInstruction
- payer Payer
- purchase_units PurchaseUnit[]
- status OrderStatus
- links LinkDescription[]
- anydata...
paypal.orders: OrderAllOf2
Fields
- id? string - The ID of the order.
- payment_source? PaymentSourceResponse - The payment source used to fund the payment
- intent? CheckoutPaymentIntent - The intent to either capture payment immediately or authorize a payment for an order after order creation
- processing_instruction? ProcessingInstruction - The instruction to process an order
- payer? Payer - The customer who approves and pays for the order. The customer is also known as the payer
- purchase_units? PurchaseUnit[] - An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
- status? OrderStatus - The order status
- links? LinkDescription[] - An array of request-related HATEOAS links. To complete payer approval, use the
approve
link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you includeapplication_context.return_url
is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment.
paypal.orders: OrderApplicationContext
Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configurebrand_name
andshipping_preference
during partner account setup, which overrides the request values.
Fields
- user_action "CONTINUE"|"PAY_NOW" (default "CONTINUE") - DEPRECATED. Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow. The fields in
application_context
are now available in theexperience_context
object under thepayment_source
which supports them (eg.payment_source.paypal.experience_context.user_action
). Please specify this field in theexperience_context
object instead of theapplication_context
object
- landing_page "LOGIN"|"BILLING"|"NO_PREFERENCE" (default "NO_PREFERENCE") - DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in
application_context
are now available in theexperience_context
object under thepayment_source
which supports them (eg.payment_source.paypal.experience_context.landing_page
). Please specify this field in theexperience_context
object instead of theapplication_context
object
- return_url? string - DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in
application_context
are now available in theexperience_context
object under thepayment_source
which supports them (eg.payment_source.paypal.experience_context.return_url
). Please specify this field in theexperience_context
object instead of theapplication_context
object
- brand_name? string - DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in
application_context
are now available in theexperience_context
object under thepayment_source
which supports them (eg.payment_source.paypal.experience_context.brand_name
). Please specify this field in theexperience_context
object instead of theapplication_context
object
- locale? Language - The language tag for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the ISO 639-2 language code, the optional ISO-15924 script tag, and the ISO-3166 alpha-2 country code or M49 region code
- cancel_url? string - DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in
application_context
are now available in theexperience_context
object under thepayment_source
which supports them (eg.payment_source.paypal.experience_context.cancel_url
). Please specify this field in theexperience_context
object instead of theapplication_context
object
- stored_payment_source? StoredPaymentSource -
- shipping_preference "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" (default "GET_FROM_FILE") - DEPRECATED. DEPRECATED. The shipping preference:<ul><li>Displays the shipping address to the customer.</li><li>Enables the customer to choose an address on the PayPal site.</li><li>Restricts the customer from changing the address during the payment-approval process.</li></ul>. The fields in
application_context
are now available in theexperience_context
object under thepayment_source
which supports them (eg.payment_source.paypal.experience_context.shipping_preference
). Please specify this field in theexperience_context
object instead of theapplication_context
object
- payment_method? PaymentMethod -
paypal.orders: OrderAuthorizeRequest
The authorization of an order request
Fields
- payment_source? PaymentSource -
paypal.orders: OrderAuthorizeResponse
The order authorize response
Fields
- Fields Included from *ActivityTimestamps
- Fields Included from *OrderAuthorizeResponseAllOf2
- id string
- payment_source PaymentSourceResponse
- intent CheckoutPaymentIntent
- processing_instruction ProcessingInstruction
- payer Payer
- purchase_units PurchaseUnit[]
- status OrderStatus
- links LinkDescription[]
- anydata...
paypal.orders: OrderAuthorizeResponseAllOf2
Fields
- id? string - The ID of the order.
- payment_source? PaymentSourceResponse - The payment source used to fund the payment
- intent? CheckoutPaymentIntent - The intent to either capture payment immediately or authorize a payment for an order after order creation
- processing_instruction? ProcessingInstruction - The instruction to process an order
- payer? Payer - The customer who approves and pays for the order. The customer is also known as the payer
- purchase_units? PurchaseUnit[] - An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
- status? OrderStatus - The order status
- links? LinkDescription[] - An array of request-related HATEOAS links. To complete payer approval, use the
approve
link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you includeapplication_context.return_url
is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment.
paypal.orders: OrderCaptureRequest
Completes an capture payment for an order
Fields
- payment_source? PaymentSource -
paypal.orders: OrderConfirmApplicationContext
Customizes the payer confirmation experience
Fields
- return_url? string - The URL where the customer is redirected after the customer approves the payment
- brand_name? string - Label to present to your payer as part of the PayPal hosted web experience
- locale? Language - The language tag for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the ISO 639-2 language code, the optional ISO-15924 script tag, and the ISO-3166 alpha-2 country code or M49 region code
- cancel_url? string - The URL where the customer is redirected after the customer cancels the payment
- stored_payment_source? StoredPaymentSource -
paypal.orders: OrderRequest
The order request details
Fields
- application_context? OrderApplicationContext -
- purchase_units PurchaseUnitRequest[] - An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee
- payment_source? PaymentSource -
- intent CheckoutPaymentIntent - The intent to either capture payment immediately or authorize a payment for an order after order creation
- payer? Payer - The customer who approves and pays for the order. The customer is also known as the payer
paypal.orders: OrdersAuthorizeHeaders
Represents the Headers record for the operation: orders.authorize
Fields
- PayPal\-Request\-Id? string - The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager
- PayPal\-Auth\-Assertion? string - An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>
- Prefer string(default "return=representation") - The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>
- PayPal\-Client\-Metadata\-Id? string -
paypal.orders: OrdersCaptureHeaders
Represents the Headers record for the operation: orders.capture
Fields
- PayPal\-Request\-Id? string - The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager
- PayPal\-Auth\-Assertion? string - An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>
- Prefer string(default "return=representation") - The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>
- PayPal\-Client\-Metadata\-Id? string -
paypal.orders: OrdersConfirmHeaders
Represents the Headers record for the operation: orders.confirm
Fields
- PayPal\-Client\-Metadata\-Id? string -
- Prefer string(default "return=representation") - The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>
paypal.orders: OrdersCreateHeaders
Represents the Headers record for the operation: orders.create
Fields
- PayPal\-Request\-Id? string - The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager
- PayPal\-Client\-Metadata\-Id? string -
- Prefer string(default "return=representation") - The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>
- PayPal\-Partner\-Attribution\-Id? string -
paypal.orders: OrdersGetQueries
Represents the Queries record for the operation: orders.get
Fields
- fields? string - A comma-separated list of fields that should be returned for the order. Valid filter field is
payment_source
paypal.orders: OrdersTrackCreateHeaders
Represents the Headers record for the operation: orders.track.create
Fields
- PayPal\-Auth\-Assertion? string - An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>
paypal.orders: OrderTrackerRequest
The tracking details of an order
Fields
- Fields Included from *ShipmentTracker
- transaction_id string
- quantity int
- notify_buyer boolean
- tracking_number_type ShipmentTrackingNumberType
- shipment_date DateNoTime
- tracking_number_validated boolean
- shipment_direction "FORWARD"|"RETURN"
- postage_payment_id string
- carrier ShipmentCarrier
- shipment_uploader "MERCHANT"|"CONSUMER"|"PARTNER"
- last_updated_time DateTime
- carrier_name_other string
- tracking_number string
- status ShipmentTrackingStatus
- anydata...
- Fields Included from *OrderTrackerRequestAllOf2
- capture_id string
- notify_payer boolean
- items TrackerItem[]
- anydata...
paypal.orders: OrderTrackerRequestAllOf2
Fields
- capture_id string - The PayPal capture ID.
- notify_payer boolean(default false) - If true, sends an email notification to the payer of the PayPal transaction. The email contains the tracking information that was uploaded through the API.
- items? TrackerItem[] - An array of details of items in the shipment.
paypal.orders: P24
Information used to pay using P24(Przelewy24)
Fields
- country_code? CountryCode -
- payment_descriptor? string - P24 generated payment description
- method_id? string - Numeric identifier of the payment scheme or bank used for the payment
- method_description? string - Friendly name of the payment scheme or bank used for the payment
- name? FullName - The full name representation like Mr J Smith
- email? EmailAddress - The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>
paypal.orders: P24Request
Information needed to pay using P24 (Przelewy24)
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
- email EmailAddress - The internationalized email address.<blockquote><strong>Note:</strong> Up to 64 characters are allowed before and 255 characters are allowed after the <code>@</code> sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted <code>@</code> sign exists.</blockquote>
paypal.orders: Patch
The JSON patch object to apply partial updates to resources
Fields
- op "add"|"remove"|"replace"|"move"|"copy"|"test" - The operation
- path? string - The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a> to the target document location at which to complete the operation
- 'from? string - The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a> to the target document location from which to move the value. Required for the <code>move</code> operation
- value? anydata - The value to apply. The <code>remove</code>, <code>copy</code>, and <code>move</code> operations do not require a value. Since <a href="https://www.rfc-editor.org/rfc/rfc69021">JSON Patch</a> allows any type for <code>value</code>, the <code>type</code> property is not specified
paypal.orders: Payee
The merchant who receives the funds and fulfills the order. The merchant is also known as the payee
Fields
- Fields Included from *PayeeBase
- Fields Included from *PayeeAllOf2
- anydata...
paypal.orders: PayeeAllOf2
paypal.orders: PayeeBase
The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee
Fields
- email_address? Email -
- merchant_id? AccountId -
paypal.orders: Payer
The customer who approves and pays for the order. The customer is also known as the payer
Fields
- Fields Included from *PayerBase
- Fields Included from *PayerAllOf2
- name Name
- phone PhoneWithType
- birth_date DateNoTime
- tax_info TaxInfo
- address AddressPortable
- anydata...
paypal.orders: PayerAllOf2
Fields
- name? Name - The name of the party
- phone? PhoneWithType - The phone information
- birth_date? DateNoTime - The stand-alone date, in Internet date and time format. To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard
date_time
type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years
- tax_info? TaxInfo - The tax ID of the customer. The customer is also known as the payer. Both
tax_id
andtax_id_type
are required
- address? AddressPortable - The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
paypal.orders: PayerBase
The customer who approves and pays for the order. The customer is also known as the payer
Fields
- email_address? Email -
- payer_id? AccountId -
paypal.orders: PaymentCollection
The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds
Fields
- captures? Capture[] - An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments
- authorizations? AuthorizationWithAdditionalData[] - An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments
- refunds? Refund[] - An array of refunds for a purchase unit. A purchase unit can have zero or more refunds
paypal.orders: PaymentInstruction
Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order
Fields
- disbursement_mode? DisbursementMode -
- platform_fees? PlatformFee[] - An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability
- payee_receivable_fx_rate_id? string - FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account
- payee_pricing_tier_id? string - This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error
paypal.orders: PaymentMethod
The customer and merchant payment preferences
Fields
- payee_preferred? PayeePaymentMethodPreference -
- standard_entry_class_code "TEL"|"WEB"|"CCD"|"PPD" (default "WEB") - NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes
paypal.orders: PaymentSource
The payment source definition
Fields
- giropay? GiropayRequest - Information needed to pay using giropay
- blik? BlikRequest - Information needed to pay using BLIK
- ideal? IdealRequest - Information needed to pay using iDEAL
- google_pay? GooglePayRequest -
- trustly? TrustlyRequest - Information needed to pay using Trustly
- eps? EpsRequest - Information needed to pay using eps
- sofort? SofortRequest - Information needed to pay using Sofort
- token? Token - The tokenized payment source to fund a payment
- venmo? VenmoWalletRequest - Information needed to pay using Venmo
- apple_pay? ApplePayRequest -
- bancontact? BancontactRequest - Information needed to pay using Bancontact
- p24? P24Request - Information needed to pay using P24 (Przelewy24)
- paypal? PaypalWallet - A resource that identifies a PayPal Wallet is used for payment
- card? CardRequest - The payment card to use to fund a payment. Can be a credit or debit card.<blockquote><strong>Note:</strong> Passing card number, cvv and expiry directly via the API requires <a href="https://www.pcisecuritystandards.org/pci_security/completing_self_assessment"> PCI SAQ D compliance</a>. <br>PayPal offers a mechanism by which you do not have to take on the <strong>PCI SAQ D</strong> burden by using hosted fields - refer to <a href="https://developer.paypal.com/docs/checkout/advanced/integrate/">this Integration Guide</a>.</blockquote>
- mybank? MybankRequest - Information needed to pay using MyBank
paypal.orders: PaymentSourceResponse
The payment source used to fund the payment
Fields
- giropay? Giropay - Information needed to pay using giropay
- bancontact? Bancontact - Information used to pay Bancontact
- blik? Blik - Information used to pay using BLIK
- ideal? Ideal - Information used to pay using iDEAL
- p24? P24 - Information used to pay using P24(Przelewy24)
- trustly? Trustly - Information needed to pay using Trustly
- eps? Eps - Information used to pay using eps
- paypal? PaypalWalletResponse - The PayPal Wallet response
- card? CardResponse - The payment card to use to fund a payment. Card can be a credit or debit card
- sofort? Sofort - Information used to pay using Sofort
- mybank? Mybank - Information used to pay using MyBank
- venmo? VenmoWalletResponse - Venmo wallet response
paypal.orders: PaypalWallet
A resource that identifies a PayPal Wallet is used for payment
Fields
- experience_context? PaypalWalletExperienceContext -
- billing_agreement_id? BillingAgreementId -
- email_address? Email -
- address? AddressPortable2 - The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
- tax_info? TaxInfo -
- phone? PhoneWithType - The phone information
- birth_date? DateNoTime -
- name? Name2 - The name of the party
- attributes? PaypalWalletAttributes - Additional attributes associated with the use of this PayPal Wallet
- vault_id? VaultId -
paypal.orders: PaypalWalletAttributes
Additional attributes associated with the use of this PayPal Wallet
Fields
- vault? VaultPaypalWalletBase - Resource consolidating common request and response attributes for vaulting PayPal Wallet
- customer? PaypalWalletCustomer - The details about a customer in PayPal's system of record
paypal.orders: PaypalWalletAttributesResponse
Additional attributes associated with the use of a PayPal Wallet
Fields
- cobranded_cards? CobrandedCard[] - An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s)
- vault? PaypalWalletVaultResponse - The details about a saved PayPal Wallet payment source
paypal.orders: PaypalWalletCustomer
The details about a customer in PayPal's system of record
Fields
- Fields Included from *Customer
- email_address Email
- phone PhoneWithType
- id MerchantPartnerCustomerId
- anydata...
- Fields Included from *PaypalWalletCustomerAllOf2
- anydata...
paypal.orders: PaypalWalletCustomerAllOf2
paypal.orders: PaypalWalletExperienceContext
Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configurebrand_name
andshipping_preference
during partner account setup, which overrides the request values.
Fields
- user_action "CONTINUE"|"PAY_NOW" (default "CONTINUE") - Configures a <strong>Continue</strong> or <strong>Pay Now</strong> checkout flow
- return_url? Url -
- landing_page "LOGIN"|"GUEST_CHECKOUT"|"NO_PREFERENCE" (default "NO_PREFERENCE") - The type of landing page to show on the PayPal site for customer checkout
- brand_name? string - The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode
- payment_method_preference "UNRESTRICTED"|"IMMEDIATE_PAYMENT_REQUIRED" (default "UNRESTRICTED") - The merchant-preferred payment methods
- locale? Language - The language tag for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the ISO 639-2 language code, the optional ISO-15924 script tag, and the ISO-3166 alpha-2 country code or M49 region code
- cancel_url? Url -
- shipping_preference "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" (default "GET_FROM_FILE") - The location from which the shipping address is derived
paypal.orders: PaypalWalletResponse
The PayPal Wallet response
Fields
- phone_type? PhoneType2 -
- email_address? Email -
- account_id? AccountId2 -
- address? AddressPortable2 - The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
- tax_info? TaxInfo -
- birth_date? DateNoTime -
- name? Name2 - The name of the party
- phone_number? Phone2 -
- attributes? PaypalWalletAttributesResponse - Additional attributes associated with the use of a PayPal Wallet
- account_status? "VERIFIED"|"UNVERIFIED" - The account status indicates whether the buyer has verified the financial details associated with their PayPal account
paypal.orders: PaypalWalletVaultResponse
The details about a saved PayPal Wallet payment source
Fields
- Fields Included from *VaultResponse
- links LinkDescription[]
- id string
- status "VAULTED"|"CREATED"|"APPROVED"
- customer Customer
- anydata...
- Fields Included from *PaypalWalletVaultResponseAllOf2
- customer PaypalWalletCustomer
- owner_id VaultOwnerId
- anydata...
- customer? Customer -
paypal.orders: PaypalWalletVaultResponseAllOf2
Fields
- customer? PaypalWalletCustomer - The details about a customer in PayPal's system of record
- owner_id? VaultOwnerId -
paypal.orders: Phone
The phone number, in its canonical international E.164 numbering plan format
Fields
- country_code string - The country calling code (CC), in its canonical international E.164 numbering plan format. The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN)
- extension_number? string - The extension number
- national_number string - The national number, in its canonical international E.164 numbering plan format. The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN)
paypal.orders: Phone2
The phone number in its canonical international E.164 numbering plan format
Fields
- national_number string - The national number, in its canonical international E.164 numbering plan format. The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN)
paypal.orders: PhoneWithType
The phone information
Fields
- phone_type? PhoneType -
- phone_number Phone -
paypal.orders: PlatformFee
The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit
Fields
- payee? PayeeBase - The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee
- amount Money - The currency and amount for a financial transaction, such as a balance or payment due
paypal.orders: ProcessorResponse
The processor response information for payment requests, such as direct credit card transactions
Fields
- cvv_code? "E"|"I"|"M"|"N"|"P"|"S"|"U"|"X"|"All others"|"0"|"1"|"2"|"3"|"4" - The card verification value code for for Visa, Discover, Mastercard, or American Express
- response_code? "0000"|"00N7"|"0100"|"0390"|"0500"|"0580"|"0800"|"0880"|"0890"|"0960"|"0R00"|"1000"|"10BR"|"1300"|"1310"|"1312"|"1317"|"1320"|"1330"|"1335"|"1340"|"1350"|"1352"|"1360"|"1370"|"1380"|"1382"|"1384"|"1390"|"1393"|"5100"|"5110"|"5120"|"5130"|"5135"|"5140"|"5150"|"5160"|"5170"|"5180"|"5190"|"5200"|"5210"|"5400"|"5500"|"5650"|"5700"|"5710"|"5800"|"5900"|"5910"|"5920"|"5930"|"5950"|"6300"|"7600"|"7700"|"7710"|"7800"|"7900"|"8000"|"8010"|"8020"|"8030"|"8100"|"8110"|"8220"|"9100"|"9500"|"9510"|"9520"|"9530"|"9540"|"9600"|"PCNR"|"PCVV"|"PP06"|"PPRN"|"PPAD"|"PPAB"|"PPAE"|"PPAG"|"PPAI"|"PPAR"|"PPAU"|"PPAV"|"PPAX"|"PPBG"|"PPC2"|"PPCE"|"PPCO"|"PPCR"|"PPCT"|"PPCU"|"PPD3"|"PPDC"|"PPDI"|"PPDV"|"PPDT"|"PPEF"|"PPEL"|"PPER"|"PPEX"|"PPFE"|"PPFI"|"PPFR"|"PPFV"|"PPGR"|"PPH1"|"PPIF"|"PPII"|"PPIM"|"PPIT"|"PPLR"|"PPLS"|"PPMB"|"PPMC"|"PPMD"|"PPNC"|"PPNL"|"PPNM"|"PPNT"|"PPPH"|"PPPI"|"PPPM"|"PPQC"|"PPRE"|"PPRF"|"PPRR"|"PPS0"|"PPS1"|"PPS2"|"PPS3"|"PPS4"|"PPS5"|"PPS6"|"PPSC"|"PPSD"|"PPSE"|"PPTE"|"PPTF"|"PPTI"|"PPTR"|"PPTT"|"PPTV"|"PPUA"|"PPUC"|"PPUE"|"PPUI"|"PPUP"|"PPUR"|"PPVC"|"PPVE"|"PPVT" - Processor response code for the non-PayPal payment processor errors
- payment_advice_code? "01"|"02"|"03"|"21" - The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes
- avs_code? "A"|"B"|"C"|"D"|"E"|"F"|"G"|"I"|"M"|"N"|"P"|"R"|"S"|"U"|"W"|"X"|"Y"|"Z"|"Null"|"0"|"1"|"2"|"3"|"4" - The address verification code for Visa, Discover, Mastercard, or American Express transactions
paypal.orders: PurchaseUnit
The purchase unit details. Used to capture required information for the payment contract
Fields
- amount? AmountWithBreakdown - The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify
amount.breakdown
, the amount equalsitem_total
plustax_total
plusshipping
plushandling
plusinsurance
minusshipping_discount
minus discount.<br/>The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs <a href="/docs/integration/direct/rest/currency-codes/">Currency Codes</a>
- reference_id? string - The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through
PATCH
. If you omit this value and the order contains only one purchase unit, PayPal sets this value todefault
. <blockquote><strong>Note:</strong> If there are multiple purchase units, <code>reference_id</code> is required for each purchase unit.</blockquote>
- custom_id? string - The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports
- payments? PaymentCollection - The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds
- description? string - The purchase description
- payment_instruction? PaymentInstruction -
- payee? Payee - The merchant who receives the funds and fulfills the order. The merchant is also known as the payee
- supplementary_data? SupplementaryData -
- shipping? ShippingWithTrackingDetails - The order shipping details
- soft_descriptor? string - The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:<code>22 - len(PAYPAL * (8)) - len(<var>Descriptor in Payment Receiving Preferences of Merchant account</var> + 1)</code>The PAYPAL prefix uses 8 characters.<br/><br/>The soft descriptor supports the following ASCII characters:<ul><li>Alphanumeric characters</li><li>Dashes</li><li>Asterisks</li><li>Periods (.)</li><li>Spaces</li></ul>For Wallet payments marketplace integrations:<ul><li>The merchant descriptor in the Payment Receiving Preferences must be the marketplace name.</li><li>You can't use the remaining space to show the customer service number.</li><li>The remaining spaces can be a combination of seller name and country.</li></ul><br/>For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number
- invoice_id? string - The API caller-provided external invoice ID for this order
- id? string - The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling <code>v2/checkout/orders/id/save</code>
- items? Item[] - An array of items that the customer purchases from the merchant
paypal.orders: PurchaseUnitRequest
The purchase unit request. Includes required information for the payment contract
Fields
- payee? Payee - The merchant who receives the funds and fulfills the order. The merchant is also known as the payee
- amount AmountWithBreakdown - The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.<br/>If you specify
amount.breakdown
, the amount equalsitem_total
plustax_total
plusshipping
plushandling
plusinsurance
minusshipping_discount
minus discount.<br/>The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs <a href="/docs/integration/direct/rest/currency-codes/">Currency Codes</a>
- supplementary_data? SupplementaryData -
- reference_id? string - The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through
PATCH
. If you omit this value and the order contains only one purchase unit, PayPal sets this value todefault
- shipping? ShippingDetail - The shipping details
- soft_descriptor? string - The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.<br><br>If an Order is paid using the "PayPal Wallet", the statement descriptor will appear in following format on the payer's card statement: <code><var>PAYPAL_prefix</var>+(space)+<var>merchant_descriptor</var>+(space)+ <var>soft_descriptor</var></code><blockquote><strong>Note:</strong> The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit</blockquote>The <code>PAYPAL</code> prefix uses 8 characters. Only the first 22 characters will be displayed in the statement. <br>For example, if:<ul><li>The PayPal prefix toggle is <code>PAYPAL *</code>.</li><li>The merchant descriptor in the profile is <code>Janes Gift</code>.</li><li>The soft descriptor is <code>800-123-1234</code>.</li></ul>Then, the statement descriptor on the card is <code>PAYPAL * Janes Gift 80</code>
- custom_id? string - The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer
- description? string - The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length
- invoice_id? string - The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives
- payment_instruction? PaymentInstruction -
- items? Item[] - An array of items that the customer purchases from the merchant
paypal.orders: Refund
The refund information
Fields
- Fields Included from *RefundStatus
- status_details RefundStatusDetails
- status "CANCELLED"|"FAILED"|"PENDING"|"COMPLETED"
- anydata...
- Fields Included from *RefundAllOf2
- id string
- amount Money
- invoice_id string
- custom_id string
- acquirer_reference_number string
- note_to_payer string
- seller_payable_breakdown MerchantPayableBreakdown
- payer PayeeBase
- links LinkDescription[]
- anydata...
- Fields Included from *ActivityTimestamps
paypal.orders: RefundAllOf2
Fields
- id? string - The PayPal-generated ID for the refund.
- amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- invoice_id? string - The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
- custom_id? string - The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
- acquirer_reference_number? string - Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
- note_to_payer? string - The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives.
- seller_payable_breakdown? MerchantPayableBreakdown - The breakdown of the refund
- payer? PayeeBase - The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee
- links? LinkDescription[] - An array of related HATEOAS links.
paypal.orders: RefundStatus
The refund status
Fields
- status_details? RefundStatusDetails -
- status? "CANCELLED"|"FAILED"|"PENDING"|"COMPLETED" - The status of the refund
paypal.orders: RefundStatusDetails
The details of the refund status
Fields
- reason? "ECHECK" - The reason why the refund has the
PENDING
orFAILED
status
paypal.orders: SellerProtection
The level of protection offered as defined by PayPal Seller Protection for Merchants
Fields
- dispute_categories? ("ITEM_NOT_RECEIVED"|"UNAUTHORIZED_TRANSACTION")[] - An array of conditions that are covered for the transaction
- status? "ELIGIBLE"|"PARTIALLY_ELIGIBLE"|"NOT_ELIGIBLE" - Indicates whether the transaction is eligible for seller protection. For information, see PayPal Seller Protection for Merchants
paypal.orders: SellerReceivableBreakdown
The detailed breakdown of the capture activity. This is not available for transactions that are in pending state
Fields
- platform_fees? PlatformFee[] - An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment
- exchange_rate? ExchangeRate -
- paypal_fee? Money -
- gross_amount Money -
- paypal_fee_in_receivable_currency? Money -
- net_amount? Money -
- receivable_amount? Money -
paypal.orders: ShipmentTracker
The tracking information for a shipment
Fields
- transaction_id string - The PayPal transaction ID
- quantity? int - The quantity of items shipped
- notify_buyer boolean(default false) - If true, sends an email notification to the buyer of the PayPal transaction. The email contains the tracking information that was uploaded through the API
- tracking_number_type? ShipmentTrackingNumberType -
- shipment_date? DateNoTime -
- tracking_number_validated? boolean - Indicates whether the carrier validated the tracking number
- shipment_direction? "FORWARD"|"RETURN" - To denote whether the shipment is sent forward to the receiver or returned back
- postage_payment_id? string - The postage payment ID. This property supports Unicode
- carrier? ShipmentCarrier - The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set
carrier
toOTHER
and set carrier name incarrier_name_other
. For allowed values, see <a href="/docs/tracking/reference/carriers/">Carriers</a>
- shipment_uploader? "MERCHANT"|"CONSUMER"|"PARTNER" - To denote which party uploaded the shipment tracking info
- last_updated_time? DateTime -
- carrier_name_other? string - The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode
- tracking_number? string - The tracking number for the shipment. This property supports Unicode
- status ShipmentTrackingStatus - The status of the item shipment. For allowed values, see <a href="/docs/tracking/reference/shipping-status/">Shipping Statuses</a>
paypal.orders: ShippingDetail
The shipping details
Fields
- address? AddressPortable - The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
- name? Name - The name of the party
- options? ShippingOption[] - An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items
- 'type? "SHIPPING"|"PICKUP_IN_PERSON"|"PICKUP_IN_STORE"|"PICKUP_FROM_PERSON" - A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either
type
oroptions
may be present, but not both
paypal.orders: ShippingOption
The options that the payee or merchant offers to the payer to ship or pick up their items
Fields
- amount? Money - The currency and amount for a financial transaction, such as a balance or payment due
- id string - A unique ID that identifies a payer-selected shipping option
- label string - A description that the payer sees, which helps them choose an appropriate shipping option. For example,
Free Shipping
,USPS Priority Shipping
,Expédition prioritaire USPS
, orUSPS yōuxiān fā huò
. Localize this description to the payer's locale
- 'type? ShippingType - A classification for the method of purchase fulfillment
- selected boolean - If the API request sets
selected = true
, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view theshipping.options
in the PayPal Checkout experience. As part of the response if ashipping.option
containsselected=true
, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only oneshipping.option
can be set toselected=true
paypal.orders: ShippingWithTrackingDetails
The order shipping details
Fields
- Fields Included from *ShippingDetail
- address AddressPortable
- name Name
- options ShippingOption[]
- type "SHIPPING"|"PICKUP_IN_PERSON"|"PICKUP_IN_STORE"|"PICKUP_FROM_PERSON"
- anydata...
- Fields Included from *ShippingWithTrackingDetailsAllOf2
- trackers Tracker[]
- anydata...
paypal.orders: ShippingWithTrackingDetailsAllOf2
Fields
- trackers? Tracker[] - An array of trackers for a transaction.
paypal.orders: Sofort
Information used to pay using Sofort
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
- iban_last_chars? IbanLastChars -
paypal.orders: SofortRequest
Information needed to pay using Sofort
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
paypal.orders: StoredPaymentSource
Provides additional details to process a payment using a payment_source
that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
payment_type=ONE_TIME
is compatible only withpayment_initiator=CUSTOMER
.usage=FIRST
is compatible only withpayment_initiator=CUSTOMER
.previous_transaction_reference
orprevious_network_transaction_reference
is compatible only withpayment_initiator=MERCHANT
.- Only one of the parameters -
previous_transaction_reference
andprevious_network_transaction_reference
- can be present in the request.
Fields
- payment_type StoredPaymentSourcePaymentType -
- usage? StoredPaymentSourceUsageType - Indicates if this is a
first
orsubsequent
payment using a stored payment source (also referred to as stored credential or card on file)
- payment_initiator PaymentInitiator -
- previous_network_transaction_reference? NetworkTransactionReference -
paypal.orders: SupplementaryData
Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data
Fields
- card? CardSupplementaryData - Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href="https://developer.paypal.com/docs/checkout/advanced/processing/">checkout</a> or <a href="https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/">multiparty checkout</a>
paypal.orders: TaxInfo
The tax ID of the customer. The customer is also known as the payer. Both tax_id
and tax_id_type
are required
Fields
- tax_id_type "BR_CPF"|"BR_CNPJ" - The customer's tax ID type
- tax_id string - The customer's tax ID value
paypal.orders: ThreeDSecureAuthenticationResponse
Results of 3D Secure Authentication
Fields
- authentication_status? ParesStatus -
- enrollment_status? Enrolled -
paypal.orders: Token
The tokenized payment source to fund a payment
Fields
- id string - The PayPal-generated ID for the token
- 'type "BILLING_AGREEMENT" - The tokenization method that generated the ID
paypal.orders: Tracker
The tracking response on creation of tracker
Fields
- Fields Included from *TrackerAllOf1
- id string
- status TrackerStatus
- items TrackerItem[]
- links LinkDescription[]
- anydata...
- Fields Included from *ActivityTimestamps
paypal.orders: TrackerAllOf1
Fields
- id? string - The tracker id.
- status? TrackerStatus -
- items? TrackerItem[] - An array of details of items in the shipment.
- links? LinkDescription[] - An array of request-related HATEOAS links.
paypal.orders: TrackerItem
The details of the items in the shipment
Fields
- quantity? string - The item quantity. Must be a whole number
- image_url? string - The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored
- name? string - The item name or title
- upc? UniversalProductCode -
- sku? string - The stock keeping unit (SKU) for the item. This can contain unicode characters
- url? string - The URL to the item being purchased. Visible to buyer and used in buyer experiences
paypal.orders: Trustly
Information needed to pay using Trustly
Fields
- country_code? CountryCode -
- name? FullName - The full name representation like Mr J Smith
- bic? Bic - The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
- iban_last_chars? IbanLastChars -
paypal.orders: TrustlyRequest
Information needed to pay using Trustly
Fields
- experience_context? ExperienceContextBase -
- country_code CountryCode -
- name FullName - The full name representation like Mr J Smith
paypal.orders: V3VaultInstructionBase
Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting
Fields
- store_in_vault StoreInVaultInstruction -
paypal.orders: VaultInstructionBase
Basic vault instruction specification that can be extended by specific payment sources that supports vaulting
Fields
- store_in_vault? StoreInVaultInstruction -
paypal.orders: VaultPaypalWalletBase
Resource consolidating common request and response attributes for vaulting PayPal Wallet
Fields
- Fields Included from *VaultInstructionBase
- store_in_vault StoreInVaultInstruction
- anydata...
- Fields Included from *VaultPaypalWalletBaseAllOf2
- description string
- usage_pattern "IMMEDIATE"|"DEFERRED"|"RECURRING_PREPAID"|"RECURRING_POSTPAID"|"THRESHOLD_PREPAID"|"THRESHOLD_POSTPAID"
- shipping ShippingDetail
- usage_type "MERCHANT"|"PLATFORM"
- owner_id VaultOwnerId
- customer_type "CONSUMER"|"BUSINESS"
- permit_multiple_payment_tokens boolean
- anydata...
- usage_type "MERCHANT"|"PLATFORM" -
paypal.orders: VaultPaypalWalletBaseAllOf2
Fields
- description? string - The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.
- usage_pattern? "IMMEDIATE"|"DEFERRED"|"RECURRING_PREPAID"|"RECURRING_POSTPAID"|"THRESHOLD_PREPAID"|"THRESHOLD_POSTPAID" - Expected business/pricing model for the billing agreement.
- shipping? ShippingDetail - The shipping details
- usage_type? "MERCHANT"|"PLATFORM" - The usage type associated with the PayPal payment token.
- owner_id? VaultOwnerId -
- customer_type "CONSUMER"|"BUSINESS" (default "CONSUMER") - The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
- permit_multiple_payment_tokens boolean(default false) - Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
paypal.orders: VaultResponse
The details about a saved payment source
Fields
- links? LinkDescription[] - An array of request-related HATEOAS links
- id? string - The PayPal-generated ID for the saved payment source
- status? "VAULTED"|"CREATED"|"APPROVED" - The vault status
- customer? Customer - The details about a customer in PayPal's system of record
paypal.orders: VaultVenmoWalletBase
Resource consolidating common request and response attirbutes for vaulting Venmo Wallet
Fields
- Fields Included from *V3VaultInstructionBase
- store_in_vault StoreInVaultInstruction
- anydata...
- Fields Included from *VaultVenmoWalletBaseAllOf2
- usage_type "MERCHANT"|"PLATFORM" -
paypal.orders: VaultVenmoWalletBaseAllOf2
Fields
- description? string - The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com.
- usage_pattern? "IMMEDIATE"|"DEFERRED"|"RECURRING_PREPAID"|"RECURRING_POSTPAID"|"THRESHOLD_PREPAID"|"THRESHOLD_POSTPAID" - Expected business/pricing model for the billing agreement.
- usage_type? "MERCHANT"|"PLATFORM" - The usage type associated with the Venmo payment token.
- customer_type "CONSUMER"|"BUSINESS" (default "CONSUMER") - The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
- permit_multiple_payment_tokens boolean(default false) - Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same Venmo account.
paypal.orders: VenmoWalletAttributes
Additional attributes associated with the use of this Venmo Wallet
Fields
- vault? VaultVenmoWalletBase - Resource consolidating common request and response attirbutes for vaulting Venmo Wallet
- customer? Customer - The details about a customer in PayPal's system of record
paypal.orders: VenmoWalletAttributesResponse
Additional attributes associated with the use of a Venmo Wallet
Fields
- vault? VaultResponse - The details about a saved payment source
paypal.orders: VenmoWalletExperienceContext
Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference
during partner account setup, which overrides the request values.
Fields
- brand_name? string - The business name of the merchant. The pattern is defined by an external party and supports Unicode
- shipping_preference "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" (default "GET_FROM_FILE") - The location from which the shipping address is derived
paypal.orders: VenmoWalletRequest
Information needed to pay using Venmo
Fields
- experience_context? VenmoWalletExperienceContext -
- email_address? Email -
- attributes? VenmoWalletAttributes - Additional attributes associated with the use of this Venmo Wallet
- vault_id? VaultId -
paypal.orders: VenmoWalletResponse
Venmo wallet response
Fields
- email_address? Email -
- account_id? AccountId2 -
- address? AddressPortable2 - The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute
- user_name? string - The Venmo user name chosen by the user, also know as a Venmo handle
- name? Name2 - The name of the party
- phone_number? Phone2 -
- attributes? VenmoWalletAttributesResponse - Additional attributes associated with the use of a Venmo Wallet
Union types
paypal.orders: PhoneType2
PhoneType2
The phone type
paypal.orders: ShipmentCarrier
ShipmentCarrier
The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set carrier
to OTHER
and set carrier name in carrier_name_other
. For allowed values, see Carriers
paypal.orders: ShippingType
ShippingType
A classification for the method of purchase fulfillment
paypal.orders: OrderStatus
OrderStatus
The order status
paypal.orders: PayeePaymentMethodPreference
PayeePaymentMethodPreference
The merchant-preferred payment methods
paypal.orders: PaymentInitiator
PaymentInitiator
The person or party who initiated or triggered the payment
paypal.orders: CheckoutPaymentIntent
CheckoutPaymentIntent
The intent to either capture payment immediately or authorize a payment for an order after order creation
paypal.orders: Enrolled
Enrolled
Status of Authentication eligibility
paypal.orders: StoredPaymentSourceUsageType
StoredPaymentSourceUsageType
Indicates if this is a first
or subsequent
payment using a stored payment source (also referred to as stored credential or card on file)
paypal.orders: LiabilityShift
LiabilityShift
Liability shift indicator. The outcome of the issuer's authentication
paypal.orders: ParesStatus
ParesStatus
Transactions status result identifier. The outcome of the issuer's authentication
paypal.orders: DisbursementMode
DisbursementMode
The funds that are held on behalf of the merchant
paypal.orders: CardBrand
CardBrand
The card network or brand. Applies to credit, debit, gift, and payment cards
paypal.orders: ShipmentTrackingStatus
ShipmentTrackingStatus
The status of the item shipment. For allowed values, see Shipping Statuses
paypal.orders: ProcessingInstruction
ProcessingInstruction
The instruction to process an order
paypal.orders: EciFlag
EciFlag
Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor
paypal.orders: PhoneType
PhoneType
The phone type
paypal.orders: StoredPaymentSourcePaymentType
StoredPaymentSourcePaymentType
Indicates the type of the stored payment_source payment
paypal.orders: ShipmentTrackingNumberType
ShipmentTrackingNumberType
The tracking number type
paypal.orders: CardType
CardType
Type of card. i.e Credit, Debit and so on
Array types
paypal.orders: PatchRequest
PatchRequest
An array of JSON patch objects to apply partial updates to resources
Anydata types
paypal.orders: AltpayRecurringAttributesRequest
AltpayRecurringAttributesRequest
paypal.orders: UniversalProductCode
UniversalProductCode
paypal.orders: AuthenticationFlow
AuthenticationFlow
paypal.orders: ExemptionDetails
ExemptionDetails
paypal.orders: AltpayRecurringAttributes
AltpayRecurringAttributes
paypal.orders: TrackerStatus
TrackerStatus
paypal.orders: GooglePayRequest
GooglePayRequest
paypal.orders: ApplePayAttributes
ApplePayAttributes
paypal.orders: VaultOwnerId
VaultOwnerId
String types
paypal.orders: CurrencyCode
CurrencyCode
The three-character ISO-4217 currency code that identifies the currency
paypal.orders: DateNoTime
DateNoTime
The stand-alone date, in Internet date and time format. To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard date_time
type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years
paypal.orders: IpAddress
IpAddress
An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses
paypal.orders: CountryCode2
CountryCode2
The 2-character ISO 3166-1 code that identifies the country or region.
Note: The country code for Great Britain isGB
and notUK
as used in the top-level domain names for that country. Use theC2
country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
paypal.orders: Email
The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the@
sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@
sign exists.
paypal.orders: AccountId
AccountId
The account identifier for a PayPal account
paypal.orders: InstrumentId
InstrumentId
The identifier of the instrument
paypal.orders: Language
Language
The language tag for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the ISO 639-2 language code, the optional ISO-15924 script tag, and the ISO-3166 alpha-2 country code or M49 region code
paypal.orders: Bic
Bic
The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank
paypal.orders: CobrandedCardLabelsItemsString
CobrandedCardLabelsItemsString
paypal.orders: FullName
FullName
The full name representation like Mr J Smith
paypal.orders: BinDetailsProductsItemsString
BinDetailsProductsItemsString
paypal.orders: DateTime
DateTime
The date and time, in Internet date and time format. Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
paypal.orders: IbanLastChars
IbanLastChars
The last characters of the IBAN used to pay
paypal.orders: EmailAddress
EmailAddress
The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the@
sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted@
sign exists.
paypal.orders: VaultId
VaultId
The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions
paypal.orders: Url
Url
Describes the URL
paypal.orders: MerchantPartnerCustomerId
MerchantPartnerCustomerId
The unique ID for a customer generated by PayPal
paypal.orders: DateYearMonth
DateYearMonth
The year and month, in ISO-8601 YYYY-MM
date format. See Internet date and time format
paypal.orders: AccountId2
AccountId2
The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result
paypal.orders: BillingAgreementId
BillingAgreementId
The PayPal billing agreement ID. References an approved recurring payment for goods or services
paypal.orders: CountryCode
CountryCode
The two-character ISO 3166-1 code that identifies the country or region.
Note: The country code for Great Britain isGB
and notUK
as used in the top-level domain names for that country. Use theC2
country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
Import
import ballerinax/paypal.orders;
Metadata
Released date: 5 days ago
Version: 2.0.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.12.7
GraalVM compatible: Yes
Pull count
Total: 1375
Current verison: 0
Weekly downloads
Keywords
Paypal
Payments
Orders
Contributors