API reference

Account Sessions

An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. We recommend that you create an AccountSession each time you need to display an embedded component to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once. Related guide: Connect embedded components

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

Base URL
https://api.knoxapi.com

Create an Account Session

POST/v1/account_sessions

Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.

Body parameters

  • accountstringRequired

    The identifier of the account to create an Account Session for.

  • componentsobjectRequired

    Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).

    Show 22 child parameters
    • account_managementobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • account_onboardingobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • balance_reportobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
    • balancesobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • disputes_listobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • documentsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
    • financial_accountobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • financial_account_transactionsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • instant_payouts_promotionobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • issuing_cardobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • issuing_cards_listobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • notification_bannerobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • payment_detailsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • payment_disputesobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • payment_method_settingsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • paymentsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • payout_detailsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
    • payout_reconciliation_reportobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
    • payoutsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject

        Child parameters are listed in the OpenAPI document.

    • payouts_listobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
    • tax_registrationsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
    • tax_settingsobject
      Show 2 child parameters
      • enabledbooleanRequired
      • featuresobject
  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The account_session object.

POST /v1/account_sessions
curl https://api.knoxapi.com/v1/account_sessions \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  -d account=acct_1Pgc7HKmsySxIypT \
  -d components=
Response
{
  "account": "acct_1Pgc7HKmsySxIypT",
  "client_secret": "accs_secret__QXhWgWIhGJ2Zl68tEmbZ29Gtc86adyWl6eEz2h6K7HtpnoB",
  "components": {
    "account_management": {
      "enabled": false,
      "features": {
        "external_account_collection": true,
        "disable_stripe_user_authentication": true
      }
    },
    "account_onboarding": {
      "enabled": false,
      "features": {
        "external_account_collection": true,
        "disable_stripe_user_authentication": true
      }
    },
    "balances": {
      "enabled": false,
      "features": {
        "edit_payout_schedule": false,
        "external_account_collection": true,
        "standard_payouts": false,
        "disable_stripe_user_authentication": true,
        "instant_payouts": true
      }
    },
    "documents": {
      "enabled": false,
      "features": {}
    },
    "notification_banner": {
      "enabled": false,
      "features": {
        "external_account_collection": true,
        "disable_stripe_user_authentication": true
      }
    },
    "payment_details": {
      "enabled": false,
      "features": {
        "capture_payments": true,
        "destination_on_behalf_of_charge_management": false,
        "dispute_management": true,
        "refund_management": true,
        "smart_disputes_management": true
      }
    },
    "payments": {
      "enabled": false,
      "features": {
        "capture_payments": true,
        "destination_on_behalf_of_charge_management": false,
        "dispute_management": true,
        "refund_management": true,
        "smart_disputes_management": true
      }
    },
    "payouts": {
      "enabled": false,
      "features": {
        "edit_payout_schedule": false,
        "external_account_collection": true,
        "standard_payouts": false,
        "disable_stripe_user_authentication": true,
        "instant_payouts": true
      }
    },
    "payouts_list": {
      "enabled": false,
      "features": {}
    },
    "tax_registrations": {
      "enabled": false,
      "features": {}
    },
    "tax_settings": {
      "enabled": false,
      "features": {}
    },
    "financial_account": {
      "enabled": true,
      "features": {
        "disable_stripe_user_authentication": true,
        "external_account_collection": true,
        "send_money": true,
        "transfer_balance": true
      }
    },
    "financial_account_transactions": {
      "enabled": true,
      "features": {
        "card_spend_dispute_management": true
      }
    },
    "issuing_card": {
      "enabled": true,
      "features": {
        "card_management": true,
        "card_spend_dispute_management": true,
        "cardholder_management": true,
        "spend_control_management": true
      }
    },
    "issuing_cards_list": {
      "enabled": true,
      "features": {
        "card_management": true,
        "card_spend_dispute_management": true,
        "cardholder_management": true,
        "disable_stripe_user_authentication": true,
        "spend_control_management": true
      }
    },
    "disputes_list": {
      "enabled": true,
      "features": {
        "capture_payments": true,
        "destination_on_behalf_of_charge_management": true,
        "dispute_management": true,
        "refund_management": true,
        "smart_disputes_management": true
      }
    },
    "payment_disputes": {
      "enabled": true,
      "features": {
        "destination_on_behalf_of_charge_management": true,
        "dispute_management": true,
        "refund_management": true,
        "smart_disputes_management": true
      }
    },
    "instant_payouts_promotion": {
      "enabled": true,
      "features": {
        "disable_stripe_user_authentication": true,
        "external_account_collection": true,
        "instant_payouts": true
      }
    },
    "payout_details": {
      "enabled": true,
      "features": {}
    },
    "balance_report": {
      "enabled": true,
      "features": {}
    },
    "payout_reconciliation_report": {
      "enabled": true,
      "features": {}
    },
    "payment_method_settings": {
      "enabled": true,
      "features": {
        "disable_stripe_user_authentication": true
      }
    }
  },
  "expires_at": 1234567890,
  "livemode": false,
  "object": "account_session"
}

Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.