• Installs:
  • Today: 171
  • All Time: 13893
Developer:userdimas

PayPal API Package

Accept PayPal and credit card payments online or on mobile.

List of Endpoints
This is the list of endpoints this API includes. To add any of the endpoints to your app, please click on “Connect to endpoint” text.
See All
List of Webhook Events
This is the list of webhook events this API provides. Webhooks allow you to register to certain events and receive real-time data over websockets.
See All
Discussions
user thumbnail
leave3644: API order
2018-03-13
user thumbnail
saids: PHP source code
2017-05-30
See All
Readme

PayPal

Paypal Package

Accept PayPal and credit card payments online or on mobile.

  • Domain: paypal.com
  • Credentials: clientId, secret

How to get credentials:

  1. Go to PayPal Developer Area
  2. Log In or Sign up
  3. Open your Dashboard
  4. Create an app to receive REST API credentials for testing and live transactions.
  5. Retrive your clientId and secret

Webhook credentials

Please use SDK to test this feature.

  1. Go to RapidAPI
  2. Log in or create an account
  3. Go to My apps
  4. Add new project with projectName to get your project Key
FieldTypeDescription
projectNamecredentialsYour RapidAPI project name
projectKeycredentialsYour RapidAPI project key

Custom datatypes:

DatatypeDescriptionExample
DatepickerString which includes date and time2016-05-28 00:00:00
MapString which includes latitude and longitude coma separated50.37, 26.56
ListSimple array["123", "sample"]
SelectString with predefined valuessample
ArrayArray of objects[{"Second name":"123","Age":"12","Photo":"sdf","Draft":"sdfsdf"},{"name":"adi","Second name":"bla","Age":"4","Photo":"asfserwe","Draft":"sdfsdf"}]

Paypal.getAccessToken

Use the OAuth request to get an access token for use with your payments calls.

FieldTypeDescription
clientIdcredentialsRequired: Client id.
secretcredentialsRequired: secret
grantTypeStringRequired: Token grant type. Must be set to client_credentials.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createPayment

Use the payment resource for direct credit card payments, stored credit card payments, or PayPal account payments.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
intentStringRequired: Payment intent. Must be set to sale for immediate payment, authorize to authorize a payment for capture later, or order to create an order. Allowed values: sale, authorize, order.
payerJSONRequired: Json object. Source of the funds for this payment represented by a PayPal account or a direct credit card.
transactionsJSONRequired: Array of json objects. Transaction details, if updating a payment. Note that this instance of the transactions object accepts only the amount object.
experienceProfileIdStringOptional: PayPal generated identifier for the merchant's payment experience profile.
noteToPayerStringOptional: free-form field for the use of clients to pass in a message to the payer.
redirectUrlsJSONOptional: Json object. Set of redirect URLs you provide only for PayPal-based payments.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

payer format:

{"payment_method": "paypal"}

transactions format:

[
{
  "amount": {
    "total": "30.11",
    "currency": "USD",
    "details": {
      "subtotal": "30.00",
      "tax": "0.07",
      "shipping": "0.03",
      "handling_fee": "1.00",
      "shipping_discount": "-1.00",
      "insurance": "0.01"
    }
  },
  "description": "This is the payment transaction description.",
  "custom": "EBAY_EMS_90048630024435",
  "invoice_number": "48787589673",
  "payment_options": {
    "allowed_payment_method": "INSTANT_FUNDING_SOURCE"
  },
  "soft_descriptor": "ECHI5786786",
  "item_list": {
    "items": [
      {
        "name": "hat",
        "description": "Brown color hat",
        "quantity": "5",
        "price": "3",
        "tax": "0.01",
        "sku": "1",
        "currency": "USD"
      },
      {
        "name": "handbag",
        "description": "Black color hand bag",
        "quantity": "1",
        "price": "15",
        "tax": "0.02",
        "sku": "product34",
        "currency": "USD"
      }
    ],
    "shipping_address": {
      "recipient_name": "Hello World",
      "line1": "4thFloor",
      "line2": "unit#34",
      "city": "SAn Jose",
      "country_code": "US",
      "postal_code": "95131",
      "phone": "011862212345678",
      "state": "CA"
    }
  }
}
]

redirectUrls format:

{
    "return_url": "http://www.amazon.com",
    "cancel_url": "http://www.hawaii.com"
}

Paypal.executePayment

Executes a PayPal payment that the payer has approved. You can optionally pass in one or more transactions to update transaction information when you execute the payment.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
paymentIdStringRequired: The ID of the payment to execute.
payerIdStringRequired: The ID of the payer, passed in the return_url by PayPal.
transactionsStringOptional: Transactional details if updating a payment. Note that this instance of the transactions object accepts only the amount object.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getPayment

Shows details for a payment, by ID, that is yet completed. For example, a payment that was created, approved, or failed.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
paymentIdStringRequired: The ID of the payment to execute.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updatePayment

Partially updates a payment, by ID. You cannot update a payment after the payment is executed.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
paymentIdStringRequired: The ID of the payment to execute.
itemsJSONRequired: A JSON patch object that you can use to apply partial updates to resources.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

items format:

[
    {
      "op": "replace",
      "path": "/transactions/0/amount",
      "value": {
        "total": "32.37",
        "currency": "USD",
        "details": {
          "subtotal": "30.00",
          "shipping": "2.37"
        }
      }
    },
    {
      "op": "add",
      "path": "/transactions/0/item_list/shipping_address",
      "value": {
        "recipient_name": "Gruneberg, Anna",
        "line1": "Kathwarinenhof 1",
        "city": "Flensburg",
        "postal_code": "24939",
        "country_code": "DE"
      }
    }
]

