younifyd
Menu

Find a list of eligible payment methods

Find a list of eligible payment methods.

POST/v2/payments/find-eligible-methods

Use it in a workflow

  1. Add a step and choose the PayPal connector.
  2. Pick the Find a list of eligible payment methods action (under Payments).
  3. Fill in the fields below, then reference the result from later steps as {{findAListOfEligiblePaymentMethods.response.data}}.

Request

Headers

Authorizationstring

Holds authorization information for external API calls.

PayPal-Auth-Assertionstring

Header for an API client-provided JWT assertion that identifies the merchant. Establishing the consent to act-on-behalf of a merchant is a prerequisite for using this header.

User-Agentstring

A characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent. API calls made by PayPal SDKs SHOULD be identified using this request header.

PayPal-Client-Metadata-Idstring

A GUID value originating from Fraudnet and Dyson passed from external API clients via HTTP header. The value is used by Risk decisions to correlate calls which, in turn, might result in lower decline rates..

Request body

Enter the body as JSON in the step's Body field.

customerobject

Customer who is making a purchase from the merchant/partner.

country_codeany
channelany
idstring

The unique ID for a customer in merchant's or partner's system of records.

emailstring

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>

phoneany
purchase_unitsarray<object>

Array of purchase units.

amountobject

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 equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_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>.

payeeobject

The merchant who receives the funds and fulfills the order. The merchant is also known as the payee.

preferencesobject

Preferences of merchant/partner consuming the API.

payment_flowstring

This field specifies the payment flow, expected to provide a hint about which payment action the customer is intending to perform.

One ofONE_TIME_PAYMENTRECURRING_PAYMENTVAULT_WITH_PAYMENTVAULT_WITHOUT_PAYMENT

include_account_detailsboolean

If this value is set to true, response will include confirmation if the customer has PayPal and/or Venmo accounts if they are eligible payment methods. Value defaults to false.

Default "false"

include_vault_tokensboolean

If this value is set to true, response will include vaulted token information if the eligible funding source has any instrument vaulted for the customer. Value defaults to false.

Default "false"

payment_source_constraintobject2 fields

Payment source constraint defines the payment methods that needs to be included/excluded for eligibility assessment. If not passed, all payment methods will be assessed for eligibility.

json
{
  "customer": {
    "country_code": null,
    "channel": null,
    "id": "string",
    "email": "string",
    "phone": null
  },
  "purchase_units": [
    {
      "amount": {},
      "payee": {}
    }
  ],
  "preferences": {
    "payment_flow": "ONE_TIME_PAYMENT",
    "include_account_details": "false",
    "include_vault_tokens": "false",
    "payment_source_constraint": {
      "constraint_type": "INCLUDE",
      "payment_sources": [
        "PAYPAL"
      ]
    }
  }
}

Response

Returns 200 with an object. Read it in later steps with {{findAListOfEligiblePaymentMethods.response.data.<field>}}.

eligible_methodsany
payment_tokensarray<any>

Payment tokens for vaulted instruments, if available. This object will be included only if include_vault_tokens is set to true in the request.

json
{
  "eligible_methods": null,
  "payment_tokens": [
    null
  ]
}

Need more? See the PayPal guide for connection setup and behaviour shared by every action.