# Payment Methods

In the intricate realm of online transactions, a versatile payment experience is essential. \
The `Payment Methods API` streamlines this process, allowing for effortless automation. by simply integrating with specified operation, [customer\_id](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#customer_id-string-optional), [currencies](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#currency_code-string-required), [payment gateway names](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) and desired [payment plugins](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins), merchant can harness the full power of Ottu's payment automation, all while keeping his existing environment intact. no extra effort, just seamless integration.

## [Quick Start](#quick-start)

Explore the capabilities of the Payment Methods API by hitting "Test it" below and testing its features yourself.&#x20;

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="quick-start/test-payment-methods">Test it</a></td></tr></tbody></table>

## [Setup](#setup)

#### [Enabling the Plugin](#enabling-the-plugin)

Ensure the relevant plugin ([E-Commerce](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins#e-commerce) or [Payment Request](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins#bulk-payment-request)) is activated in the Admin Panel under the Plugin Config section. For detailed activation steps, refer to the [Plugin Activation Guide](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins#adding-or-removing-plugins).

#### [Activating Payment Gateway Codes](#activating-payment-gateway-codes)

Activate the [payment gateway](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) ([pg\_codes](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#pg_codes-array-required)) you intend to use. Ensure all desired `pg_codes` are set to ‘`active`’ status in your configuration.

#### [Understanding the `type` Filter](#understanding-the-type-filter)

The `type` filter determines the mode of your environment:

* **Development Mode:** Configure the `type` to `sandbox` mode for conducting tests with sandbox transactions instead of live transactions.
* **Production Mode:** Set the `type` to `production` for handling real transactions in a live environment.

{% hint style="info" %}
Ensure you’re in the correct mode before initiating payments.
{% endhint %}

### [Boost Your Integration](#boost-your-integration)

To accelerate the integration process, consider using our official packages. These packages handle the heavy lifting involved in integrating with our API. They encapsulate much of the API interaction logic, allowing you to focus on core business logic.

**Available Packages:**

* **Python SDK:** Simplifies access to payment methods using a Pythonic interface, enhancing developer productivity by abstracting complex API calls. [Learn more](https://github.com/ottuco/ottu-py#accessing-the-payment-methods).
* **Django SDK:** Integrates payment methods seamlessly into Django projects, providing tools and utilities specific to Django, which streamline payment processes. [Explore details](https://github.com/ottuco/ottu-py?tab=readme-ov-file#django-integration).

While these packages offer substantial speed and convenience benefits, understanding the foundational concepts and structures outlined in the documentation is crucial. This ensures that you can effectively integrate and use the packages in a robust and maintainable manner.

## [Authentication](#authentication)

**Supported Methods**

* [Private API Key](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/authentication#private-key-api-key)
* [Basic Authentication](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/authentication#basic-authentication)

For detailed information on authentication procedures, please refer to the [Authentication documentation](#authentication).

## [Permissions](#permissions)

Ensuring the right level of access is crucial for maintaining the security and integrity of your payment processes. The `Payment Methods API` provides two authentication methods, each with its own set of permissions:

#### Private API Key

* **Privileges:** This method grants super admin privileges to the caller. It provides unrestricted access to all available payment methods and associated functionalities.
* **Usage:** Given its broad access, it’s essential to handle API keys with utmost care. Ensure they are securely stored and only shared with trusted individuals or systems.

#### BasicAuth

* **Privileges:** `BasicAuth` is user-centric, meaning it’s tied to a specific user profile. Access to payment methods can be restricted based on the user’s assigned permissions.
* **Setting Permissions:** To grant a user access to a specific payment method, assign the permission: "**Can use pg\_code**". Here, the [pg\_code](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#pg_codes-array-required) represents the unique code of the [payment gateway](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) or merchant ID (`MID`).\
  For instance, if you want to grant a user access to a payment gateway with the code ‘`credit-card`’, you would assign them the permission “**Can use Credit Card**”.
* **Usage:** Since `BasicAuth` is user-specific, it’s suitable for scenarios where you want to provide selective access to different payment methods based on user roles or responsibilities.

## [How it Works](#how-it-works)

The `Payment Methods API` is designed to streamline and automate the end-to-end integration with Ottu, ensuring that your payment processes remain up-to-date and efficient without the need for constant code modifications.

### [Purpose of the Payment Methods API](#purpose-of-the-payment-methods-api)

1. **Automation and Flexibility:** This API serves as a foundation for other Ottu APIs, providing the necessary data to facilitate seamless transactions. By using this API, you can ensure that your integration remains current, even when there are changes in the [payment gateway](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) configurations.
2. **Caching for Efficiency:** Given that the data from the `Payment Methods API` doesn’t change frequently, it’s recommended to cache the response for 24 hours. This approach enhances performance and reduces unnecessary API calls. However, ensure you have a mechanism to clear the cache when immediate updates are required.
3. **Tailored Customer Experience:** With various filters available, you can customize the payment methods presented to the customer. For instance, if you’re setting up a customer for recurring payments, you can filter out payment methods that don’t support [tokenization ](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/tokenization)using the `tokenizable`=`true` filter.
4. **Versatility:** The `Payment Methods API` isn’t just a prerequisite for the [Checkout API](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/checkout-api). It’s also essential for other APIs, such as the [User Cards API](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/user-cards).

### [Usage Scenarios](#usage-scenarios)

* **Currency-Specific Payments:** If you want to allow payments only in a specific currency, like USD, use the filter `currencies`=\["`USD`"]. This will return only the payment methods that support USD.
* **Recurring Payments:** When setting up a customer for recurring payments, use the `tokenizable`=`true` filter. This ensures that the customer can set up a recurring payment using methods that support tokenization.
* **Customized Payment Options:** If you have a history of the payment methods a customer has used, you can tailor the options presented to them during checkout. Instead of showing numerous payment methods, display only those they’ve used in the past.
* **Specific Payment Types:** For purchases where only specific payment types, like Debit Cards, should be allowed, use filters like `pg_names`=\["`knet`"] to retrieve only the desired payment methods.

#### Example:

To retrieve payment methods that support `USD` and `tokenization` for `e-commerce` purchases:

```json
POST: https://beta.ottu.net/b/pbl/v2/payment-methods/
{
    "plugin": "e-commerce",
    "operation": "purchase",
    "tokenizable": "true",
    "currencies": ["USD"]
}
```

This request will return the `"pg_codes": ["knet"]`, which can then be used in subsequent API calls.

**For a detailed breakdown of the API response, refer to the Open API block below.**

## Retrieve a list of payment methods based on filter values.

> This endpoint allows you to retrieve the available payment methods for a specific plugin, operation and customer. You can specify the desired filter field to get a list of payment methods that are supported and accessible.

```json
{"openapi":"3.1.1","info":{"title":"Ottu API","version":"1.0.0"},"servers":[{"url":"https://sandbox.ottu.net"}],"security":[{"SSO_BasicAuth":[]},{"basicAuth":[]},{"SSO_JWT_Auth":[]}],"components":{"securitySchemes":{"SSO_BasicAuth":{"type":"http","scheme":"basic"},"basicAuth":{"type":"http","scheme":"basic"},"SSO_JWT_Auth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PaymentMethodsRequest":{"type":"object","properties":{"plugin":{"type":"string","description":"Payment methods will be curated based on their compatibility with the specified plugin.","maxLength":50},"currencies":{"type":"array","items":{},"description":"Specify the three-letter ISO 4217 codes representing the desired currencies. Examples include USD for United States Dollar, EUR for Euro, and GBP for British Pound Sterling. Example: ['KWD','USD']"},"customer_id":{"type":"string","description":"If provided, `customer_payment_methods` will be filtered to show only those payment methods that have been successfully used with a paid payment attempts by this customer in the past.","maxLength":64},"operation":{"enum":["purchase","authorize"],"type":"string","description":"When specified, the available payment methods will be refined based on their compatibility with the indicated operation.\n\n* `purchase` - purchase\n* `authorize` - authorize"},"tokenizable":{"type":"boolean","description":"If defined, payment methods will be filtered based on supporting tokenization and auto-debit action."},"auto_debit":{"type":"boolean","description":"If defined, payment methods will be filtered based on supporting tokenization and auto-debit action."},"pg_names":{"type":"array","items":{},"description":"When provided, the payment methods will be narrowed down to those that support the specified payment gateway name. Example: ['kpay','mpgs']\n\nAvailable Values:<br><li>`abapayway` - ABA PayWay</li><br><li>`rajhi` - Alrajhi Bank</li><br><li>`amazon_pay` - Amazon Pay</li><br><li>`bambora` - Bambora</li><br><li>`benefit` - Benefit</li><br><li>`benefit_pay` - BenefitPay</li><br><li>`beyon_money` - BeyonMoney</li><br><li>`bookeey` - Bookeey</li><br><li>`burgan` - Burgan</li><br><li>`cod` - Cash</li><br><li>`cbk` - CBK</li><br><li>`ccavenues` - Ccavenues</li><br><li>`checkoutcom` - checkout.com</li><br><li>`cybersource` - CyberSource</li><br><li>`csuc` - Cybersource Unified Checkout</li><br><li>`dapi` - Dapi</li><br><li>`deema` - Deema</li><br><li>`doku` - Doku</li><br><li>`enet` - Enet</li><br><li>`fawry` - Fawry</li><br><li>`fiserv` - Fiserv</li><br><li>`fss` - FSS</li><br><li>`hesabe` - Hesabe</li><br><li>`hyperpay` - HyperPay</li><br><li>`kpay` - KNET</li><br><li>`moyasar` - Moyasar</li><br><li>`mpgs` - MPGS</li><br><li>`myfatoorah` - MyFatoorah</li><br><li>`ngenius` - N-Genius</li><br><li>`nbo` - NBO</li><br><li>`omannet` - OmanNet</li><br><li>`ottu_pg` - Ottu PG</li><br><li>`paymob` - PayMob</li><br><li>`payon` - PayOn</li><br><li>`paypal` - PayPal</li><br><li>`payu_india` - PayU India</li><br><li>`qpay` - Qpay</li><br><li>`skipcash` - Skip Cash</li><br><li>`smart_pay` - SmartPay</li><br><li>`sohar` - SoharInternational</li><br><li>`stcbahrain` - STC Bahrain</li><br><li>`stc_pay` - STC Pay</li><br><li>`tabby` - Tabby</li><br><li>`taly` - Taly</li><br><li>`tamara` - Tamara</li><br><li>`tap` - Tap Payments</li><br><li>`upayments` - UPayments</li><br><li>`upg` - UPG</li><br><li>`urpay` - URPay</li>"},"type":{"enum":["sandbox","production"],"type":"string","description":"When specified, the available payment methods will be refined based on their type determining if type is sandbox or production.\n\n* `sandbox` - sandbox\n* `production` - production"}},"required":["plugin"]},"PaymentMethodsResponse":{"type":"object","properties":{"customer_payment_methods":{"type":"array","items":{},"description":"Denotes a collection of payment gateways which used by user in successful payment attempts."},"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PGPaymentMethods"},"description":"Provides a comprehensive overview of the available payment gateways, delineated as distinct payment methods."}}},"PGPaymentMethods":{"type":"object","properties":{"code":{"type":"string","readOnly":true,"description":"Indicates the unique code associated with the payment gateway. This pivotal identifier facilitates transaction initiation through both the dashboard and API."},"name":{"type":"string","readOnly":true,"description":"Represents the payment gateway internal name defined in Ottu."},"is_sandbox":{"type":"boolean","readOnly":true,"description":"Indicates whether this payment gateway operates in a sandbox or production environment."},"logo":{"type":"string","format":"uri"},"wallets":{"type":"array","items":{},"readOnly":true,"default":["ApplePay","GooglePay"],"description":"Denotes a list of payment services linked with this payment gateway, such as `GooglePay` and `ApplePay`"},"default_currency":{"type":"string","readOnly":true,"default":"KWD","description":"Specifies the default currency code for the payment gateway, formatted according to ISO 4217."},"accepted_currencies":{"type":"array","items":{},"readOnly":true,"default":["KWD","USD"],"description":"Indicates a list of default accepted currencies for the payment gateway, each formatted in accordance with ISO 4217 standards."},"operation":{"type":"string","description":"Specifies the processing operation type for the payment method: either 'authorize' or 'purchase'. When set to `authorize`, successful transactions using this payment method will transition to the `authorize` state. Similarly, if set to `purchase`, they will follow the purchase flow."},"operations":{"type":"array","items":{},"default":["refund","void"],"readOnly":true,"description":"Specifies the payment operations that are available for this payment gateway."},"is_tokenizable":{"type":"boolean","description":"This flag indicates whether tokenization is enabled for this payment gateway. When set to true, it allows for the secure storage of payment details, enabling future transactions without the need for re-entering payment information."},"auto_debit_enabled":{"type":"boolean","description":"This flag indicates whether auto-debit operation enabled or not."}},"required":["accepted_currencies","auto_debit_enabled","code","default_currency","is_sandbox","is_tokenizable","logo","name","operation","operations","wallets"]},"FieldErrors":{"type":"object","properties":{"field_name":{"type":"array","items":{"type":"string","default":"This field is required."}}}},"GenericErrorMessage":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]}}},"paths":{"/b/pbl/v2/payment-methods/":{"post":{"operationId":"get_payment_methods","description":"This endpoint allows you to retrieve the available payment methods for a specific plugin, operation and customer. You can specify the desired filter field to get a list of payment methods that are supported and accessible.","summary":"Retrieve a list of payment methods based on filter values.","tags":["PaymentMethods API"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodsRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PaymentMethodsRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PaymentMethodsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodsResponse"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldErrors"}}},"description":""},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericErrorMessage"}}},"description":""}}}}}}
```

## [Guide](#guide)

The `Payment Methods API` provides a wealth of information about each available payment method. It’s not just about determining which payment methods are available; it’s about understanding the capabilities and features of each method in-depth.

#### Key insights you can glean from the API response include

* **Capabilities:** Understand what each payment method is capable of. This includes operations like [refunds](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/operations#refund), [voids](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/operations#void), and [captures](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/operations#capture).
* **Wallet Integrations:** Determine which payment methods support popular digital wallets like Apple Pay and Google Pay.
* **Supported Currencies:** Identify the currencies each payment method can handle. This is crucial for businesses operating in multi-currency environments.
* **And More:** The API provides a plethora of other details that can be instrumental in tailoring the payment experience for your customers.

With such granular control and detailed insights at your fingertips, you can truly customize and optimize the payment process to align with your specific business needs and offer an unparalleled payment experience to your customers.

### [Streamlining Checkout Process by Payment Methods API](#streamlining-checkout-process-by-payment-methods-api)

**Use Case:**

Streamlined Checkout Experience.

**Scenario:**&#x20;

An e-commerce merchants aim to simplify and accelerate the checkout process for their customers, ensuring that they're presented with the most relevant and up-to-date payment methods.

**Steps:**

1. #### Initiate the Payment Methods API

   Start by making a call to the `Payment Methods API`. This retrieves the most current and applicable payment methods based on specified parameters such as `customer_id`, `currency`, and `plugin`. For instance, to cater to online shoppers, you could use the plugin filter to retrieve only e-commerce payment methods.
2. #### Invoke the Checkout API

   Using the payment methods gleaned from the above step, you then call the [Checkout API](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/checkout-api). Here, you ensure the chosen payment method is passed to this API call. \
   For example, if the `Payment Methods API` returned '`PG001`' as an available payment method code, you would incorporate this code into the `Checkout API` call.
3. #### Outcome

   By integrating this automated process, customers experience a smoother checkout journey. As they proceed to payment, they're presented with the most current and applicable payment options, thereby enhancing their shopping experience and increasing the likelihood of transaction completions.

### [Payment Methods API Workflow Diagram](#payment-methods-api-workflow-diagram)

<figure><img src="https://documents.lucid.app/documents/cd77bada-241a-4e89-a9a7-8d62e631f669/pages/0_0?a=275&#x26;x=485&#x26;y=-223&#x26;w=353&#x26;h=594&#x26;store=1&#x26;accept=image%2F*&#x26;auth=LCA%206ff3c290a2d531335d860fc723b4d861ba7077e733a91948bace036dd449f88e-ts%3D1698044875" alt=""><figcaption></figcaption></figure>

### [**Use Cases Examples**](#use-cases-examples)

#### [**Use Case 1:** Expanding Payment Options ](#use-case-1-expanding-payment-options)

**Scenario:**&#x20;

A merchant aims to provide a diverse array of payment options to accommodate an extensive clientele, particularly those engaged in e-commerce for widespread product purchases.&#x20;

**Steps:**

1. #### The Merchant Initiate the Payment Methods API

   Call `Payment Methods API` to retrieve all available payment methods.
2. #### Using the API's Filters

   Utilize filters such as [customer\_id](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#customer_id-string-optional), [currency](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#currency_code-string-required), and [plugin](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins), the merchant selects and integrates desired payment methods into their platform in our case merchant should use plugin filter to get only e\_commerce payment methods.
3. #### Expanding Payment Choices

   As customers check out, they see a broader range of payment  options, increasing the likelihood of successful transactions.

***

#### [**Use Case 2:** Dynamic Payment Updates](#use-case-2-dynamic-payment-updates)

**Scenario:**&#x20;

The merchant's gateway settings or `MID` configuration has been changed, and they want these updates to be automatically reflected without manually intervening in the payment methods section they will show in customer checkout page.

**Steps:**

Once integrated with the `Payment Methods API`, any change in the gateway settings or `MID` configuration is auto-reflected in the merchant's payment methods section as Ottu will automatically return the updated details of payment method based on changes done on `MID.Merchants` don't have to initiate any manual updates; the API handles the seamless integration.

**Benefits:**

Reduces the manual work involved in updating payment methods. Ensures customers always have the latest and most secure payment options available.

***

#### [Use Case 3: Facilitating Subscription Payments with Tokenization Filter](#use-case-3-facilitating-subscription-payments-with-tokenization-filter)

**Scenario:**&#x20;

An online subscription service wants to offer their customers the option to have their payments automatically debited at regular intervals, ensuring a seamless and uninterrupted service experience.

**Steps:**

1. #### Tokenization Filter

   The merchant uses the `Payment Methods API` with the \``tokenizable`\` flag enabled.\
   The API filters and returns only the [payment gateways](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/payment-gateway) (`pg_codes`) that support the tokenization feature.
2. #### Incorporating Tokenization Gateways into Checkout Process

   The merchant integrates these tokenization gateways into their checkout process.
3. #### Customer Side

   When a customer opts for a subscription service, they are presented only with the payment methods that support tokenization. The customer chooses their preferred payment method from the filtered list and sets up their subscription.

The chosen payment method is now set to automatically debit the subscription amount at the specified intervals, ensuring uninterrupted service for the customer and consistent revenue for the merchant.

***

#### [Use Case 4: Managing Subsequent Charges with Tokenized Card Filtering](#use-case-4-managing-subsequent-charges-with-tokenized-card-filtering)

**Scenario:**&#x20;

An e-commerce platform offers customers the convenience of saving their card details for faster checkout in future transactions. To maintain trust and enhance the user experience, the platform wishes to ensure that subsequent charges using saved cards are only done on those cards which are [tokenization](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/tokenization) enabled by the customer.

**Steps:**

1. #### Fetching Tokenized `pg_codes` with `Payment Methods API`

   When planning for subsequent charges, the merchant uses the `Payment Methods API` to retrieve tokenization supported `pg_codes`.
2. #### Passing Tokenization `pg_codes` to `User Cards API`

   The retrieved tokenization `pg_codes` are then passed to the [User Cards API](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-cards#fetch-cards). The `User Cards API` filters and returns only those saved cards that are enabled for [tokenization](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/developer/tokenization) by the customers.
3. #### Subsequent Transactions

   For [subsequent transactions](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/auto-debit#subsequent-payments-1), the system only charges the customer's cards that are both saved and have tokenization enabled.

Customers are assured that only their approved and tokenization enabled cards will be charged, ensuring transparency and trust.

## [Best Practices](#best-practices)

#### [**Caching API Call Responses**](#caching-api-call-responses)

Given the infrequent changes in values — primarily when new MIDs are issued — it’s prudent to cache the API call response. This minimizes unnecessary and redundant calls to the API, especially considering the rare changes.

**Recommendations**

* Cache the API call response for an extended period, ranging from 24 hours to 1 week. This ensures that you’re not querying the API for every payment, which is inefficient since the data remains largely static.

#### [**Individual Caching for Filters**](#individual-caching-for-filters)

Always cache responses based on the specific filters you apply during API calls. If you’re employing the API with diverse filters based on various scenarios, it’s crucial to cache each response separately.

**Why is this important?**\
If you cache all responses under a single key, regardless of the filters used, you risk retrieving incorrect or irrelevant data. This can lead to inaccurate payment processing or even transaction failures. Caching each filter’s response under a unique key ensures data integrity and relevance.

#### [**On-Demand Cache Clear Mechanism**](#on-demand-cache-clear-mechanism)

Implement a mechanism to clear the cache on demand. In instances where a change for `MID` is enacted in the Ottu admin panel, this mechanism should be triggered to force update the cache with the latest data.

**Benefits**

* Guarantees that your system always has the most up-to-date information.
* Prevents potential transaction issues stemming from outdated `MIDs`.

By adhering to these best practices, you’ll ensure efficient API usage, maintain data accuracy, and optimize payment processing.

## [FAQ](#faq)

#### :digit\_one: [What is the main purpose of the Payment Methods API?](#what-is-the-main-purpose-of-the-payment-methods-api)

The `Payment Methods API` is designed to streamline the process of online transactions by offering an effortless automation system for payments.

#### :digit\_two: [Do I need to make changes to my existing environment when integrating with the Payment Methods API?](#do-i-need-to-make-changes-to-my-existing-environment-when-integrating-with-the-payment-methods-api)

No, the `Payment Methods API` allows for a seamless integration without requiring changes to your current environment. You only need to integrate with specific operation, [customer\_id](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#customer_id-string-optional), [currencies](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/checkout-api#currency_code-string-required), and desired payment [plugins](https://sandbox-doc.gitbook.io/ottu-team-sandbox-doc/user-guide/plugins).

**Conclusion**

In conclusion, the `Payment Methods API` offers dynamic adaptability. Any modifications made to the gateway settings or `MID` configuration will be automatically reflected in the API. This ensures a hassle-free experience, eliminating the need for constant developer intervention. Whether you're adding a new gateway, introducing a new method, or incorporating an additional payment method for your store, there's no need for manual updates in your shop's integration. Once integrated with this API, any changes made will be seamlessly displayed. Simplifying the process, the `Payment Methods API` guarantees efficiency and adaptability for your transaction needs.