Paypal.getPaymentList

Lists payments that were created by the create payment call and are in any state. The list shows the payments that are made to the merchant who makes the call.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
countStringOptional: The number of items to list in the response. Default: 10.
startIdStringOptional: The ID of the starting resource in the response. When results are paged, you can use the next_id value as the start_id to continue with the next set of results.
startIndexStringOptional: The start index of the resources to return. Typically used to jump to a specific position in the resource history based on its cart. Example for starting at the second item in a list of results: ?start_index=2
startTimeDatepickerOptional: The date and time when the resource was created. Indicates the start of a range of results. Example: start_time=2013-03-06T11:00:00Z Format: date-time.
endTimeDatepickerOptional: The date and time when the resource was created. Indicates the end of a range of results. Format: date-time.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getSale

Shows details for a sale transaction, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
saleIdStringRequired: The ID of the sale for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.refundSale

Refunds a completed payment.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
saleIdStringRequired: The ID of the sale for which to show details.
amountJSONOptional: Json object. Refund details including both the refunded amount to payer and refunded fee to payee. If you do not provide an amount, you must still provide an empty JSON payload in the body to indicate a full refund.
invoiceNumberStringOptional: The invoice number that is used to track this payment. Character length and limitations: 127 single-byte alphanumeric characters. Maximum length: 127.
refundAdviceBoolOptional: Flag to indicate that the buyer was already given store credit for a given transaction.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "total": "2.34",
    "currency": "USD"
}

Paypal.getRefund

Shows details for a refund, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
refundIdStringRequired: The ID of the refund for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getAuthorization

Use the getAuthorization method and related sub-resources to act on a previously created authorization. You can show details for, capture, void, and reauthorize an authorization.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
authorizationIdStringRequired: The ID of the authorization for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.captureAuthorization

Use this resource to capture and process a previously created authorization.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
authorizationIdStringRequired: The ID of the authorization for which to show details.
amountJSONOptional: The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured.
isFinalCaptureBoolOptional: Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is false. Default: false.
invoiceNumberStringOptional: The invoice number to track this payment. Maximum length: 127.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "total": "2.34",
    "currency": "USD"
}

Paypal.voidAuthorization

Voids a previously authorized payment.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
authorizationIdStringRequired: The ID of the authorization for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.reauthorizePayment

Reauthorizes a PayPal account payment. We recommend that you reauthorize a payment after the initial three-day honor period to ensure that funds are still available.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
authorizationIdStringRequired: The ID of the authorization for which to show details.
amountJSONRequired: Json object. Amount being reauthorized.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "total": "2.34",
    "currency": "USD"
}

Paypal.getCapture

Shows details for a captured payment, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
captureIdStringRequired: The ID of the captured payment for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.refundCapture

Refunds a captured payment, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
captureIdStringRequired: The ID of the captured payment for which to show details.
amountJSONOptional: Json object. The amount to be refunded to the original payer by the payee.
descriptionStringOptional: Description of what is being refunded for. Character length and limitations: 255 single-byte alphanumeric characters.
refundSourceStringOptional: Type of PayPal funding source (balance or eCheck) that can be used for auto refund. Allowed values: INSTANT_FUNDING_SOURCE, ECHECK, UNRESTRICTED. Default: UNRESTRICTED.
reasonStringOptional: Reason description for the Sale transaction being refunded.
invoiceNumberStringOptional: The invoice number that is used to track this payment. Character length and limitations: 127 single-byte alphanumeric characters.
refundAdviceStringOptional: Flag to indicate that the buyer was already given store credit for a given transaction.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "total": "2.34",
    "currency": "USD"
}

Paypal.getOrder

Shows details for an order, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
orderIdStringRequired: The ID of the order for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.authorizeOrder

Authorizes an order, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
orderIdStringRequired: The ID of the order for which to show details.
amountJSONRequired: Json object. Amount being collected.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "total": "2.34",
    "currency": "USD"
}

Paypal.captureOrder

Captures a payment on an order.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
orderIdStringRequired: The ID of the order for which to show details.
amountJSONOptional: Json object. The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured.
isFinalCaptureBoolOptional: Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is false. Default: false.
invoiceNumberStringOptional: The invoice number to track this payment.
transactionFeeJSONOptional: Json object. The transaction fee for this payment.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "total": "2.34",
    "currency": "USD"
}

transactionFee format:

{
    "value": "2.34",
    "currency": "USD"
}

Paypal.voidOrder

Voids an order, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
orderIdStringRequired: The ID of the order to void.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createPlan

You can create an empty billing plan and add a trial period and/or regular billing. Alternatively, you can create a fully loaded plan that includes both a trial period and regular billing.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
nameStringRequired: The billing plan name.
descriptionStringRequired: The billing plan description.
typeStringRequired: The billing plan type. Allowed values: FIXED, INFINITE.
paymentDefinitionsJSONRequired: Array of json objects. Resource that represents payment definition scheduling information.
merchantPreferencesJSONOptional: Json object. Resource that represents the merchant preferences for a plan, such as max failed attempts, set up fee, and so on.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

paymentDefinitions format:

[
    {
      "name": "Regular Payments",
      "type": "REGULAR",
      "frequency": "MONTH",
      "frequency_interval": "2",
      "amount": {
        "value": "100",
        "currency": "USD"
      },
      "cycles": "12",
      "charge_models": [
        {
          "type": "SHIPPING",
          "amount": {
            "value": "10",
            "currency": "USD"
          }
        },
        {
          "type": "TAX",
          "amount": {
            "value": "12",
            "currency": "USD"
          }
        }
      ]
    }
]

merchantPreferences format:

