Flex

App · 20 actions

Manage your Flex customer and product records and look up HSA and FSA payments.

Actions

ActionWhat it does
Get a checkout sessionRead details for one Flex checkout session.
Get a couponRead details for one Flex coupon.
Get a customerRead details for one Flex customer.
Get a disputeRead details for one Flex dispute.
Get a payment intentRead details for one Flex payment intent.
Get a priceRead details for one Flex price.
Get a productRead details for one Flex product.
Get a refundRead details for one Flex refund.
Get a shipping rateRead details for one Flex shipping rate.
Get a subscriptionRead details for one Flex subscription.
List checkout sessionsBrowse checkout sessions in your Flex account.
List couponsBrowse coupons in your Flex account.
List customersBrowse customers in your Flex account.
List disputesBrowse disputes in your Flex account.
List payment intentsBrowse payment intents in your Flex account.
List pricesBrowse prices in your Flex account.
List productsBrowse products in your Flex account.
List refundsBrowse refunds in your Flex account.
List shipping ratesBrowse shipping rates in your Flex account.
List subscriptionsBrowse subscriptions in your Flex account.

Get a checkout session

Read details for one Flex checkout session.

Inputs

Expand customerexpand_customertrue/false
If true, expands the customer object in the response.
Expand payment intentexpand_payment_intenttrue/false
If true, expands the payment intent object in the response.
Expand subscriptionexpand_subscriptiontrue/false
If true, expands the subscription object in the response.
Expandexpandtext
Comma-separated list of related objects to expand in the response.
Checkout session IDcheckout_session_idtextRequired
Checkout session id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "checkout_session": {
      "allow_promotion_codes": true,
      "amount_disputed": 1,
      "amount_received": 1,
      "amount_refunded": 1,
      "amount_subtotal": 1,
      "amount_total": 1,
      "cancel_url": "example",
      "capture_method": "automatic",
      "captures": [
        {}
      ],
      "checkout_session_id": "example",
      "client_reference_id": "example",
      "created_at": 1,
      "custom_text": {},
      "customer": {},
      "defaults": {},
      "disputes": [
        {}
      ],
      "expires_at": 1,
      "fees": [
        {}
      ],
      "hsa_fsa_eligible": true,
      "invoice": "example",
      "letter_of_medical_necessity_required": true,
      "metadata": {},
      "mode": "payment",
      "next_action": {},
      "origin": {},
      "partner": {},
      "payment_intent": {},
      "payment_intents": [
        {}
      ],
      "payment_method_options": {},
      "platform_fees": {},
      "redirect_url": "example",
      "refunds": [
        {}
      ],
      "renewal_as_of": 1,
      "selling_plans": [
        {}
      ],
      "setup_future_use": "on_session",
      "setup_intent": "example",
      "shipping_address_collection": true,
      "shipping_details": {},
      "shipping_options": {},
      "shopify_payment_details": {},
      "split_cart": {},
      "status": "open",
      "subscription": {},
      "subscription_data": {},
      "success_url": "example",
      "tax_calculation_mode": {},
      "tax_rate": {},
      "test_mode": true,
      "total_details": {},
      "visit_type": {}
    }
  }
}

Get a coupon

Read details for one Flex coupon.

Inputs

Coupon IDcoupon_idtextRequired
Coupon id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "coupon": {
      "amount_off": 1,
      "applies_to": {},
      "coupon_id": "example",
      "created_at": "example",
      "duration": "once",
      "duration_in_months": 1,
      "max_redemptions": 1,
      "metadata": {},
      "name": "example",
      "percent_off": 1,
      "test_mode": true,
      "times_redeemed": 1,
      "valid": true
    }
  }
}

Get a customer

Read details for one Flex customer.

Inputs

