---
updatedAt: 2025-10-01T13:23:08.000Z
agentTools:
  projectIndex: https://docs.rainforestpay.com/llms.txt
---

# Process payins from stored payment methods

Process payins from stored payment methods for recurring payments or subscriptions

Rainforest supports processing payments with stored payment methods. There are a few ways to create payment methods that can be used for recurring payments or subscriptions in the Rainforest ecosystem:

1. Integrate the Rainforest Payment Component to [process a payin](https://docs.rainforestpay.com/docs/process-payins-via-component), which will create a payment method associated to the payin.
2. Integrate the Rainforest Payment Component to a [store payment method](https://docs.rainforestpay.com/docs/store-payment-methods-via-component).
3. [Migrate payment methods](https://docs.rainforestpay.com/docs/migrate-payment-methods-to-rainforest#export-migrated-payment-methods) from another processor.

Once a payment method has been created, you'll want to store the Payment Method ID in your system.

Your platform can build a subscription model or utilize a 3rd party subscription provider to know when to initiate the payment against the stored payment method.

<br />

# How to process a payin

***

There are two steps to process a payin from a stored payment method:

1. [Create a payin config](https://docs.rainforestpay.com/reference/create_payin_config) to configure details such as the amount and metadata.
2. [Process a payin from a stored payment method](https://docs.rainforestpay.com/reference/create_payment_method_payin) given the payin config ID and payment method ID.

## Billing contact requirements

The following billing contact fields are ***required*** for processing depending on the payment method type:

| Payment Method | Billing Contact Required Field |
| :------------- | :----------------------------- |
| Card           | `postal_code`                  |
| ACH            | `name`                         |

Confirm your stored payment method has the above billing contacts by utilizing the [get payment method](https://docs.rainforestpay.com/reference/get_payment_method) endpoint.

If the billing contact is missing the requirements, then you should populate the billing contact fields on the [create payin config](https://docs.rainforestpay.com/reference/create_payin_config) request.

If the billing contact is not missing the requirements, then we will auto-populate the billing contact from the payment method when processing the payment.

## Check the payin status

The [process a payin from a stored payment method](https://docs.rainforestpay.com/reference/create_payment_method_payin) request will return the result of the payin in the API response.

### Processing

If the payment is successful, the payin status will be **Processing**.

```diff
{
    "status": "SUCCESS",
    "data": {
        "payin_id": "sbx_pyi_2yb6AB2JHrKn2VV1sPCkIJykzYK",
        "...
+       "status": "PROCESSING",
        ...
    },
    "errors": null
}
```

### Failed

If the payment is declined, the payin status will be **Failed** and the refusal code will give additional context on the decline.

```diff
{
    "status": "SUCCESS",
    "data": {
        "payin_id": "sbx_pyi_2yb6IFImNlTJ1valHqOM4eQcMiG",
        ...
+       "status": "FAILED",
+       "refusal_code": "INSUFFICIENT_FUNDS",
+       "refusal_desc": "Insufficient funds",
        ...
    },
    "errors": null
}
```

Depending on the [refusal reason](https://docs.rainforestpay.com/docs/payment-refusal-codes), your platform should retry the payment or reach out to the end user for a new payment method.