Stripe Feed Meta

Introduction

The Feed Object meta for the Stripe add-on is an associative array containing the properties which determine what type of transaction should occur and what values are sent to Stripe.

$feed['meta'] = array(
    'feedName'                       => 'Your Feed Name',
    'transactionType'                   => 'product',
    'paymentAmount'                   => 'form_total',
    'receipt_field'                      => '3',
    'feed_condition_conditional_logic'       => true,
    'feed_condition_conditional_logic_object' => array(
        'conditionalLogic' => array(),
    ),
);

Usage

We recommend accessing the $feed meta using the rgar() or rgars() functions, e.g.:

$conditional_logic_enabled = rgars( $feed, 'meta/feed_condition_conditional_logic' );

Properties

  • feedName string

    The feed name which appears on the add-ons feeds tab.

  • transactionType string

    The type of transaction which should occur when the feed is processed. Possible values: product or subscription.

  • metaData array

    An indexed array of custom meta information. Stripe allows a maximum of 20 custom keys to be sent. Each custom meta array contains the following properties.

        array(
            'key'        => 'gf_custom',
            'value'      => '1.3',
            'custom_key' => 'product_quantity',
        );
        
    • key string

      Value should be gf_custom. Instructs the dynamic_field_map setting to use the custom_key input.

    • value string

      The ID of the field containing the value to be sent for the specified custom_key. The mapped data will be truncated to 500 characters per requirements by Stripe.

    • custom_key string

      The custom key you want to use when sending the custom metadata to Stripe. Must be 40 characters or less.

  • feed_condition_conditional_logic boolean

    Is the feed condition (conditional logic) setting enabled. Default is false.

  • feed_condition_conditional_logic_object array

    An associative array containing the conditional logic rules. See the Conditional Logic Object for more details.

Product Transaction Properties

The following properties are only applicable when the transactionType is set to product.

  • paymentAmount string

    What to use for the payment amount. Possible values: form_total or a product field ID.

  • receipt_field string

    The ID of the field containing the email Stripe should use when sending their receipt.

Subscription Transaction Properties

The following properties are only applicable when the transactionType is set to subscription.

  • recurringAmount string

    What to use for the recurring amount. Possible values: form_total or a product field ID

  • billingCycle_length integer

    How often should the recurring payment occur. Maximum values: 1 year or 12 weeks or 12 months.

  • billingCycle_unit string

    How often should the recurring payment occur. Possible values: week, month or year.

  • setupFee_enabled boolean

    Should a setup fee be charged? Default is false.

  • setupFee_product string

    The ID of the product field containing the amount the user should be charged for the setup fee.

  • trial_enabled boolean

    Should the recurring charge occur immediately or after a trial period? Default false.

  • trialPeriod integer

    The number of days the trial period should last.

  • customerInformation_email string

    The ID of the field containing the customer email.

  • customerInformation_description string

    The ID of the field containing the customer description.