Process payins via API

Integrate with Rainforest's PCI endpoints to send card and bank account data via API to process payments

❗️

This feature requires Rainforest approval

Platforms that meet all 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.

Follow these steps to process a payment with Rainforest through an API direct integration.

Create a payin config


Create a payin config to set up a payin with information such as amount before collecting the sensitive payin details (i.e the card number). See this guide for additional information.

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

Payment MethodBilling Contact Required Field
Cardpostal_code
ACHname

The billing contact can also be passed along with the payment method data in the next step.

Process a payin


Process the payin via the create payin endpoint with a valid request payload.

EnvironmentEndpoint
SandboxPOST https://api.sandbox.rainforestpay.com/v1/payins
ProductionPOST https://api.rainforestpay.com/v1/payins

Request payload

Field

Description

Type

Required

payin_config_id

The unique payin config identifier. A payin must be configured prior to this request. See "Create a Payin Config" if a payin configuration has not been created yet.

Prefix is "cfg" in production and "sbx_cfg" in sandbox.

String

method_type

The type of payment method.

Enum values: CARD, ACH

String

card

Card payment method. Required for method_type CARD.

Card object

ach

ACH payment method details. Required for method_type ACH.

ACH object

billing_contact

Billing contact details.

Available fields match the billing_contact object in the create payin config request.

Billing contact object

Card

Field

Description

Type

Required

card_number

The card number, formatted with no spaces (e.g 0000000000000000).

String

exp_month

The card expiration month.

Integer between 1 and 12.

Integer

exp_year

The card expiration year, in 4-digits.

Integer between current year and 2099.

Integer

cvc

The card cvc.

String

ACH

Field

Description

Type

Required

account_number

The bank account number, encrypted with RSA-OAEP-SHA256.

String

routing_number

The 9 digit routing number.

String

account_type

The account type. Defaulted to CHECKING if omitted.

Enum values: CHECKING, SAVINGS

String

account_holder_type

The account holder type. Defaulted to PERSONAL if omitted.

Enum values: PERSONAL, BUSINESS

String

Save the data

The response to /v1/payins endpoint will return the same response payload as get payin for all the payin details.

Payin webhooks and payment method webhooks can be configured for additional information.