---
title: "Add Payment Method to Customer"
source_url: https://docs.rapyd.net/en/add-payment-method-to-customer.html
lang: en
---

# Add Payment Method to Customer

Add a payment method to a customer profile (card on file).

In the sandbox, adding a **card** payment method type (with the `type` field and the `fields` object) requires 3DS authentication by the cardholder. See [Simulating 3DS Authentication](https://docs.rapyd.net/en/simulating-3ds-authentication.md "Simulating 3DS Authentication"). In production, requirements differ from card to card. 3DS authentication is required if `payment_method_options.3d_required` is set to **true** or if the bank or card network require it.

This method triggers the [Customer Payment Method Created Webhook](https://docs.rapyd.net/en/customer-payment-method-created-webhook.md "Customer Payment Method Created Webhook"). This webhook contains the same information as the response.

In addition, when a **card** payment method type is added to a customer:

- If 3DS is not required, this method triggers [Payment Succeeded Webhook](https://docs.rapyd.net/en/payment-succeeded-webhook.md "Payment Succeeded Webhook") with a zero-amount transaction and the [Card Added Successfully Webhook](https://docs.rapyd.net/en/card-added-successfully-webhook.md "Card Added Successfully Webhook").
- If 3DS is required, the **Payment Updated** webhook with a zero-amount transaction and the [Card Added Successfully Webhook](https://docs.rapyd.net/en/card-added-successfully-webhook.md "Card Added Successfully Webhook") are sent following 3DS authentication.
- In production, you cannot add a card to a customer profile for a telephone order.

The following asynchronous webhooks provide information about later changes to the Payment Method object:

- **Payment Method Failed** webhook
- [Card Added Failure Webhook](https://docs.rapyd.net/en/card-added-failure-webhook.md "Card Added Failure Webhook")

> **Note:**
>
> - Merchants who have PCI clearance can use the API to add a card payment method.
> - You can also use a hosted page to add a **card** payment method to a customer. See [Create Card Token](https://docs.rapyd.net/en/create-card-token.md "Create Card Token").
> - For a **card** payment method, you can perform an account name inquiry (ANI) if the payment method supports it. Add a `full_name` object to the request.
> - Use this method to create a payment method ID for a subscription. See [Create Subscription](https://docs.rapyd.net/en/create-subscription.md "Create Subscription").
> - Use this method to create a network reference ID for repeat card payments. You can also create a network reference ID when you create a payment. See [Create Payment](https://docs.rapyd.net/en/create-payment.md "Create Payment").
> - The code samples include successful requests (200) and bad requests (400).
>
>   - For error messages that appear due to bad requests (400), see:
>
>     - [General Errors](https://docs.rapyd.net/en/general-errors.md "General Errors")
>     - [Payment Method Errors](https://docs.rapyd.net/en/payment-method-errors.md "Payment Method Errors")
>   - For information about unauthorized request (401) and other authentication errors, see [Troubleshooting Authentication and Authorization Errors](https://docs.rapyd.net/en/troubleshooting-authentication-and-authorization-errors.md "Troubleshooting Authentication and Authorization Errors").

**Prerequisites**

Use [Get Payment Method Required Fields](https://docs.rapyd.net/en/get-payment-method-required-fields.md "Get Payment Method Required Fields") to determine which fields are required to create the payment method.

### Parameters

### Request Path Parameters

- - customer
  - ID of the customer. String starting with **cus_**.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Body Parameters

- - address
  - Describes a physical address. For details about the 'address' object, see [Create Address](https://docs.rapyd.net/en/create-address.md "Create Address").

    Required for card payment methods that support 3DS authentication.
- - client_details
  - Describes the browser that the customer is using. The client collects this information and sends it in the request. The Client Details information is not returned in the REST response or in webhooks. See [Creating a Card Payment With 3DS Authentication - Rapyd 3DS](https://docs.rapyd.net/en/creating-a-card-payment-with-3ds-authentication---rapyd-3ds.md "Creating a Card Payment With 3DS Authentication - Rapyd 3DS") for additional request parameters that are required for 3DS authentication. This information is required for 3DS authentication of the customer for card payments. Rapyd recommends providing all fields, especially `ip_address`. Visa requires `ip_address`, `screen_height`, and `screen_width`.

    - - accept_header
      - Indicates the media types specified in the HTTP `Accept` header of the customer's browser, which the browser accepts from the server. This value describes the media types that the browser expects in all responses. Required for processing 3DS authentication for some payment methods.

        For example: **text/html**
    - - ip_address
      - IP address of the customer's browser.

        Required for Visa and Mastercard payments with 3DS.
    - - java_enabled
      - Indicates whether the customer's browser is enabled for Java.
    - - java_script_enabled
      - Indicates whether the customer's browser is enabled for JavaScript.
    - - language
      - The language the customer's browser is configured for, as defined in IETF BCP 47.
    - - screen_color_depth
      - Indicates the screen color depth of the customer's browser, in bits.

        Valid values: 1, 4, 8, 15, 16, 24, 32, 48.
    - - screen_height
      - Height of the customer's screen, in pixels. 1-6 digits.

        Required for Visa payments with 3DS.
    - - screen_width
      - Width of the customer's screen, in pixels. 1-6 digits.

        Required for Visa payments with 3DS.
    - - time_zone_offset
      - Difference in minutes between UTC and the customer's time zone. Positive or negative integer.
- - complete_payment_url
  - URL where the customer is redirected after successfully completing an operation on an external page.
- - error_payment_url
  - URL where the customer is redirected if an error occurs during or after an operation on an external page.
- - fields
  - Object that contains the fields that are required for the specific payment method. Required when the `token` field is not used. See [Get Payment Method Required Fields](https://docs.rapyd.net/en/get-payment-method-required-fields.md "Get Payment Method Required Fields").
- - full_name
  - Full name of the cardholder. Include this parameter to perform an account name inquiry (ANI). See also the related 'Card with ANI Request' sample on this page.

    - - first_name
      - The cardholder's given name.
    - - middle_name
      - The cardholder's middle name.
    - - last_name
      - The cardholder's family name.
- - is_default
  - Indicates that the added payment method will become the customer's default payment method. If it is the only payment method of the customer then it will automatically become the default payment method even if this parameter is set to **false**.

    false
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - network_reference_id
  - Identifier for use in a recurring card payment.
- - payment_method_options
  - Additional fields required for the payment method. These values might vary from one use to the next, so they are not saved as part of the payment method object. Required when the `type` field and the `fields` object are used. If your organization manages 3DS authentication then it is recommended to add the 3DS parameters and `currency` parameter to this object. See also the related 'Card with 3DS data and currency' sample on this page.
- - token
  - ID of the token that represents the card. String starting with **card_**. Required when the `type` field and the `fields` object are not used.
- - type
  - Name of the payment method. Required when `token` is not used.

### Response Parameters

- - account_last4
  - Last four digits of the bank account number or [IBAN (International Bank Account Number)](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_iban "International Bank Account Number").

- - account_name_inquiry
  - Data about the account name inquiry (ANI).

    - - account_name_inquiry_result
      - Result of the account name inquiry. One of the following values:

        - **match** - Indicates that the name provided in the request fully matched the issuing bank's records.
        - **partial match** - Indicates that the name provided in the request partially matched the issuing bank's records.
        - **no match** - Indicates that the name provided in the request did not match the issuing bank's records.
        - **not performed** - Indicates that the account name inquiry was not performed.
        - **not supported** - Indicates that the payment method does not support account name inquiries.
    - - account_name_inquiry_details
      - Indicates the degree that the name provided in the request matched the issuing bank's records.

        - - first_name
          - Indicates the result of matching the cardholder's given name. One of the following values:

            - **match** - Indicates that the first name provided in the request fully matched the first name in the issuing bank's records.
            - **partial match** - Indicates that the first name provided in the request partially matched the first name in the issuing bank's records.
            - **no match** - Indicates that first the name provided in the request did not match the first name in the issuing bank's records.
        - - middle_name
          - indicates the result of matching the cardholder's middle name. One of the following values:

            - **match** - Indicates that the middle name provided in the request fully matched the middle name in the issuing bank's records.
            - **partial match** - Indicates that the middle name provided in the request partially middle the first name in the issuing bank's records.
            - **no match** - Indicates that the middle name provided in the request did not match the middle name in the issuing bank's records.
        - - last_name
          - indicates the result of matching the cardholder's family name. One of the following values:

            - **match** - Indicates that the last name provided in the request fully matched the family name in the issuing bank's records.
            - **partial match** - Indicates that the last name provided in the request partially matched the family name in the issuing bank's records.
            - **no match** - Indicates that the last name provided in the request did not match the family name in the issuing bank's records.
- - account_number
  - Bank account number.
- - acs_check
  - Results of the [Access Control Server (ACS)](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_acs "Access Control Server") check. Possible values:

    - **pass**
    - **fail**
    - **unavailable**
    - **unchecked**

    Relevant to cards.
- - address
  - Describes a physical address. For details about the fields of the 'address' object, see [Create Address](https://docs.rapyd.net/en/create-address.md "Create Address").
- - bic_swift
  - BIC or SWIFT code.
- - bin_details
  - Bank identification details. Includes the following fields:

    - - bin_number
      - BIN number of the bank.
    - - brand
      - The brand of the card. For example, **Visa**.
    - - country
      - Country of the bank that issued the card.
    - - issuer
      - Business name of the bank that issued the card.
    - - level
      - Type of card as categorized by the issuer.
    - - type
      - The type of the card:

        - **credit**
        - **debit**
        - **prepaid**
- - category
  - Category of payment method. One of the following:

    - **bank_redirect**
    - **bank_transfer**
    - **card**
    - **card_redirect**
    - **cash**
    - **ewallet**
    - **ewallet_redirect**
- - company_name
  - Name of the customer's company.
- - complete_payment_url
  - URL where the customer is redirected when payment is successful, after returning from an external page such as a 3DS page. Does not support localhost URLs.
- - cvv_check
  - Verification of the card’s CVV. Valid values:

    - **pass**
    - **fail**
    - **unavailable**
    - **unchecked**
- - error_payment_url
  - URL where the customer is redirected when payment is not successful, after returning from an external page, such as a 3DS page. Does not support localhost URLs.
- - expiration_month
  - Month of expiration.

    Relevant to cards.
- - expiration_year
  - Year of expiration.

    Relevant to cards.
- - fingerprint_token
  - Hash of the card number, expiration date and CVV.

    Relevant to cards.
- - first_name
  - Customer's first name.
- - full_name
  - Full name of the cardholder, as submitted for account name inquiry (ANI).

    - - first_name
      - The cardholder's given name.
    - - middle_name
      - The cardholder's middle name.
    - - last_name
      - The cardholder's family name.
- - id
  - ID of the payment method. String starting with **card_** or **other_**.
- - image
  - A URL to the image of the icon for the type of payment method.
- - is_default
  - Indicates that the added payment method will become the customer's default payment method. If it is the only payment method of the customer then it will automatically become the default payment method even if this parameter is set to **false**.
- - language
  - Determines the default language of the hosted page. For a list of values, see [List Supported Languages](https://docs.rapyd.net/en/list-supported-languages.md "List Supported Languages").

    - When this parameter is null, the language of the user's browser is used.
    - If the language of the user's browser cannot be determined, the default language is English.
- - last4
  - Last four digits of the card or IBAN (International Bank Account Number).
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - name
  - Full name of the customer.
- - network_reference_id
  - Identifier for use in a recurring card payment.
- - next_action
  - Indicates the next action for completing the payment. One of the following values:

    - **3d_verification** - The next action is 3DS authentication. Relevant only to card payments.
    - **pending_capture** - The next action is pending the capture of the amount. Relevant only to card payments when the amount is not zero.
    - **pending_confirmation** - The next action is pending the confirmation for the payment. Relevant to all payment methods excluding card payment.
    - **pending_offline_capture** - The next action is pending an offline capture, where the payment settles to a **closed** (**CLO**) status via the clearing process. A payment in this state can be successfully refunded, **but cannot be canceled**. Currently, relevant only to Shva Arena card payments.
    - **not_applicable** - The payment has completed or the next action is not relevant.
- - payment_purpose
  - Purpose of the transfer, as reported by the payer's bank.
- - proof_of_authorization
  - Proof of authorization for the bank transfer.
- - redirect_url
  - URL of the hosted page that is shown to the customer.
- - routing_number
  - Routing number for the bank transfer.
- - supporting_documentation
  - Reserved.
- - type
  - Name of the payment method type. For example, **us_mastercard_card**.

    To get a list of payment methods for a country, use [List Payment Methods by Country](https://docs.rapyd.net/en/list-payment-methods-by-country.md "List Payment Methods by Country").
- - webhook_url
  - Reserved.

### Code Samples

- - .NET

    - ```csharp
      using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string[] payment_method_type_categories = new string[] {
                          "cash",
                          "bank_redirect",
                          "bank_transfer"
                      }; string customerId = "cus_7b4cd1f607a0b5df13eb1871834c4480"; var metadata = new { merchant_defined = true
                      }; var requestObj = new { type = "nl_iban_bank", metadata = new { merchant_defined = true
                          }
                      }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", $"/v1/customers/{customerId}/payment_methods", request); Console.WriteLine(result);
                  } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
      async function main() {
          try {
              const body = {
                  type: 'nl_iban_bank',
                  fields: {}
              };
              const result = await makeRequest('POST', '/v1/customers/cus_f3923ec56a56578b6a18df24d4f32d54/payment_methods', body);
              console.log(result);
          } catch (error) {
              console.error('Error completing request', error);
          }
      }
      ```
- - PHP

    - ```php
       <  ? php $path = $_SERVER['DOCUMENT_ROOT'];
      $path. = "/<path-to-your-utility-file>/utilities.php";
      include($path);
      $body = ["type" => "nl_iban_bank", ];
      try {
          $object = make_request('post', "/v1/customers/cus_5861b2ec3e7441bfd43756bb491ddf10/payment_methods", $body);
          var_dump($object);
      } catch (Exception $e) {
          echo "Error: $e";
      }
      ?  >
      ```
- - Python

    - ```python
      from pprint import pprint from utilities import make_request payment_method = {
          "type": "nl_iban_bank",
          "fields": {},
          "metadata": {
              "merchant_defined": True
          }
      }
      result = make_request(method = 'post', path = '/v1/customers/cus_0645ee52e91ed51f30176e727b9acfaa/payment_methods', body = payment_method)pprint(result)
      ```

- /v1/customers/:customer/payment_methods

- Bank Redirect
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' \
  -H 'access_key: your-access-key-here'  \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "type": "at_sofort_bank"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "4438dea0-b9eb-402c-89f7-04d567a81342"
      },
      "data": {
          "id": "other_618d6e098d0ea74fd73ad9e91930df6d",
          "type": "at_sofort_bank",
          "category": "bank_redirect",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable",
          "bic_swift": "",
          "account_last4": ""
      }
  }
  ```

- Bank Transfer
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here' /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "mx_spei_bank"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "f0498f8e-1ce8-4932-ab28-1ccb23fb5e18"
      },
      "data": {
          "id": "other_e4cd3a4bdcc26ab661420b306d2224ab",
          "type": "mx_spei_bank",
          "category": "bank_transfer",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable",
          "bic_swift": "",
          "account_last4": ""
      }
  }
  ```

- Card with ANI Request
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here'  /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "gb_visa_card",
      "fields": {
          "number": "4761340000001082",
          "expiration_month": "02",
          "expiration_year": "26",
          "cvv": "111",
          "name": "Jon Doo"
      },
      "full_name": {
          "first_name": "John",
          "middle_name": "Johnson",
          "last_name": "Doe"
      },
      "complete_payment_url": "https://complete.rapyd.net",
      "error_payment_url": "https://error.rapyd.net"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "9ce88535-f718-4ea8-a265-554e6957a70e"
      },
      "data": {
          "id": "card_e2bdbf293c33cb2ab87c1014fda5f5f6",
          "type": "gb_visa_card",
          "category": "card",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable",
          "full_name": {
              "first_name": "John",
              "middle_name": "Johnson",
              "last_name": "Doe"
          },
          "account_name_inquiry": {
              "account_name_inquiry_result": "Partial match",
              "account_name_inquiry_details": {
                  "first_name": "Match",
                  "last_name": "Match",
                  "middle_name": "No match"
              }
          },
          "name": "Jon Doo",
          "last4": "1082",
          "acs_check": "unchecked",
          "cvv_check": "unchecked",
          "bin_details": {
              "type": "DEBIT",
              "brand": "VISA",
              "level": "GOLD",
              "issuer": "INTL HDQTRS-CENTER OWNED",
              "country": "SG",
              "bin_number": "476134"
          },
          "expiration_year": "26",
          "expiration_month": "02",
          "fingerprint_token": "ocfp_b8eafaeeea548e97ef23914cffa7154a",
          "network_reference_id": "000000906217732",
          "complete_payment_url": "https://complete.rapyd.net",
          "error_payment_url": "https://error.rapyd.net"
      }
  }
  ```

- Card with 3DS Data and Currency
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here'  \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "type": "is_mastercard_card",
      "fields": {
          "name": "John Doe",
          "number": "4462030000000000",
          "expiration_month": "05",
          "expiration_year": "35",
          "cvv": "222"
      },
      "complete_payment_url": "https://complete.rapyd.net",
      "error_payment_url": "https://error.rapyd.net",
      "payment_method_options": {
          "3d_version": "2.2.0",
          "cavv": "AddddFVmd4iZAKq7zA3u/AAAB=",
          "eci": "05",
          "xid": null,
          "ds_trans_id": "4567a4f1-faa4-419e-b39a-3cc9779398",
          "currency": "EUR"
      }
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "095d407f-8471-4623-8a64-2bd0bc011e10"
      },
      "data": {
          "id": null,
          "type": "is_mastercard_card",
          "category": "card",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "3d_verification",
          "name": "John Doe",
          "last4": "0000",
          "acs_check": "unchecked",
          "cvv_check": "unchecked",
          "bin_details": {
              "type": "DEBIT",
              "brand": "VISA",
              "level": "CLASSIC",
              "issuer": "MODULR FS LIMITED",
              "country": "GB",
              "bin_number": "446203"
          },
          "expiration_year": "35",
          "expiration_month": "05",
          "fingerprint_token": "ocfp_1476e28831f830fb85356e3b61a1ed84",
          "redirect_url": "https://sandboxcheckout.rapyd.net/3ds-payment?token=payment_2552f7a277776e135cb014cd0b518486",
          "network_reference_id": "922331",
          "complete_payment_url": "https://complete.rapyd.net",
          "error_payment_url": "https://error.rapyd.net"
      }
  }
  ```

- Card Redirect
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here'  /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "kr_localcards_redirect_card"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "2f2b7f78-9d77-475d-b6af-5443f2e510c3"
      },
      "data": {
          "id": "other_9162cf0e8ba033a39833b89b289b2581",
          "type": "kr_localcards_redirect_card",
          "category": "card_redirect",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable"
      }
  }
  ```

- Cash
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "type": "pe_banco_ripley_cash"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "8bc09ea3-850a-4ed8-94fe-4320d7ef20bc"
      },
      "data": {
          "id": "other_0bfa8ede2535263dab8da20a384d5c2f",
          "type": "pe_banco_ripley_cash",
          "category": "cash",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable"
      }
  }
  ```

- Local eWallet
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here'  /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "sg_grabpay_ewallet"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "ee2a3c71-df4a-4490-86b2-df5df5de5b2e"
      },
      "data": {
          "id": "other_9a1fa177940e16c09f161cfa55ec108a",
          "type": "sg_grabpay_ewallet",
          "category": "ewallet",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable",
          "bic_swift": "",
          "account_last4": ""
      }
  }
  ```

- Local eWallet Redirect
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here'  /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "in_jiomoney_ewallet"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "34db4239-277f-4fc2-b346-0e565b146945"
      },
      "data": {
          "id": "other_330f2c3586e670b72aab45f5c12195c0",
          "type": "in_jiomoney_ewallet",
          "category": "ewallet_redirect",
          "metadata": {},
          "image": "",
          "webhook_url": "",
          "supporting_documentation": "",
          "next_action": "not_applicable"
      }
  }
  ```

- Bad Request - Customer Not Found
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_9f4965b9807bc1aeae67b47a0ae5b08/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here'  /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "at_crypto_ewallet"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_GET_CUSTOMER",
          "status": "ERROR",
          "message": "The request attempted an operation that requires the ID of a customer, but the customer was not found. The request was rejected. Corrective action: Use the correct ID of the customer, a string starting with 'cus_'.",
          "response_code": "ERROR_GET_CUSTOMER",
          "operation_id": "383f4b84-2faf-4176-819d-3011fc08273c"
      }
  }
  ```

- Bad Request - Payment Method Not Found
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/customers/cus_4e25112ac20e144ad073a614dc46934b/payment_methods' /
  -H 'access_key: your-access-key-here' /
  -H 'Content-Type: application/json' /
  -H 'idempotency: your-idempotency-parameter-here' /
  -H 'salt: your-random-string-here'  /
  -H 'signature: your-calculated-signature-here' /
  -H 'timestamp: your-unix-timestamp-here' /
  --data-raw '{
      "type": "kr_localcard_redirect_card"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_GET_PAYMENT_METHOD_TYPE",
          "status": "ERROR",
          "message": "The request attempted an operation that requires a payment method, but the payment method type specified is not available for this merchant or does not exist at all. Corrective action: Use a payment method type that this merchant is authorized to use.",
          "response_code": "ERROR_GET_PAYMENT_METHOD_TYPE",
          "operation_id": "1c4efeff-3d19-4c7d-a62d-aca3cf0763ec"
      }
  }
  ```