Customer IDcustomer_idtextRequired
Customer id.
Include orginclude_orgtrue/false
Include org.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "customer": {
      "created_at": "example",
      "customer_id": "example",
      "email": "example",
      "employer": "example",
      "first_name": "example",
      "last_name": "example",
      "metadata": {},
      "owner_partner_id": "example",
      "phone": "example",
      "shipping": {},
      "test_mode": true
    }
  }
}

Get a dispute

Read details for one Flex dispute.

Inputs

Dispute IDdispute_idtextRequired
Dispute id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "dispute": {
      "amount": 1,
      "balance_transactions": [
        {}
      ],
      "charge_id": "example",
      "checkout_session_id": "example",
      "client_reference_id": "example",
      "created_at": "example",
      "currency": "example",
      "dispute_id": "example",
      "evidence": {},
      "evidence_details": {},
      "is_charge_refundable": true,
      "metadata": {},
      "payment_intent_id": "example",
      "payment_method_details": {},
      "reason": "bank_cannot_process",
      "status": {},
      "test_mode": true
    }
  }
}

Get a payment intent

Read details for one Flex payment intent.

Inputs

Expandexpandtext
Comma-separated list of related objects to expand in the response.
Expand customerexpand_customertrue/false
If true, expands the customer object in the response.
Payment intent IDpayment_intent_idtextRequired
Payment intent id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "payment_intent": {
      "amount": 1,
      "amount_capturable": 1,
      "amount_received": 1,
      "application_fee_amount": 1,
      "capture_method": "automatic",
      "client_secret": "example",
      "created_at": "example",
      "customer": {},
      "invoice": {},
      "last_payment_error": {},
      "latest_charge": {},
      "letter_fee_amount": 1,
      "metadata": {},
      "payment_card_type": {},
      "payment_intent_id": "example",
      "payment_method": {},
      "status": "canceled",
      "test_mode": true,
      "transaction_fee": 1,
      "transfer_data": {},
      "transfer_group": "example"
    }
  }
}

Get a price

Read details for one Flex price.

Inputs

Expand productexpand_producttrue/false
If true, expands the product object in the response.
Price IDprice_idtextRequired
Price id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "price": {
      "active": true,
      "created_at": "example",
      "description": "example",
      "hsa_fsa_eligibility": {},
      "lookup_key": "example",
      "metadata": {},
      "owner_partner_id": "example",
      "price_id": "example",
      "product": {},
      "recurring": {},
      "test_mode": true,
      "trial_period_days": 1,
      "type": "one_time",
      "unit_amount": 1
    }
  }
}

Get a product

Read details for one Flex product.

Inputs

Product IDproduct_idtextRequired
Product id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "product": {
      "active": true,
      "client_reference_id": "example",
      "created_at": "example",
      "description": "example",
      "document_description": "example",
      "gtin": "example",
      "hsa_fsa_eligibility": "not_eligible",
      "metadata": {},
      "name": "example",
      "owner_partner_id": "example",
      "product_id": "example",
      "receipt_description": "example",
      "reference_gtin": "example",
      "test_mode": true,
      "upc_code": "example",
      "url": "example",
      "visit_type": {}
    }
  }
}

Get a refund

Read details for one Flex refund.

Inputs

Refund IDrefund_idtextRequired
Refund id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "refund": {
      "amount": 1,
      "balance_transaction": {},
      "created_at": "example",
      "failure_balance_transaction": {},
      "invoice_id": "example",
      "items": [
        {}
      ],
      "metadata": {},
      "payment_intent_id": "example",
      "reason": {},
      "reference_id": "example",
      "reference_status": {},
      "reference_type": {},
      "refund_id": "example",
      "status": "pending",
      "subscription_id": "example",
      "test_mode": true
    }
  }
}

Get a shipping rate

Read details for one Flex shipping rate.

Inputs

Shipping rate IDshipping_rate_idtextRequired
Shipping rate id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "shipping_rate": {
      "active": true,
      "amount": 1,
      "created_at": "example",
      "display_name": "example",
      "metadata": {},
      "shipping_rate_id": "example"
    }
  }
}

Get a subscription

