# GetFundingPlans API Operation (/archive/adaptive-payments/api/get-funding-plans)



> **Note:** **Important:** Adaptive Payments is not available for new integrations. PayPal provides this documentation to support existing integrations. If you're starting an integration, [we recommend our latest solutions](https://www.paypal.com/us/business/accept-payments).

Determines the available funding sources for a payment, identified by its key, which takes into account the preferences and country of the receiver as well as the payment amount. You must be both the sender of the payment and the caller of this API operation

## GetFundingPlans Overview [#getfundingplans-overview]

To obtain the funding plans for a payment, specify values for the following fields:

### Table 1 .  Required fields [#table-1---required-fields]

| Field<br />                           | Description<br />                                                                     |
| ------------------------------------- | ------------------------------------------------------------------------------------- |
| `payKey`<br />                        | The key used to create the payment whose funding sources you want to determine.<br /> |
| `requestEnvelope.errorLanguage`<br /> | The code for the language in which errors are returned, which must be `en_US`.<br />  |

### Additional Notes About the Pay API Operation [#additional-notes-about-the-pay-api-operation]

1. The GetFundingPlans API operation is only available for implicitly approved payments, meaning you must be both the sender and the caller of the Pay API operation identified by the pay key.

## GetFundingPlansRequest Message [#getfundingplansrequest-message]

### GetFundingPlansRequest Fields [#getfundingplansrequest-fields]

| Field<br />             | Description<br />                                                                                                                                                 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payKey`<br />          | `xs:string`<br /&#x3E; &#x2A;(Required)* The key used to create the payment whose funding sources you want to determine.<br />                                    |
| `requestEnvelope`<br /> | `common:requestEnvelope`<br /&#x3E; &#x2A;(Required)* Information common to each API operation, such as the language in which an error message is returned.<br /> |

### RequestEnvelope Fields [#requestenvelope-fields]

| Field<br />           | Description<br />                                                                                                                                                                                                             |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `detailLevel`<br />   | `common:DetailLevelCode`<br /&#x3E; &#x2A;(Optional)* Level of detail required by the client application for components. Value is:<br /> <br />`ReturnAll` — This value provides the maximum level of detail (default).<br /> |
| `errorLanguage`<br /> | `xs:string`<br /&#x3E; &#x2A;(Required)* RFC 3066 language in which error messages are returned; by default it is `en_US`, which is the only language currently supported.<br />                                              |

## GetFundingPlansResponse Message [#getfundingplansresponse-message]

### GetFundingPlansResponse Fields [#getfundingplansresponse-fields]

| Field<br />              | Description<br />                                                                                                                |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `FundingPlan`<br />      | `ap:FundingPlan`<br /> One or more available funding sources for this payment.<br />                                             |
| `responseEnvelope`<br /> | `common:ResponseEnvelope`<br /> Common response information, including a timestamp and the response acknowledgment status.<br /> |

### FundingPlan Fields [#fundingplan-fields]

| Field<br />                 | Description                                                                                   |
| --------------------------- | --------------------------------------------------------------------------------------------- |
| `fundingPlanId`<br />       | `xs:string`<br /> ID for this funding plan.<br />                                             |
| `fundingAmount`<br />       | `common:CurrencyType`<br /> Amount of available funding.<br />                                |
| `backupFundingSource`<br /> | `ap:FundingSource`<br /> Backup funding source.<br />                                         |
| `senderFees`<br />          | `common:CurrencyType`<br /> Fees to be paid by the sender.<br />                              |
| `currencyConversion`<br />  | `ap:CurrencyConversion`<br /> The currency conversion associated with the funding plan.<br /> |
| `charge`<br />              | `ap:FundingPlanCharge`<br /> The amount to be charged to this funding plan.<br />             |

### CurrencyType Fields [#currencytype-fields]

| Field<br />    | Description<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amount`<br /> | `xs:decimal`<br /> The converted amount.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `code`<br />   | `xs:string`<br /> The currency code for the converted amount. Value is:<br /> Australian Dollar — `AUD`<br />Brazilian Real — `BRL`<br />  > **Note:** &#x2A;*Note:** This currency is supported as a payment currency and a currency balance for in-country PayPal accounts only.  If the receiver of funds is not from Brazil, then PayPal converts funds into the primary holding currency of the account with the applicable currency conversion rate.  The currency conversion rate includes PayPal's applicable spread or fee.Canadian Dollar — `CAD`<br />Czech Koruna — `CZK`<br />Danish Krone — `DKK`<br />Euro — `EUR`<br />Hong Kong Dollar — `HKD`<br />Hungarian Forint — `HUF`<br />Israeli New Shekel — `ILS`<br />Japanese Yen — `JPY`<br />Malaysian Ringgit — `MYR`<br />  > **Note:** &#x2A;*Note:** The Ringgit is supported as a payment currency and currency balance only for Malaysian PayPal accounts.Mexican Peso — `MXN`<br />Norwegian Krone — `NOK`<br />New Zealand Dollar — `NZD`<br />Philippine Peso — `PHP`<br />Polish Zloty — `PLN`<br />Pound Sterling — `GBP`<br />Singapore Dollar — `SGD`<br />Swedish Krona — `SEK`<br />Swiss Franc — `CHF`<br />Taiwan New Dollar — `TWD`<br />Thai Baht — `THB`<br />U.S. Dollar — `USD`<br /> |

