# Get payment methods and processors

This endpoint returns a complete list of activated payment methods in the Salesforce org and the payment processors configured to process those methods.

Endpoint: GET /PaymentMethods
Version: v2
Security: Salesforce_Production, Salesforce_Sandbox

## Response 200 fields (application/json):

  - `PaymentMethods` (object)

  - `PaymentMethods.Name` (string)
    The name of the payment method, e.g. DirectDebit, CreditCard or Ideal.
    Example: "DirectDebit"

  - `PaymentMethods.Processors` (array)
    A list of the payment processors that can be used to process payments with this payment method. Each entry includes details about
the processor-method combination, like whether it supports recurring payments and additional parameters.

  - `PaymentMethods.Processors.Name` (string)
    The name of the payment processor.
    Example: "PaymentHub-SEPA"

  - `PaymentMethods.Processors.IsDefault` (boolean)
    Indicates whether this is the default payment processor for the payment method. If no payment processor is passed in a payment intent message, the default
processor is used to process payments with this method.
    Example: true

  - `PaymentMethods.Processors.Targets` (array)
    The names of all targets (bank accounts) that are configured for this payment processor. Currently only
targets for native FinDock processors are returned.
    Example: [{"publicTarget":"PaymentHub-SEPA","Name":"Main SEPA Account"},{"publicTarget":"PaymentHub-SEPA","Name":"Region One SEPA Account"},{"publicTarget":"PaymentHub-SEPA","Name":"Region Two SEPA Account"}]

  - `PaymentMethods.Processors.Parameters` (object)

  - `PaymentMethods.Processors.Parameters.Required` (boolean)
    Indicates if the parameter is required.
    Example: true

  - `PaymentMethods.Processors.Parameters.Name` (string)
    The name of the parameter.
    Example: "iban"

  - `PaymentMethods.Processors.Parameters.Description` (string)
    A description of the purpose of the parameter.
    Example: "The IBAN of the payer's bank account."

  - `PaymentMethods.Processors.Parameters.DataType` (string)
    The data type of the parameter.
    Example: "String"

  - `PaymentMethods.Processors.Parameters.Enum` (array)
    List of possible values and, if applicable, labels and images to be used in front-end application. Only passed when DataType is Enum.

  - `PaymentMethods.Processors.SupportsRecurring` (boolean)
    Indicates if the payment processor supports recurring payments with this payment method.
    Example: true

  - `PaymentMethods.Processors.InitialPaymentOnRecurring` (string)
    Indicates whether the payment processor supports or requires an initial payment (OneTime object) for a recurring payment payment intent.
This field replaces RecurringRequiresInitialPayment.
    Enum: "required", "optional", "unsupported"

  - `PaymentMethods.Processors.RecurringRequiresInitialPayment` (boolean)
    Old way to indicate of the payment processor requires an initial payment (OneTime object) for a recurring payment. Replaced by InitialPaymentOnRecurring.

## Response 422 fields (application/json):

  - `error_code` (integer, required)
    Example: 999

  - `error_message` (string, required)
    Example: "An unexpected error occurred. Please contact FinDock Support for assistance."