{
    "setup_fee": {
      "value": "1",
      "currency": "USD"
    },
    "return_url": "http://www.return.com",
    "cancel_url": "http://www.cancel.com",
    "auto_bill_amount": "YES",
    "initial_fail_amount_action": "CONTINUE",
    "max_fail_attempts": "0"
}

Paypal.updatePlan

You can update the information for an existing billing plan. The state of a plan must be active before a billing agreement is created.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
planIdStringRequired: The ID of the billing plan to update.
itemsJSONOptional: A JSON array patch object used for applying partial updates to resources.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

items format:

[
  {
    "path": "/",
    "value": {
      "state": "ACTIVE"
    },
    "op": "replace"
  }
]

Paypal.getPlan

Use this call to get details about a specific billing plan.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
planIdStringRequired: The ID of the billing plan to update.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getPlanList

Use this call to get a list of all billing plans based on their current state and optional query string parameters.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
pageStringOptional: The page to return. Default is 0.
statusStringOptional: The state. Default is CREATED. Possible values: created, active, inactive.
pageSizeStringOptional: The maximum number of results to return at one time. A valid value is a non-negative, non-zero integer. Default is 10.
totalRequiredStringOptional: The total number of items and pages to return in the response.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createAgreement

Creates a billing agreement for the buyer.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
nameStringRequired: Name of the agreement. Maximum length: 128.
descriptionStringRequired: Description of the agreement. Maximum length: 128.
startDateDatepickerRequired: Start date of the agreement. Date format yyyy-MM-dd z, as defined in ISO8601. Format: YYYY-MM-DDTHH:MM:SSTimeZone.
payerJSONRequired: Json object. A resource representing a Payer that funds a payment.
planJSONRequired: Json object. Billing plan resource that will be used to create a billing agreement.
agreementDetailsJSONOptional: Json object. A resource representing the agreement details.
shippingAddressJSONOptional: Json object. Base Address object used as billing address in a payment or extended for Shipping Address.
overrideChargeModelsJSONOptional: Array of json objects. A resource representing an override_charge_model to be used during creation of the agreement.
overrideMerchantPreferencesJSONOptional: Json object. Resource representing merchant preferences like max failed attempts,set up fee and others for a plan.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

payer format:

{
    "payment_method": "paypal"
}

plan format:

{
    "id": "P-94458432VR012762KRWBZEUA"
}

agreementDetails format:

{
    YOUR_AGREEMENT_DETAILS_JSON_OBJECT
}

shippingAddress format:

{
    "line1": "111 First Street",
    "city": "Saratoga",
    "state": "CA",
    "postal_code": "95070",
    "country_code": "US"
}

overrideChargeModels format:

{
    "id": "CHM-92S85978TN737850VRWBZEUA",
    "type": "TAX",
    "amount": {
      "currency": "USD",
      "value": "12"
    }
}

overrideMerchantPreferences format:

{
      "setup_fee": {
        "currency": "USD",
        "value": "1"
      },
      "max_fail_attempts": "0",
      "return_url": "http://www.return.com",
      "cancel_url": "http://www.cancel.com",
      "auto_bill_amount": "YES",
      "initial_fail_amount_action": "CONTINUE"
}

Paypal.executeAgreement

Executes an agreement after the buyer approves it.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
paymentTokenStringRequired: Identifier of the agreement resource to execute.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updateAgreement

Updates an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to update.
itemsJSONRequired: Array of json objects. A JSON patch object used for applying partial updates to resources.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

items format:

[
  {
    "op": "replace",
    "path": "/",
    "value": {
      "description": "New Description",
      "shipping_address": {
        "line1": "2065 Hamilton Ave",
        "city": "San Jose",
        "state": "CA",
        "postal_code": "95125",
        "country_code": "US"
      }
    }
  }
]

Paypal.getAgreement

Shows details for an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to retrieve.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.suspendAgreement

Suspends an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to suspend.
noteStringRequired: Reason for changing the state of the agreement. Maximum length: 128.
amountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "value": "2.34",
    "currency": "USD"
}

Paypal.reactivateAgreement

Reactivates an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to re-activate.
noteStringRequired: Reason for changing the state of the agreement. Maximum length: 128.
amountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "value": "2.34",
    "currency": "USD"
}

Paypal.cancelAgreement

Cancels an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to cancel.
noteStringRequired: Reason for changing the state of the agreement. Maximum length: 128.
amountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "value": "2.34",
    "currency": "USD"
}

Paypal.getTransactionsForBillingAgreement

Lists transactions for a billing agreement.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to cancel.
startDateDatepickerRequired: The start date of the range of transactions to list.
endDateDatepickerRequired: The end date of the range of transactions to list.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.setAgreementBalance

Sets the outstanding amount of an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to cancel.
currencyStringRequired: 3 letter currency code as defined by ISO 4217.
valueStringRequired: amount up to N digit after the decimals separator as defined in ISO 4217 for the appropriate currency code
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.billAgreementBalance

Bills the outstanding amount of an agreement, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
agreementIdStringRequired: Identifier of the agreement resource to cancel.
noteStringRequired: Reason for changing the state of the agreement. Maximum length: 128.
amountJSONRequired: Json object. Base object for all financial value related fields (balance, payment due, etc.)
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "value": "2.34",
    "currency": "USD"
}

Paypal.createPayout

You can make payouts to one or more PayPal accounts.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
senderBatchHeaderJSONRequired: Json object. The sender-provided batch header for a batch payout request.
itemsJSONRequired: Array of json objects. A sender-created definition of a payout to a single recipient. Maximum length: 5000.
syncModeStringOptional: Set to true to return an immediate and synchronous response. Default is false, which returns an asynchronous response in the background.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