Read details for one Flex subscription.

Inputs

Expand customerexpand_customertrue/false
If true, expands the customer object in the response.
Expandexpandtext
Comma-separated list of related objects to expand in the response.
Subscription IDsubscription_idtextRequired
Subscription id.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "subscription": {
      "backup_payment_method": {},
      "cancel_at": {},
      "cancel_at_period_end": true,
      "canceled_at": {},
      "client_secret": {},
      "created_at": "example",
      "current_period_end": {},
      "current_period_start": {},
      "customer": {},
      "default_payment_method": {},
      "discounts": [
        {}
      ],
      "items": [
        {}
      ],
      "latest_invoice": {},
      "metadata": {},
      "pause": {},
      "proration_behavior": {},
      "status": "incomplete",
      "subscription_id": "example",
      "test_mode": true,
      "trial_end": {},
      "trial_start": {}
    }
  }
}

List checkout sessions

Browse checkout sessions in your Flex account.

Inputs

Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From 1.0 to 9007199254740991.0.
Intervalintervalnumber
Filter by time interval in days (e.g., 30 for last 30 days).From -2147483648.0 to 2147483647.0.
Payment intent IDpayment_intent_idtext
Filter by payment intent ID.
Statusstatustext
Filter by checkout session status.One of: open, paid, complete, canceled, expired.
Customer IDcustomer_idtext
Filter by customer ID.
Emailemailtext
Filter results by customer email address.
Subscription IDsubscription_idtext
Filter by subscription ID.
Client reference IDclient_reference_idtext
Filter by the client reference ID you provided when creating the checkout session.
Expand customerexpand_customertrue/false
If true, expands the customer object in the response.
Expand payment intentexpand_payment_intenttrue/false
If true, expands the payment intent object in the response.
Expandexpandtext
Comma-separated list of related objects to expand in the response.
Created at or aftercreated_at_or_afterdate and time
Return sessions created at or after this timestamp (inclusive). ISO 8601 format.
Created at or beforecreated_at_or_beforedate and time
Return sessions created at or before this timestamp (inclusive). ISO 8601 format.
Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Has disputeshas_disputestrue/false
Return only checkout sessions with any associated dispute.
Modemodetext
Filter by checkout session mode.One of: payment, subscription, off_session (Off session), setup, reimbursement.
Selling planselling_plantext
Filter by the Shopify selling plan the originating order was placed under, e.g. `gid://shopify/SellingPlan/123`.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "checkout_sessions": [
      {
        "allow_promotion_codes": true,
        "amount_disputed": 1,
        "amount_received": 1,
        "amount_refunded": 1,
        "amount_subtotal": 1,
        "amount_total": 1,
        "cancel_url": "example",
        "capture_method": {},
        "captures": [
          {}
        ],
        "checkout_session_id": "example",
        "client_reference_id": "example",
        "created_at": 1,
        "custom_text": {},
        "customer": {},
        "defaults": {},
        "disputes": [
          {}
        ],
        "expires_at": 1,
        "fees": [
          {}
        ],
        "hsa_fsa_eligible": true,
        "invoice": "example",
        "letter_of_medical_necessity_required": true,
        "metadata": {},
        "mode": {},
        "next_action": {},
        "origin": {},
        "partner": {},
        "payment_intent": {},
        "payment_intents": [
          {}
        ],
        "payment_method_options": {},
        "platform_fees": {},
        "redirect_url": "example",
        "refunds": [
          {}
        ],
        "renewal_as_of": 1,
        "selling_plans": [
          {}
        ],
        "setup_future_use": {},
        "setup_intent": "example",
        "shipping_address_collection": true,
        "shipping_details": {},
        "shipping_options": {},
        "shopify_payment_details": {},
        "split_cart": {},
        "status": {},
        "subscription": {},
        "subscription_data": {},
        "success_url": "example",
        "tax_calculation_mode": {},
        "tax_rate": {},
        "test_mode": true,
        "total_details": {},
        "visit_type": {}
      }
    ]
  }
}

