Forward a payment method
Forward payment method details to a verified 3rd party
Feature requirements🔐 Rainforest must enable the platform to access this feature
💲 Billing fees associated to this feature
Rainforest supports forwarding sensitive payment method information to a verified 3rd party using the Rainforest Forward API.
Enable forwarding
The 3rd party must be verified by Rainforest before this feature can be enabled. Rainforest requires the 3rd party's AOC documentation to verify they are certified to receive this sensitive information and be PCI certified.
Please submit the following information to your Platform Success Manager for approval:
- The 3rd party's AOC documentation
- The 3rd party endpoint to forward the payment method to
Once the 3rd party is approved, Rainforest will enable your platform to forward payment methods to the 3rd party's endpoint.
Payment method
In order to forward sensitive payment method information, you'll need a Payment Method within the Rainforest ecosystem. A payment method can be stored by processing a payin or storing a payment method. Once a payment method is stored, you'll need the Payment Method ID to forward that payment method to the 3rd party endpoint.
Forward request
Rainforest supports forwarding Card, Apple Pay, ACH, and Plaid ACH payment methods. Limitations for Apple Pay payment methods should be considered prior to forwarding.
Headers
Rainforest will forward all headers, as they are passed in, to the 3rd party. Sensitive information, such as Authentication, will be masked within the Rainforest ecosystem.
Body template
Rainforest will forward all data within the body of the request and supports Go templating to set values.
Sensitive fields
Card
In order to pass the card number for a Card payment method to the 3rd party, use the template {{ .card_number }} in the appropriate field.
Apple pay
In order to pass Apple Pay fields for an Apple Pay payment method to the 3rd party, use the following templates for the Apple Pay fields:
| Field | Description |
|---|---|
{{ .apple_pay.cryptogram }} | The cryptogram extracted from the Apple Pay token |
{{ .apple_pay.eci_indicator }} | The eCommerce indicator from the Apple Pay token |
{{ .apple_pay.pan }} | The dPAN number from the Apple Pay token |
{{ .apple_pay.exp_month }} | The expiration month associated with the dPAN |
{{ .apple_pay.exp_year }} | The expiration year associated with the dPAN |
ACH and Plaid ACH
In order to pass the account number for an ACH or Plaid ACH payment method to the 3rd party, use the template {{ .account_number }} in the appropriate field.
Payment method fields
We can forward any information stored on the payment method resource by specifying the path to the desired JSON key. For example, to send the expiration month for a Card payment method to the 3rd party, use the template {{ .card.exp_month }} in the respective field with the 3rd party.
Go template functions
Rainforest supports the following functions within the go template:
| Function | Description | Example |
|---|---|---|
urlquery | URL-encode the field | {{ .billing_contact.name | urlquery }} |
toExpYearYY | Convert YYYY date to YY | {{ .card.exp_year | toExpYearYY }} |
Payload examples
URL encoded body
The following example is a forward request where the 3rd party accepts a URL encoded body.
{
"url": "https://3rd_party.com",
"http_method": "POST",
"headers": {
"Authentication": "Basic {{ basicAuth `AN_API_KEY` `` }}",
"Content-Type": "application/x-www-form-urlencoded"
},
"body": "card%5Bexp_month%5D={{ .card.exp_month | urlquery }}&card%5Bexp_year%5D={{ .card.exp_year | urlquery }}&card%5Bnumber%5D={{ .card_number | urlquery }}"
}The basicAuth function takes a username and password argument, and returns the base64 encoded string, suitable for use with HTTP Basic authentication.
The urlqueryfunction URL-encodes the provided value.
Response
The response from the 3rd party will be forwarded back to the platform in the response_details object.
This information will only be available on the response of the forward request. It will not be stored within the HTTP request logs in the Rainforest Platform Portal.
Sandbox
Card
On Sandbox, the credit card number 4111 1111 1111 1111 will always be sent to the 3rd party, regardless of what number is associated with the provided payment method.
Apple Pay
On Sandbox, Rainforest does not currently support sending Apple Pay payment methods to the 3rd party.
ACH
On Sandbox, the account number 123456 will always be sent to the 3rd party, regardless of what account number is associated with the provided payment method.
Updated about 9 hours ago