senderBatchHeader format:

{
    "sender_batch_id": "325272063",
    "email_subject": "You have a Payout!"
}

items format:

[
    {
      "recipient_type": "EMAIL",
      "amount": {
        "value": "9.87",
        "currency": "USD"
      },
      "note": "Thanks for your patronage!",
      "sender_item_id": "201403140001",
      "receiver": "[email protected]"
    }
]

Paypal.getPayout

Periodically shows the latest status of a batch payout along with the transaction status and other data for individual items.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
payoutBatchIdStringRequired: The ID of the batch payout for which to show status.
fieldsStringOptional: Shows details for only specified fields.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getPayoutItem

Shows the details for a payout item. Use this call to review the current status of a previously unclaimed, or pending, payout item.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
payoutItemIdStringRequired: The ID of the payout item for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.cancelPayoutItem

Cancels an unclaimed transaction. If no one claims the unclaimed item within 30 days, the funds are automatically returned to the sender. Use this call to cancel the unclaimed item before the automatic 30-day refund.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
payoutItemIdStringRequired: The ID of the payout item for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createCreditCard

Stores credit card details with PayPal.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
numberStringRequired: Credit card number. Valid value is numeric characters with no spaces or punctuation. The string must conform with modulo and length required by each credit card type.
typeStringRequired: Credit card type. Allowed values: visa, mastercard, amex, discover, maestro.
expireMonthStringRequired: Expiration month with no leading zero.
expireYearStringRequired: The 4-digit card expiry year.
cvv2StringOptional: The 3 to 4 digit card validation code.
firstNameStringOptional: The first name of the card holder. Maximum length is 25 characters.
lastNameStringOptional: The last name of the card holder.
billingAddressJSONOptional: Json object. Base Address object used as billing address in a payment or extended for Shipping Address.
externalCustomerIdStringOptional: Externally provided ID of the customer for which to list credit card resources.
merchantIdStringOptional: ID of the merchant for which to list credit card resources.
payerIdStringOptional: unique ID that you can assign and track when you store a credit card or use a stored credit card.
externalCardIdStringOptional: Externally provided ID of the card for which to list credit card resources.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

billingAddress format:

{
    "line1":"111 First Street",
    "city":"Saratoga",
    "country_code":"US",
    "state":"CA",
    "postal_code":"95070"
}

Paypal.deleteCreditCard

Deletes details of a stored credit card. Include the credit card ID in the request URI.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
creditCardIdStringRequired: The ID of the credit card resource for which to show data.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getCreditCard

Shows details for a stored credit card.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
creditCardIdStringRequired: The ID of the credit card resource for which to show data.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getCreditCardList

Lists stored credit cards.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
pageSizeStringOptional: The number of resources to list, starting with the specified page. Default: 10.
pageStringOptional: The number of pages to get. Default: 1.
startTimeDatepickerOptional: The date and time when the resource was created in ISO8601 date-time format that indicates the start of a range of results. For example, 2013-11-05T13:15:30Z.
endTimeDatepickerOptional: The date and time when the resource was created in ISO8601 date-time format that indicates the end of a range of results. For example, 2014-11-05T13:15:30Z.
sortOrderStringOptional: Sorts the response in ascending or descending order. Value is asc for ascending order or desc for descending order. Default: desc.
sortByStringOptional: Sorts the response by create_time or update_time. Default: create_time.
merchantIdStringOptional: A user-provided, optional field that functions as a unique identifier for the merchant holding the card. Note that this has no relation to PayPal merchant ID.
externalCardIdStringOptional: A unique identifier of the bank account resource. Generated and provided by the facilitator to use to restrict the usage of the bank account to the specific merchant.
externalCustomerIdStringOptional: Externally provided customer identifier to filter the search results in list operations.
totalRequiredStringOptional: Indicates whether the response returns the total_items and total_pages values. Default is true. Set to false to omit these values from the response.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updateCreditCard

Updates a stored credit card, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
creditCardIdStringRequired: The ID of the credit card resource to update.
itemsJSONRequired: Array of json objects. A JSON patch object used for applying partial updates to resources.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

items format:

[
    {
      "op": "replace",
      "path": "/billing_address",
      "value": {
        "line1": "111 First Street",
        "city": "Saratoga",
        "country_code": "US",
        "state": "CA",
        "postal_code": "95070"
      }
    }
]

Paypal.createTokenFromAurhorizationCode

Updates a stored credit card, by ID.

FieldTypeDescription
clientIdcredentialsRequired: Client id.
secretcredentialsRequired: secret
grantTypeStringRequired: Token grant type. Value must be set to authorization_code.
codeStringRequired: Authorization code previously received from the authorization server.
redirectUriStringRequired: Application return URL where the authorization code is sent.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createTokenFromRefreshToken

Create an access token from a refresh token.

FieldTypeDescription
clientIdcredentialsRequired: Client id.
secretcredentialsRequired: secret
grantTypeStringRequired: Token grant type. Value must be set to authorization_code.
refreshTokenStringRequired: Refresh token previously received along with the access token that is to be refreshed.
scopeStringOptional: Resource URL endpoints that the client wants the token to be scoped for. The value of the scope parameter is expressed as a list of space-delimited, case-sensitive strings.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getUser

Use this call to retrieve user profile attributes.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
schemaStringRequired: the schema that is used to return as per openidconnect protocol. Possible values: openid.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createInvoice

