PCI direct integration

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

🚧

Upgrade to the latest version

These docs are for version 2023-12-01. We encourage you to upgrade to version 2024-10-16 to access new features. Please see the changelog for more information.

❗️

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.

Process a payment


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

FieldDescriptionTypeRequired
payin_config_idThe 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_typeThe type of payment method.

Enum values: CARD, ACH
String
cardCard payment method. Required for method_type CARD.Card object
achACH payment method details. Required for method_type ACH.ACH object
billing_contactBilling contact details.

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

Card

FieldDescriptionTypeRequired
card_numberThe card number, formatted with no spaces (e.g 0000000000000000).String
exp_monthThe card expiration month.

Integer between 1 and 12.
Integer
exp_yearThe card expiration year, in 4-digits.

Integer between current year and 2099.
Integer
cvcThe card cvc.String

ACH

FieldDescriptionTypeRequired
account_numberThe bank account number, encrypted with RSA-OAEP-SHA256.String
routing_numberThe 9 digit routing number.String
account_typeThe account type. Defaulted to CHECKING if omitted.

Enum values: CHECKING, SAVINGS
String
account_holder_typeThe 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.

Store a payment method


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

Create a payment method config

Create a payment method config to set up a payment method with information such as billing details and metadata before collecting the sensitive payment details (i.e the card number). See this guide for additional information.

Create a payment method

Create a payment method via the create payment method endpoint with a valid request payload.

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

Request payload

FieldDescriptionTypeRequired
payment_method_config_idThe 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.
String
method_typeThe type of payment method.

Enum values: CARD, ACH
String
cardCard payment method. Required for method_type CARD.Card object
achACH payment method details. Required for method_type ACH.ACH object
billing_contactBilling contact details.

Available fields match the billing_contact object in the create payment method config request.
Billing contact object

Card

FieldDescriptionTypeRequired
card_numberThe card number, formatted with no spaces (e.g 0000000000000000).String
exp_monthThe card expiration month.

Integer between 1 and 12.
Integer
exp_yearThe card expiration year, in 4-digits.

Integer between current year and 2099.
Integer
cvcThe card cvc.

The CVC will only be available for 5 minutes for payment processing.
String

ACH

FieldDescriptionTypeRequired
account_numberThe bank account number.String
routing_numberThe 9 digit routing number.String
account_typeThe account type. Defaulted to CHECKING if omitted.

Enum values: CHECKING, SAVINGS
String
account_holder_typeThe account holder type. Defaulted to PERSONAL if omitted.

Enum values: PERSONAL, BUSINESS
String

Save the data

The response to POST /v1/payment_methods endpoint will return the same response payload as get payment method for all the payment method details.

Payment method webhooks can be configured for additional information.