### FundingSource Fields [#fundingsource-fields]

| Field<br />                     | Description                                                                                                                                                                                                                         |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lastFourOfAccountNumber`<br /> | `xs:string`<br /> Last 4 digits or characters in account number.<br />                                                                                                                                                              |
| `type`<br />                    | `xs:string`<br /> Type of funding source, which is one of the following values:.<br /> <br />`UNDEFINED`<br />`BALANCE`<br />`BANK_INSTANT`<br />`BANK_DELAYED`<br />`CREDITCARD`<br />`DEBITCARD`<br />`ACCOUNTS_RECEIVABLE`<br /> |
| `displayName`<br />             | `xs:string`<br /> Display name of funding source.<br />                                                                                                                                                                             |
| `fundingSourceId`<br />         | `xs:string`<br /> Funding source ID.<br />                                                                                                                                                                                          |
| `allowed`<br />                 | `xs:boolean`<br /> Whether the funding source is allowed for this payment:<br /> `true` — You can use this funding source for the payment<br />`false` — You cannot use this funding source (default)<br />                         |

### CurrencyConversion Fields [#currencyconversion-fields]

| Field<br />          | Description<br />                                                                        |
| -------------------- | ---------------------------------------------------------------------------------------- |
| `from`<br />         | `ap:CurrencyType`<br /> The currency to be converted.<br />                              |
| `to`<br />           | `ap:CurrencyType`<br /> The currency resulting from the conversion.<br />                |
| `exchangeRate`<br /> | `xs:decimal`<br /> The exchange rate for the `from` currency to the `to` currency.<br /> |

### ResponseEnvelope Fields [#responseenvelope-fields]

| Field<br />           | Description<br />                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ack`<br />           | `common:AckCode`<br /> Acknowledgment code. Value is:<br /> <br />`Success` — The operation completed successfully.<br />`Failure` — The operation failed.<br />`SuccessWithWarning` — The operation completed successfully; however, there is a warning message.<br />`FailureWithWarning` — The operation failed with a warning message.<br />            |
| `build`<br />         | `xs:string`<br /> Build number. It is used only by PayPal Merchant Technical Support.<br />                                                                                                                                                                                                                                                                 |
| `correlationId`<br /> | `xs:string`<br /> Correlation identifier. It is a 13-character, alphanumeric string (for example, `db87c705a910e`) that is used only by PayPal Merchant Technical Support.<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues. |
| `timestamp`<br />     | `xs:datetime`<br /> Date on which the response was sent, for example:<br /> `2012-04-02T22:33:35.774-07:00`<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.                                                                |

## PPFault Message [#ppfault-message]

The `PPFaultMessage` returns `ErrorData` and the `ResponseEnvelope` information to your application if an error occurs.

### FaultMessage Fields [#faultmessage-fields]