Creates a draft invoice.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
merchantInfoJSONRequired: Json object. Merchant business information that appears on the invoice.
numberStringOptional: The unique invoice number. If you omit this number, it is auto-incremented from the previous invoice number. Maximum length: 25.
templateIdStringOptional: The ID of the template from which to create the invoice. Useful for copy functionality.
billingInfoJSONOptional: Array of json objects. Billing information for the invoice recipient.
ccInfoJSONOptional: Array of json objects. Participant information.
shippingInfoJSONOptional: Json object. Shipping information for the invoice recipient.
itemsJSONOptional: Array of json objects. Line item information.
invoiceDateStringOptional: The date when the invoice was enabled. The date format is yyyy-MM-dd z.
paymentTermJSONOptional: Json object. The payment term of the invoice. If you specify term_type, you cannot specify due_date, and vice versa.
referenceStringOptional: Reference data, such as PO number, to add to the invoice. Maximum length: 60.
discountJSONOptional: Json object. The cost as a percent or an amount value. For example, to specify 10%, enter 10. Alternatively, to specify an amount of 5, enter 5.
shippingCostJSONOptional: Json object. Shipping cost, as a percent or an amount value.
customJSONOptional: Json object. The custom amount to apply to an invoice. If you include a label, you must include a custom amount.
allowPartialPaymentStringOptional: Indicates whether the invoice allows a partial payment. If false, invoice must be paid in full. If true, the invoice allows partial payments. Default is false.
minimumAmountDueJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
taxCalculatedAfterDiscountStringOptional: Indicates whether the tax is calculated before or after a discount. If false, the tax is calculated before a discount. If true, the tax is calculated after a discount. Default is false.
taxInclusiveStringOptional: Indicates whether the unit price includes tax. Default is false.
termsStringOptional: The general terms of the invoice. Maximum length: 4000.
noteStringOptional: A note to the payer. Maximum length: 4000.
merchantMemoStringOptional: A private bookkeeping memo for the merchant. Maximum length: 150.
logoUrlStringOptional: The full URL to an external logo image. Maximum length: 4000.
attachmentsJSONOptional: The array of files attached to an invoice or template.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

merchantInfo format:

{
    "email": "[email protected]",
    "first_name": "Dennis",
    "last_name": "Doctor",
    "business_name": "Medical Professionals, LLC",
    "phone": {
      "country_code": "001",
      "national_number": "5032141716"
    },
    "address": {
      "line1": "1234 Main St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97217",
      "country_code": "US"
    }
}

billingInfo format:

[
    {
      "email": "[email protected]"
    }
]

ccInfo format:

{
    "email": "[email protected]",
    "first_name": "Dennis",
    "last_name": "Doctor",
    "business_name": "Medical Professionals, LLC",
    "phone": {
      "country_code": "001",
      "national_number": "5032141716"
    },
    "address": {
      "line1": "1234 Main St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97217",
      "country_code": "US"
    }
}

shippingInfo format:

{
    "first_name": "Sally",
    "last_name": "Patient",
    "business_name": "Not applicable",
    "phone": {
      "country_code": "001",
      "national_number": "5039871234"
    },
    "address": {
      "line1": "1234 Broad St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97216",
      "country_code": "US"
    }
}

items format:

[
    {
      "name": "Sutures",
      "quantity": 100,
      "unit_price": {
        "currency": "USD",
        "value": "5"
      }
    }
]

paymentTerm format:

{
    "term_type": "NET_45"
}

discount format:

{
    "percent": "5"
}

shippingCost format:

{
    YOUR_SHIPPING_COST_JSON_OBJECT
}

custom format:

{
    YOUR_CUSTOM_JSON_OBJECT
}

minimumAmountDue format:

{
    YOUR_MINIMAL_AMOUNT_DUE_JSON_OBJECT
}

Paypal.sendInvoice

Sends an invoice, by ID, to a customer.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice to send.
notifyMerchantStringOptional: Indicates whether to send the invoice update notification to the merchant. Default is true.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updateInvoice

Updates an invoice, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice to update.
merchantInfoJSONRequired: Json object. Merchant business information that appears on the invoice.
notifyMerchantStringOptional: Indicates whether to send the invoice update notification to the merchant. Default is true.
numberStringOptional: The unique invoice number. If you omit this number, it is auto-incremented from the previous invoice number. Maximum length: 25.
templateIdStringOptional: The ID of the template from which to create the invoice. Useful for copy functionality.
billingInfoJSONOptional: Array of json objects. Billing information for the invoice recipient.
ccInfoJSONOptional: Array of json objects. Participant information.
shippingInfoJSONOptional: Json object. Shipping information for the invoice recipient.
itemsJSONOptional: Array of json objects. Line item information.
invoiceDateDatepickerOptional: The date when the invoice was enabled. The date format is yyyy-MM-dd z.
paymentTermJSONOptional: Json object. The payment term of the invoice. If you specify term_type, you cannot specify due_date, and vice versa.
referenceStringOptional: Reference data, such as PO number, to add to the invoice. Maximum length: 60.
discountJSONOptional: Json object. The cost as a percent or an amount value. For example, to specify 10%, enter 10. Alternatively, to specify an amount of 5, enter 5.
shippingCostJSONOptional: Json object. Shipping cost, as a percent or an amount value.
customJSONOptional: Json object. The custom amount to apply to an invoice. If you include a label, you must include a custom amount.
allowPartialPaymentStringOptional: Indicates whether the invoice allows a partial payment. If false, invoice must be paid in full. If true, the invoice allows partial payments. Default is false.
minimumAmountDueJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
taxCalculatedAfterDiscountStringOptional: Indicates whether the tax is calculated before or after a discount. If false, the tax is calculated before a discount. If true, the tax is calculated after a discount. Default is false.
taxInclusiveStringOptional: Indicates whether the unit price includes tax. Default is false.
termsStringOptional: The general terms of the invoice. Maximum length: 4000.
noteStringOptional: A note to the payer. Maximum length: 4000.
merchantMemoStringOptional: A private bookkeeping memo for the merchant. Maximum length: 150.
logoUrlStringOptional: The full URL to an external logo image. Maximum length: 4000.
attachmentsJSONOptional: The array of files attached to an invoice or template.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