List coupons

Browse coupons in your Flex account.

Inputs

Namenametext
Filter coupons by name.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "coupons": [
      {
        "amount_off": 1,
        "applies_to": {},
        "coupon_id": "example",
        "created_at": {},
        "duration": {},
        "duration_in_months": 1,
        "max_redemptions": 1,
        "metadata": {},
        "name": "example",
        "percent_off": 1,
        "test_mode": true,
        "times_redeemed": 1,
        "valid": true
      }
    ]
  }
}

List customers

Browse customers in your Flex account.

Inputs

Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From 1.0 to 100.0.
Emailemailtext
Filter results by customer email address.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "customers": [
      {
        "created_at": {},
        "customer_id": "example",
        "email": "example",
        "employer": "example",
        "first_name": "example",
        "last_name": "example",
        "metadata": {},
        "owner_partner_id": "example",
        "phone": "example",
        "shipping": {},
        "test_mode": true
      }
    ]
  }
}

List disputes

Browse disputes in your Flex account.

Inputs

Limitlimitnumber
Maximum number of disputes to return (default 20, max 100).From -9007199254740991.0 to 9007199254740991.0.
Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Chargechargetext
Filter by charge ID.
Payment intent IDpayment_intent_idtext
Filter by payment intent ID.
Statusesstatuseslist
Filter by dispute statuses (comma-separated, e.g. `?statuses=needs_response,under_review`).
Expandexpandtext
Comma-separated list of fields to expand (e.g., `?expand=evidence`).

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "disputes": [
      {
        "amount": 1,
        "balance_transactions": [
          {}
        ],
        "charge_id": "example",
        "checkout_session_id": "example",
        "client_reference_id": "example",
        "created_at": {},
        "currency": "example",
        "dispute_id": "example",
        "evidence": {},
        "evidence_details": {},
        "is_charge_refundable": true,
        "metadata": {},
        "payment_intent_id": "example",
        "payment_method_details": {},
        "reason": {},
        "status": {},
        "test_mode": true
      }
    ]
  }
}

List payment intents

Browse payment intents in your Flex account.

Inputs

Expandexpandtext
Comma-separated list of related objects to expand in the response.
Expand customerexpand_customertrue/false
If true, expands the customer object in the response.
Customer IDcustomer_idtext
Filter by customer ID.
Checkout session IDcheckout_session_idtext
Filter by checkout session ID.
Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From -2147483648.0 to 2147483647.0.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "payment_intents": [
      {
        "amount": 1,
        "amount_capturable": 1,
        "amount_received": 1,
        "application_fee_amount": 1,
        "capture_method": {},
        "client_secret": "example",
        "created_at": {},
        "customer": {},
        "invoice": {},
        "last_payment_error": {},
        "latest_charge": {},
        "letter_fee_amount": 1,
        "metadata": {},
        "payment_card_type": {},
        "payment_intent_id": "example",
        "payment_method": {},
        "status": {},
        "test_mode": true,
        "transaction_fee": 1,
        "transfer_data": {},
        "transfer_group": "example"
      }
    ]
  }
}

List prices

Browse prices in your Flex account.

Inputs

Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From -2147483648.0 to 2147483647.0.
Activeactivetrue/false
Only return prices where `active` matches this value.
Product IDproduct_idtext
Filter by product ID to return prices for a specific product.
Expand productexpand_producttrue/false
If true, expands the product object in the response.
Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Lookup keyslookup_keyslist
Lookup keys.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "prices": [
      {
        "active": true,
        "created_at": {},
        "description": "example",
        "hsa_fsa_eligibility": {},
        "lookup_key": "example",
        "metadata": {},
        "owner_partner_id": "example",
        "price_id": "example",
        "product": {},
        "recurring": {},
        "test_mode": true,
        "trial_period_days": 1,
        "type": {},
        "unit_amount": 1
      }
    ]
  }
}

