Flex
App · 20 actions
Manage your Flex customer and product records and look up HSA and FSA payments.
Actions
| Action | What it does |
|---|---|
| Get a checkout session | Read details for one Flex checkout session. |
| Get a coupon | Read details for one Flex coupon. |
| Get a customer | Read details for one Flex customer. |
| Get a dispute | Read details for one Flex dispute. |
| Get a payment intent | Read details for one Flex payment intent. |
| Get a price | Read details for one Flex price. |
| Get a product | Read details for one Flex product. |
| Get a refund | Read details for one Flex refund. |
| Get a shipping rate | Read details for one Flex shipping rate. |
| Get a subscription | Read details for one Flex subscription. |
| List checkout sessions | Browse checkout sessions in your Flex account. |
| List coupons | Browse coupons in your Flex account. |
| List customers | Browse customers in your Flex account. |
| List disputes | Browse disputes in your Flex account. |
| List payment intents | Browse payment intents in your Flex account. |
| List prices | Browse prices in your Flex account. |
| List products | Browse products in your Flex account. |
| List refunds | Browse refunds in your Flex account. |
| List shipping rates | Browse shipping rates in your Flex account. |
| List subscriptions | Browse subscriptions in your Flex account. |
Get a checkout session
Read details for one Flex checkout session.
Inputs
- Expand customer
expand_customertrue/false - If true, expands the customer object in the response.
- Expand payment intent
expand_payment_intenttrue/false - If true, expands the payment intent object in the response.
- Expand subscription
expand_subscriptiontrue/false - If true, expands the subscription object in the response.
- Expand
expandtext - Comma-separated list of related objects to expand in the response.
- Checkout session ID
checkout_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 ID
coupon_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 ID
customer_idtextRequired - Customer id.
- Include org
include_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 ID
dispute_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
- Expand
expandtext - Comma-separated list of related objects to expand in the response.
- Expand customer
expand_customertrue/false - If true, expands the customer object in the response.
- Payment intent ID
payment_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 product
expand_producttrue/false - If true, expands the product object in the response.
- Price ID
price_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 ID
product_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 ID
refund_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 ID
shipping_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 customer
expand_customertrue/false - If true, expands the customer object in the response.
- Expand
expandtext - Comma-separated list of related objects to expand in the response.
- Subscription ID
subscription_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
- Limit
limitnumber - 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.
- Interval
intervalnumber - Filter by time interval in days (e.g., 30 for last 30 days).From -2147483648.0 to 2147483647.0.
- Payment intent ID
payment_intent_idtext - Filter by payment intent ID.
- Status
statustext - Filter by checkout session status.One of:
open,paid,complete,canceled,expired. - Customer ID
customer_idtext - Filter by customer ID.
- Email
emailtext - Filter results by customer email address.
- Subscription ID
subscription_idtext - Filter by subscription ID.
- Client reference ID
client_reference_idtext - Filter by the client reference ID you provided when creating the checkout session.
- Expand customer
expand_customertrue/false - If true, expands the customer object in the response.
- Expand payment intent
expand_payment_intenttrue/false - If true, expands the payment intent object in the response.
- Expand
expandtext - Comma-separated list of related objects to expand in the response.
- Created at or after
created_at_or_afterdate and time - Return sessions created at or after this timestamp (inclusive). ISO 8601 format.
- Created at or before
created_at_or_beforedate and time - Return sessions created at or before this timestamp (inclusive). ISO 8601 format.
- Starting after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Has disputes
has_disputestrue/false - Return only checkout sessions with any associated dispute.
- Mode
modetext - Filter by checkout session mode.One of:
payment,subscription,off_session(Off session),setup,reimbursement. - Selling plan
selling_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
- Name
nametext - 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 after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Limit
limitnumber - 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.
- Email
emailtext - 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
- Limit
limitnumber - Maximum number of disputes to return (default 20, max 100).From -9007199254740991.0 to 9007199254740991.0.
- Starting after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Charge
chargetext - Filter by charge ID.
- Payment intent ID
payment_intent_idtext - Filter by payment intent ID.
- Statuses
statuseslist - Filter by dispute statuses (comma-separated, e.g. `?statuses=needs_response,under_review`).
- Expand
expandtext - 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
- Expand
expandtext - Comma-separated list of related objects to expand in the response.
- Expand customer
expand_customertrue/false - If true, expands the customer object in the response.
- Customer ID
customer_idtext - Filter by customer ID.
- Checkout session ID
checkout_session_idtext - Filter by checkout session ID.
- Starting after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Limit
limitnumber - 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
- Limit
limitnumber - 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.
- Active
activetrue/false - Only return prices where `active` matches this value.
- Product ID
product_idtext - Filter by product ID to return prices for a specific product.
- Expand product
expand_producttrue/false - If true, expands the product object in the response.
- Starting after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Lookup keys
lookup_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
- Limit
limitnumber - 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 after
starting_aftertext - A cursor for use in pagination. `starting_after` is a product ID that defines your place in the list.
- Ending before
ending_beforetext - A cursor for use in pagination. `ending_before` is a product ID that defines your place in the list.
- Active
activetrue/false - Only return products where `active` matches this value.
- Client reference ID
client_reference_idtext - Filter products by their client-provided product identifier.
- Category
categorytext - 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
- Status
statustext - Filter by refund status.One of:
pending,requires_action(Requires action),succeeded,failed,canceled. - Payment intent ID
payment_intent_idtext - Filter by payment intent ID.
- Checkout session ID
checkout_session_idtext - Filter by checkout session ID.
- Starting after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Limit
limitnumber - 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
- Active
activetrue/false - Only return shipping rates where `active` matches this value.
- Limit
limitnumber - 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 after
starting_aftertext - A cursor for use in pagination. `starting_after` is a shipping rate ID that defines your place in the list.
- Ending before
ending_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 ID
customer_idtext - Filter by customer ID.
- Expand customer
expand_customertrue/false - If true, expands the customer object in the response.
- Starting after
starting_aftertext - Starting after.
- Ending before
ending_beforetext - Ending before.
- Status
statustext - Filter by subscription status.One of:
incomplete,incomplete_expired(Incomplete expired),trialing,active,past_due(Past due),canceled,unpaid,paused. - Limit
limitnumber - 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.
- Expand
expandtext - 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": {}
}
]
}
}