merchantInfo format:

{
    "email": "[email protected]",
    "first_name": "Dennis",
    "last_name": "Doctor",
    "business_name": "Medical Professionals, LLC",
    "phone": {
      "country_code": "001",
      "national_number": "5032141716"
    },
    "address": {
      "line1": "1234 Main St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97217",
      "country_code": "US"
    }
}

billingInfo format:

[
    {
      "email": "[email protected]"
    }
]

ccInfo format:

{
    "email": "[email protected]",
    "first_name": "Dennis",
    "last_name": "Doctor",
    "business_name": "Medical Professionals, LLC",
    "phone": {
      "country_code": "001",
      "national_number": "5032141716"
    },
    "address": {
      "line1": "1234 Main St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97217",
      "country_code": "US"
    }
}

shippingInfo format:

{
    "first_name": "Sally",
    "last_name": "Patient",
    "business_name": "Not applicable",
    "phone": {
      "country_code": "001",
      "national_number": "5039871234"
    },
    "address": {
      "line1": "1234 Broad St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97216",
      "country_code": "US"
    }
}

items format:

[
    {
      "name": "Sutures",
      "quantity": 100,
      "unit_price": {
        "currency": "USD",
        "value": "5"
      }
    }
]

paymentTerm format:

{
    "term_type": "NET_45"
}

discount format:

{
    "percent": "5"
}

shippingCost format:

{
    YOUR_SHIPPING_COST_JSON_OBJECT
}

custom format:

{
    YOUR_CUSTOM_JSON_OBJECT
}

minimumAmountDue format:

{
    YOUR_MINIMAL_AMOUNT_DUE_JSON_OBJECT
}

Paypal.getInvoice

Shows details for an invoice, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice to update.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getInvoiceList

Lists invoices that belong to the merchant who makes the call.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
pageStringOptional: A zero-relative index of the list of merchant invoices. Default: 1.
pageSizeStringOptional: The number of invoices to list beginning with the specified page. Default: 10.
totalCountRequiredStringOptional: Indicates whether the total count appears in the response. Default is false.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.generateInvoiceNumber

Generates the next invoice number that is available to the user.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.searchInvoice

Lists invoices that match search criteria.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
emailStringOptional: The initial letters of the email address.
recipientFirstNameStringOptional: The initial letters of the recipient first name.
recipientLastNameStringOptional: The initial letters of the recipient last name.
recipientBusinessNameStringOptional: The initial letters of the recipient business name.
numberStringOptional: The invoice number.
statusStringOptional: The invoice status. Allowed values: DRAFT, SENT, PAID, MARKED_AS_PAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, MARKED_AS_REFUNDED.
lowerTotalAmountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
upperTotalAmountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
startInvoiceDateDatepickerOptional: The start date for the invoice. Date format is yyyy-MM-dd z.
endInvoiceDateDatepickerOptional: The end date for the invoice. Date format is yyyy-MM-dd z.
startDueDateDatepickerOptional: The start due date for the invoice. Date format is yyyy-MM-dd z.
endDueDateDatepickerOptional: The end due date for the invoice. Date format is yyyy-MM-dd z.
startPaymentDateDatepickerOptional: The start payment date for the invoice. Date format is yyyy-MM-dd z.
endPaymentDateDatepickerOptional: The end payment date for the invoice. Date format is yyyy-MM-dd z.
startCreationDateDatepickerOptional: The start creation date for the invoice. Date format is yyyy-MM-dd z.
endCreationDateDatepickerOptional: The end creation date for the invoice. Date format is yyyy-MM-dd z.
pageStringOptional: The offset for the search results.
pageSizeStringOptional: The page size for the search results.
totalCountRequiredStringOptional: Indicates whether the total count appears in the response. Default is false.
archivedStringOptional: Indicates whether to list merchant-archived invoices in the response. If true, response lists only merchant-archived invoices. If false, response lists only unarchived invoices. If null, response lists all invoices.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

lowerTotalAmount format:

{
    "currency": "USD",
    "value": "5"
}

upperTotalAmount format:

{
    "currency": "USD",
    "value": "5"
}

Paypal.sendInvoiceReminder

Sends a reminder to the payer that a payment is due for an invoice, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice.
subjectStringRequired: The subject of the notification.
noteStringRequired: A note to the payer.
sendToMerchantStringRequired: Indicates whether to send a copy of the email to the merchant. True or false.
ccEmailsJSONOptional: An json array of one or more Cc: emails.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

ccEmails format:

[
    "[email protected]"
]

Paypal.deleteInvoice

Deletes a draft invoice, by ID. Note that this call works for invoices in the draft state only.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getQRCode

Generates a QR code for an invoice, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice.
widthStringOptional: The width, in pixels, of the QR code image. Valid value is from 150 to 500. Default is 500.
heightStringOptional: The height, in pixels, of the QR code image. Valid value is from 150 to 500. Default is 500.
actionStringOptional: The type of URL for which to generate a QR code. Default is pay and is the only supported value.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getTemplate

Shows details for a template, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
templateIdStringRequired: The ID of the template for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getTemplateList

Lists all merchant-created templates. The list shows the emails, addresses, and phone numbers from the merchant profile.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
fieldsStringOptional: The fields to return in the response. Value is all or none. Specify none to return only the template name, ID, and default attributes. Default: all.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createWebProfile

