---
title: "Create payment method"
method: POST
path: "/v1/payment_methods"
tags: ["Payment Methods"]
---

# Create payment method

`POST /v1/payment_methods`

## Request

- Base URL: `https://api.sandbox.rainforestpay.com`
- URL: `https://api.sandbox.rainforestpay.com/v1/payment_methods`
- Auth: HTTP bearer

Create a saved payment method.

To duplicate a saved payment method, set the payment_method_id of the payment method to be duplicated. Billing contact and metadata is not persisted from the duplicated payment method and must be defined on the [Payment Method Config](ref:create_payment_method_config) or on the request. Only the stored sensitive payment method details (i.e full card or bank account number) will persist to the duplicated payment method.

If the method_type is set, then this endpoint requires Rainforest approval. Platforms that meet all [requirements](doc:send-sensitive-data-via-api#requirements) and are approved by Rainforest can send the full card and bank account numbers to Rainforest via a server-to-serve direct API integration.

## Parameters

- `#/paths/~1v1~1payins/get/parameters/0` (unresolved $ref)

## Request body

- object
  - `payment_method_config_id` string: The unique payment method config identifier. A payment method must be configured prior to this request. See "Create a Payment Method Config" if a payment method configuration has not been created yet. Prefix is "pmc" in production and "sbx_pmc" in sandbox.
  - `payment_method_id` PaymentMethodId (unresolved $ref)
  - `method_type` MethodType (unresolved $ref)
  - `card` Card (unresolved $ref)
  - `ach` Ach (unresolved $ref)
  - `billing_contact` BillingContact (unresolved $ref)

## Response `200`

OK

- object
  - `status` Status (unresolved $ref)
  - `data` object
    - `payment_method_id` PaymentMethodId (unresolved $ref)
    - `payment_method_config_id` PaymentMethodConfigId (unresolved $ref)
    - `device_registration_id` DeviceRegistrationId (unresolved $ref)
    - `billable_merchant_id` string: The unique merchant identifier for the billable merchant, utilized in processes such as BIN Lookup and Card Account Updater. Prefix is "mid" in production and "sbx_mid" in sandbox.
    - `merchant_id` string: The unique merchant identifier that indicates this payment method is restricted to this merchant. Prefix is "mid" in production and "sbx_mid" in sandbox.
    - `fingerprint` string: The unique identifier of a payment method across all platform merchants.
    - `method_type` MethodType (unresolved $ref)
    - `card` Card (unresolved $ref)
    - `apple_pay` ApplePay (unresolved $ref)
    - `google_pay` GooglePay (unresolved $ref)
    - `ach` Ach (unresolved $ref)
    - `plaid_ach` PlaidAch (unresolved $ref)
    - `paypal_wallet` PaypalWallet (unresolved $ref)
    - `venmo` Venmo (unresolved $ref)
    - `paypal_paylater` PaypalPaylater (unresolved $ref)
    - `status` Items (unresolved $ref)
    - `is_available` boolean: Payment method is currently available for use. Only payment methods in `ACTIVE` status may be used when [creating a payin from stored payment method](ref:create_payment_method_payin).
    - `billing_contact` BillingContact (unresolved $ref)
    - `shipping_address` ShippingAddress (unresolved $ref)
    - `device_data` DeviceData (unresolved $ref)
    - `metadata` MethodMetadata (unresolved $ref)
    - `created_at` string, date-time: Date and time payment method was created at in UTC RFC 3339 format.
    - `updated_at` string, date-time: Date and time payment method was last updated at in UTC RFC 3339 format.
    - `replaces_payment_method_id` string, nullable: The unique identifier for the payment method that was replaced by this payment method. Prefix is "mtd" in production and "sbx_mtd" in sandbox. This value will be `null` if this payment method does not replace another payment method.
    - `replaced_by_payment_method_id` string, nullable: The unique identifier for the payment method that replaced this payment method. Prefix is "mtd" in production and "sbx_mtd" in sandbox. This value will be `null` if the payment method has not been replaced.
    - `replaced_at` string, date-time: Date and time payment method was replaced in UTC RFC 3339 format.
    - `replaced_reason_code` 'C01' | 'C02' | 'C03' | 'C04' | 'C05' | 'C06' | 'C07' | 'C08' | 'C09' | 'C10' | 'C11' | 'C12', nullable: The code explaining the reason the payment method was replaced. This value will be `null` if the payment method has not been replaced.
    - `replaced_reason_desc` string, nullable: The description explaining the reason the payment method was replaced. This will be a human-readable value that may be presented to the end user. This value will be `null` if the payment method has not been replaced.
    - `replacement_disabled_at` string, date-time: Date and time replacement was disabled for payment method in UTC RFC 3339 format. Indicating processes such as Card Account Updater (CAU) cannot be run on this payment method.
    - `replacement_disabled_reason_code` 'D01' | 'D02' | 'D03' | 'D04', nullable: The code explaining the reason replacement was disabled for the payment method. See the [replacement disabled reason codes](doc:replacement-disabled-reason-codes) guide for additional information. This value will be `null` if replacement has not been disabled for the payment method.
    - `replacement_disabled_reason_desc` string, nullable: The description explaining the reason replacement was disabled for the payment method. This will be a human-readable value that may be presented to the end user. This value will be `null` if replacement has not been disabled for the payment method.
  - `errors` Errors (unresolved $ref)

## Other responses

- `400` (unresolved $ref)
- `401` (unresolved $ref)
- `403` (unresolved $ref)
- `5XX` (unresolved $ref)

---

[API](https://skmtc.dev/rainforestpay/apis/payments.md) - [All operations](https://skmtc.dev/rainforestpay/apis/payments/llms.txt) - [OpenAPI document](https://skmtc.dev/rainforestpay/apis/payments/revisions/9d7d0b1553a8?raw)