| Field<br />              | Description<br />                                                                                                                |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `error`<br />            | `common:ErrorData`<br /> Detailed error information.<br />                                                                       |
| `responseEnvelope`<br /> | `common:ResponseEnvelope`<br /> Common response information, including a timestamp and the response acknowledgment status.<br /> |

### ErrorData Fields [#errordata-fields]

| Field<br />         | Description<br />                                                                                                                                                                                                                                                 |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `category`<br />    | `common:ErrorCategory`<br /> The location where the error occurred.<br /> Value is:<br /> `System` — The system encountered errors; try again<br />`Application` — The application encountered errors; try again<br />`Request` — The request was incorrect<br /> |
| `domain`<br />      | `xs:string`<br /> The domain to which this service belongs.<br />                                                                                                                                                                                                 |
| `errorId`<br />     | `xs:long`<br /> A 6-digit number that uniquely identifies a particular error.<br />                                                                                                                                                                               |
| `exceptionID`<br /> | This field is not used.<br />                                                                                                                                                                                                                                     |
| `message`<br />     | `xs:string`<br /> A description of the error.<br />                                                                                                                                                                                                               |
| `parameter`<br />   | `common:ErrorParameter`<br /> Represents contextual information about the error.<br />                                                                                                                                                                            |
| `severity`<br />    | `common:ErrorSeverity`<br /> The severity of the error encountered.<br /> Value is:<br /> `Error` — Processing of the request was interrupted<br />`Warning` — Processing of the request was completed<br />                                                      |
| `subdomain`<br />   | This field is not used.<br />                                                                                                                                                                                                                                     |

### ResponseEnvelope Fields [#responseenvelope-fields-1]

| Field<br />           | Description<br />                                                                                                                                                                                                                                                                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ack`<br />           | `common:AckCode`<br /> Acknowledgment code. Value is:<br /> `Success` — The operation completed successfully.<br />`Failure` — The operation failed.<br />`SuccessWithWarning` — The operation completed successfully; however, there is a warning message.<br />`FailureWithWarning` — The operation failed with a warning message.<br />                  |
| `build`<br />         | `xs:string`<br /> Build number. It is used only by PayPal Merchant Technical Support.<br />                                                                                                                                                                                                                                                                 |
| `correlationId`<br /> | `xs:string`<br /> Correlation identifier. It is a 13-character, alphanumeric string (for example, `db87c705a910e`) that is used only by PayPal Merchant Technical Support.<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues. |
| `timestamp`<br />     | `xs:datetime`<br /> Date on which the response was sent, for example:<br /> `2012-04-02T22:33:35.774-07:00`<br />  > **Note:** &#x2A;*Note:** You must log and store this data for every response you receive. PayPal Technical Support uses the information to assist with reported issues.                                                                |

## GetFundingPlan Errors [#getfundingplan-errors]

| Code<br />   | Message<br />                                                                                                                                                                      | Additional Information<br /> |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| 520002       | Internal error                                                                                                                                                                     |                              |
| 520003<br /> | Authentication failed. API credentials are incorrect.<br />                                                                                                                        | Since 1.6.0<br />            |
| 540031<br /> | Operation is not permitted because the credentials do not match those of the initial operation<br />                                                                               | Since 1.6.0<br />            |
| 550001<br /> | User is not allowed to perform this action.<br />You are not allowed to get the funding plans for this key<br />You do not have permission to get these funding plan details<br /> | Since 1.6.0<br />            |
| 580001       | Invalid request: \<value>                                                                                                                                                          | Since 1.6.0<br />            |
| 580022<br /> | Invalid request parameter: \<value><br />Invalid request parameter: payKey with value \<value><br />                                                                               | Since 1.6.0<br />            |
| 580027       | This parameter is not supported                                                                                                                                                    | Since 1.6.0<br />            |
| 580029       | A pay key, transaction ID, or tracking ID is missing                                                                                                                               | Since 1.6.0                  |
| 580030<br /> | This transaction cannot be processed at this time. Please try again later.                                                                                                         | Since 1.3.0                  |