Creates a web experience profile.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
nameStringRequired: Name of the web experience profile. Unique among only the profiles for a given merchant.
flowConfigJSONOptional: Json object. Parameters for flow configuration.
inputFieldsJSONOptional: Json object. Parameters for input fields customization.
presentationJSONOptional: Json object. Parameters for style and presentation.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

flowConfig format:

{
  "landing_page_type": "billing",
  "bank_txn_pending_url": "http://www.ebay.com"
}

inputFields format:

{
  "no_shipping": 1,
  "address_override": 1
}

presentation format:

{
  "logo_image": "http://www.ebay.com"
}

Paypal.getWebProfile

Shows details for a web experience profile, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
profileIdStringRequired: ID of the profile to retrieve.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getProfileWebList

Lists web experience profiles for a merchant.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updateWebProfile

Updates a web experience profile, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
profileIdStringRequired: ID of the profile to update.
nameStringRequired: Name of the web experience profile. Unique among only the profiles for a given merchant.
flowConfigJSONOptional: Json object. Parameters for flow configuration.
inputFieldsJSONOptional: Json object. Parameters for input fields customization.
presentationJSONOptional: Json object. Parameters for style and presentation.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

flowConfig format:

{
  "landing_page_type": "billing",
  "bank_txn_pending_url": "http://www.ebay.com"
}

inputFields format:

{
  "no_shipping": 1,
  "address_override": 1
}

presentation format:

{
  "logo_image": "http://www.ebay.com"
}

Paypal.deleteWebProfile

Deletes a web experience profile, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
profileIdStringRequired: ID of the profile to update.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createWebhook

Subscribes your webhook listener to events.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
urlStringRequired: The URL that is configured to listen on localhost for incoming POST notification messages that contain event information.
eventTypesJSONRequired: Array of json objects. A list of events.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

eventTypes format:

[
    {
      "name": "PAYMENT.AUTHORIZATION.CREATED"
    },
    {
      "name": "PAYMENT.AUTHORIZATION.VOIDED"
    }
]

Paypal.getWebhook

Shows details for a webhook, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
webhookIdStringRequired: aThe ID of the webhook for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getWebhookList

Lists all webhooks.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
anchorTypeStringOptional: Filters the response by an entity type, anchor_id. Value is APPLICATION or ACCOUNT. Default is APPLICATION.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updateWebhook

Updates a webhook, by ID. Supports only the replace operation.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
webhookIdStringRequired: The ID of the webhook to update.
itemsJSONRequired: Array of json objects. A JSON patch object that you can use to apply partial updates to resources.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

items format:

[
  {
    "op": "replace",
    "path": "/url",
    "value": "http://www.ebay.com/paypal_webhook_new_url"
  },
  {
    "op": "replace",
    "path": "/event_types",
    "value": [
      {
        "name": "PAYMENT.SALE.REFUNDED"
      }
    ]
  }
]

Paypal.deleteWebhook

Deletes a webhook, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
webhookIdStringRequired: The ID of the webhook to update.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getEventNotifications

Shows details for an event notification, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
eventIdStringRequired: The ID of the webhook event notification for which to show details.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getEventNotificationsList

Lists webhook event notifications. You can specify one or more optional query parameters to filter the response.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
pageSizeStringOptional: The number of webhook event notifications to return in the response. Default: 10.
startTimeDatepickerOptional: Filters the webhook event notifications in the response to those created on or after this date and time and on or before the endTime value.
endTimeDatepickerOptional: Filters the webhook event notifications in the response to those created on or after the startTime and on or before this date and time.
transactionIdStringOptional: Filters the response to a single transaction, by ID.
eventTypeStringOptional: Filters the response to a single event.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.resendEventNotification

Resends an event notification, by event ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
eventIdStringRequired: The ID of the webhook event notification to resend.
webhookIdsStringRequired: A list of webhook account IDs.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getEventList

Lists events to which an app can subscribe.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.getWebhookEventSubscriptionList

Lists the event subscriptions for a webhook, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
webhookIdStringRequired: The ID of the webhook for which to list subscriptions.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.simulateWebhookEvent

Simulates a webhook event by using a sample payload.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
eventTypeStringRequired: The event name. Specify one of the subscribed events. For each request, provide only one event.
webhookIdStringOptional: The ID of the webhook. If omitted, the URL is required.
urlStringOptional: The URL for the webhook endpoint. If omitted, the webhook ID is required.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.cancelSentInvoice

Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and Cc: emails.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice to cancel.
subjectStringOptional: The subject of the notification.
noteStringOptional: A note to the payer.
sendToMerchantStringOptional: Indicates whether to send the notification to the merchant.
sendToPayerStringOptional: Indicates whether to send the notification to the payer.
ccEmailsJSONOptional: An array of one or more Cc: emails. If you omit this parameter from the JSON request body, a notification is sent to all Cc: email addresses that are part of the invoice. Otherwise, specify this parameter to limit the email addresses to which a notification is sent.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

ccEmails format:

[
    "[email protected]"
]

Paypal.markInvoiceAsPaid

Marks an invoice, by ID, as paid.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice to cancel.
methodStringRequired: The payment mode or method. Required with the EXTERNAL payment type. Value is bank transfer, cash, check, credit card, debit card, PayPal, wire transfer, or other. Allowed values: BANK_TRANSFER, CASH, CHECK, CREDIT_CARD, DEBIT_CARD, PAYPAL, WIRE_TRANSFER, OTHER.
dateStringOptional: The date when the invoice was paid. The date format is yyyy-MM-dd z
noteStringOptional: A note associated with the payment.
amountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "currency": "USD",
    "value": "20.00"
}