List products

Browse products in your Flex account.

Inputs

Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From 1.0 to 2147483647.0.
Starting afterstarting_aftertext
A cursor for use in pagination. `starting_after` is a product ID that defines your place in the list.
Ending beforeending_beforetext
A cursor for use in pagination. `ending_before` is a product ID that defines your place in the list.
Activeactivetrue/false
Only return products where `active` matches this value.
Client reference IDclient_reference_idtext
Filter products by their client-provided product identifier.
Categorycategorytext
Only return products carrying this category. Matching is case-insensitive.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "products": [
      {
        "active": true,
        "client_reference_id": "example",
        "created_at": {},
        "description": "example",
        "document_description": "example",
        "gtin": "example",
        "hsa_fsa_eligibility": {},
        "metadata": {},
        "name": "example",
        "owner_partner_id": "example",
        "product_id": "example",
        "receipt_description": "example",
        "reference_gtin": "example",
        "test_mode": true,
        "upc_code": "example",
        "url": "example",
        "visit_type": {}
      }
    ]
  }
}

List refunds

Browse refunds in your Flex account.

Inputs

Statusstatustext
Filter by refund status.One of: pending, requires_action (Requires action), succeeded, failed, canceled.
Payment intent IDpayment_intent_idtext
Filter by payment intent ID.
Checkout session IDcheckout_session_idtext
Filter by checkout session ID.
Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.From 1.0 to 100.0.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "refunds": [
      {
        "amount": 1,
        "balance_transaction": {},
        "created_at": {},
        "failure_balance_transaction": {},
        "invoice_id": "example",
        "items": [
          {}
        ],
        "metadata": {},
        "payment_intent_id": "example",
        "reason": {},
        "reference_id": "example",
        "reference_status": {},
        "reference_type": {},
        "refund_id": "example",
        "status": {},
        "subscription_id": "example",
        "test_mode": true
      }
    ]
  }
}

List shipping rates

Browse shipping rates in your Flex account.

Inputs

Activeactivetrue/false
Only return shipping rates where `active` matches this value.
Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From -9007199254740991.0 to 9007199254740991.0.
Starting afterstarting_aftertext
A cursor for use in pagination. `starting_after` is a shipping rate ID that defines your place in the list.
Ending beforeending_beforetext
A cursor for use in pagination. `ending_before` is a shipping rate ID that defines your place in the list.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "shipping_rates": [
      {
        "active": true,
        "amount": 1,
        "created_at": {},
        "display_name": "example",
        "metadata": {},
        "shipping_rate_id": "example"
      }
    ]
  }
}

List subscriptions

Browse subscriptions in your Flex account.

Inputs

Customer IDcustomer_idtext
Filter by customer ID.
Expand customerexpand_customertrue/false
If true, expands the customer object in the response.
Starting afterstarting_aftertext
Starting after.
Ending beforeending_beforetext
Ending before.
Statusstatustext
Filter by subscription status.One of: incomplete, incomplete_expired (Incomplete expired), trialing, active, past_due (Past due), canceled, unpaid, paused.
Limitlimitnumber
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.From 0.0 to 2147483647.0.
Expandexpandtext
Comma-separated list of related objects to expand in the response.

Outputs

dataobject
The response from Flex.
Example output
{
  "data": {
    "subscriptions": [
      {
        "backup_payment_method": {},
        "cancel_at": {},
        "cancel_at_period_end": true,
        "canceled_at": {},
        "client_secret": {},
        "created_at": {},
        "current_period_end": {},
        "current_period_start": {},
        "customer": {},
        "default_payment_method": {},
        "discounts": [
          {}
        ],
        "items": [
          {}
        ],
        "latest_invoice": {},
        "metadata": {},
        "pause": {},
        "proration_behavior": {},
        "status": {},
        "subscription_id": "example",
        "test_mode": true,
        "trial_end": {},
        "trial_start": {}
      }
    ]
  }
}

On this page