Paypal.markInvoiceAsRefunded

Marks an invoice, by ID, as refunded.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice.
dateDatepickerOptional: The date when the invoice was paid. The date format is yyyy-MM-dd z
noteStringOptional: A note associated with the payment.
amountJSONOptional: Json object. Base object for all financial value related fields (balance, payment due, etc.)
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

amount format:

{
    "currency": "USD",
    "value": "20.00"
}

Paypal.deleteExternalPayment

Deletes an external payment transaction, by ID, from an invoice, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice from which to delete a payment transaction.
transactionIdStringRequired: The ID of the payment transaction to delete.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.deleteExternalRefund

Deletes an external refund transaction, by ID, from an invoice, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
invoiceIdStringRequired: The ID of the invoice from which to delete the refund transaction.
transactionIdStringRequired: The ID of the refund transaction to delete.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.createTemplate

Creates an invoice template. When you create an invoice from a template, the invoice is populated with the predefined data that the source template contains.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
nameStringRequired: The template name.
defaultStringRequired: Indicates whether this template is the default merchant template. A merchant can have one default template. True or false
templateDataJSONRequired: Json object. Detailed template information.
settingsJSONRequired: Array of json objects. Template settings.
unitOfMeasureStringRequired: The unit of measure for the template. Value is quantity, hours, or amount.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

templateData format:

{
    "items": [
      {
        "name": "Nutri Bullet",
        "quantity": 1,
        "unit_price": {
          "currency": "USD",
          "value": "50.00"
        }
      }
    ],
    "merchant_info": {
      "email": "[email protected]"
    },
    "tax_calculated_after_discount": false,
    "tax_inclusive": false,
    "note": "Thank you for your business.",
    "logo_url": "https://pics.paypal.com/v1/images/redDot.jpeg"
}

settings format:

[
    {
      "field_name": "items.date",
      "display_preference": {
        "hidden": true
      }
    },
    {
      "field_name": "custom",
      "display_preference": {
        "hidden": true
      }
    }
]

Paypal.deleteTemplate

Deletes a template, by ID.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
templateIdStringRequired: The ID of the template to delete.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.verifyWebhookSignature

Verifies a webhook signature.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
authAlgoStringRequired: The algorithm that PayPal uses to generate the signature and that you can use to verify the signature. Extract this value from the PAYPAL-AUTH-ALGO response header, which is received with the webhook notification.
certUrlStringRequired: The X.509 public key certificate. Download the certificate from this URL and use it to verify the signature. Extract this value from the PAYPAL-CERT-URL response header, which is received with the webhook notification.
transmissionIdStringRequired: The ID of the HTTP transmission. Contained in the PAYPAL-TRANSMISSION-ID header of the notification message.
transmissionSigStringRequired: The PayPal-generated asymmetric signature. Extract this value from the PAYPAL-TRANSMISSION-SIG response header, which is received with the webhook notification.
transmissionTimeStringRequired: The date and time of the HTTP transmission. Contained in the PAYPAL-TRANSMISSION-TIME header of the notification message.
webhookIdStringRequired: The ID of the webhook as configured in your Developer Portal account.
webhookEventStringRequired: A webhook event notification.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

Paypal.updateTemplate

Updates a template, by ID. In the JSON request body, pass a complete template object. The update method does not support partial updates.

FieldTypeDescription
accessTokenStringRequired: accessToken obtained with clientId and secret.
templateIdStringRequired: The ID of the template to update.
nameStringRequired: The template name.
defaultStringRequired: Indicates whether this template is the default merchant template. A merchant can have one default template. True or false
templateDataJSONRequired: Json object. Detailed template information.
settingsJSONRequired: Array of json objects. Template settings.
unitOfMeasureStringRequired: The unit of measure for the template. Value is quantity, hours, or amount.
sandboxStringThe PayPal Sandbox is a self-contained, virtual testing environment that mimics the live PayPal production environment. It provides a shielded space where you can initiate and watch your application process the requests you make to the PayPal APIs without touching any live PayPal accounts.

templateData format:

{
    "items": [
      {
        "name": "Nutri Bullet",
        "quantity": 1,
        "unit_price": {
          "currency": "USD",
          "value": "50.00"
        }
      }
    ],
    "merchant_info": {
      "email": "[email protected]"
    },
    "tax_calculated_after_discount": false,
    "tax_inclusive": false,
    "note": "Thank you for your business.",
    "logo_url": "https://pics.paypal.com/v1/images/redDot.jpeg"
}

settings format:

[
    {
      "field_name": "items.date",
      "display_preference": {
        "hidden": true
      }
    },
    {
      "field_name": "custom",
      "display_preference": {
        "hidden": true
      }
    }
]
x
circle
PayPal
$ / m
We will charge your card every month for the plan amount, as well as any overages incurred in the previous month.
?

Oops, we are missing some details

Looks like there are a few missing details that you haven't filled in yet.
These details are important and will help us protect you and let you know about anything new.

x

Why sign up to RapidAPI?

  • integrate
    Integrate APIs into your app
    Ruby, Java, Elixir, Node.js, Phyton, Objective C, Swift, PHP and MORE
  • keys
    Save all API keys in one place
  • notifications
    Get notifications about API changes
  • stats
    Get stats and monitor API connections
__SING_UP_WITH_GITHUB__
__SING_UP_WITH_FACEBOOK__
__SING_UP_WITH_GOOGLE__
  • We're not going to post anything on your wall.
  • We're not planning to spam you.
  • esccloses this view
    x

    Authentication

    Authenticate
    esccloses this view