code
stringlengths
34
10.1k
nl
stringlengths
52
6.18k
'''The schedule object { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1637053645, "completed_at": null, "created": 1636545743, "current_phase": null, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1668685170, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1637149170, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null } '''
The schedule objectAttributes id string Unique identifier for the object. current_phase hash Object representing the start and end dates for the current phase of the subscription schedule, if it is active.Show child attributes customer string expandable ID of the customer who owns the subscription schedule. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. phases array of hashes Configuration for the subscription schedule’s phases.Show child attributes status string The present status of the subscription schedule. Possible values are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide. subscription string expandable ID of the subscription managed by the subscription schedule.More attributesExpand all object string, value is "subscription_schedule" application string expandable "application" Connect only canceled_at timestamp completed_at timestamp created timestamp default_settings hash end_behavior string livemode boolean released_at timestamp released_subscription string test_clock string expandable
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionSchedule.create( customer="cus_8TEMHVY5moxIPI", start_date=1660122035, end_behavior="release", phases=[ { "items": [ { "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, }, ], "iterations": 12, }, ], ) '''Response { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1637053645, "completed_at": null, "created": 1659518858, "current_phase": { "start_date": 1660122035, "end_date": 1691658035 }, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1691658035, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1660122035, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null }'''
Create a scheduleCreates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.Parameters customer optional The identifier of the customer to create the subscription schedule for. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. phases optional array of hashes List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the end_date of one phase will always equal the start_date of the next phase.Show child parameters start_date optional When the subscription schedule starts. We recommend using now so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.More parametersExpand all default_settings optional dictionary end_behavior optional from_subscription optional ReturnsReturns a subscription schedule object if the call succeeded
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionSchedule.retrieve( "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", ) '''Response { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1637053645, "completed_at": null, "created": 1636545743, "current_phase": null, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1668685170, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1637149170, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null }'''
Retrieve a scheduleRetrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.ParametersNo parameters.ReturnsReturns a subscription schedule object if a valid identifier was provided
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionSchedule.modify( "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", end_behavior="release", ) '''Response { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1637053645, "completed_at": null, "created": 1636545743, "current_phase": null, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1668685170, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1637149170, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null }'''
Update a scheduleUpdates an existing subscription schedule.Parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. phases optional array of hashes List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the end_date of one phase will always equal the start_date of the next phase. Note that past phases can be omitted.Show child parameters proration_behavior optional enum If the update changes the current phase, indicates whether the changes should be prorated. The default value is create_prorations. Possible enum valuesnone create_prorations Prorate changes, but leave any prorations as pending invoice items to be picked up on the customer’s next invoice.More parametersExpand all default_settings optional dictionary end_behavior optional ReturnsReturns an updated subscription schedule object if the call succeeded
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionSchedule.cancel( "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", ) '''Response { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1659518858, "completed_at": null, "created": 1636545743, "current_phase": null, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1668685170, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1637149170, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null }'''
Cancel a scheduleCancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.Parameters invoice_now optional If the subscription schedule is active, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to true.More parametersExpand all prorate optional ReturnsThe canceled subscription_schedule object. Its status will be canceled and canceled_at will be the current time
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionSchedule.release( "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", ) '''Response { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1637053645, "completed_at": null, "created": 1636545743, "current_phase": null, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1668685170, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1637149170, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null }'''
Release a scheduleReleases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.ParametersExpand all preserve_cancel_date optional ReturnsThe released subscription_schedule object. Its status will be released, released_at will be the current time, and released_subscription will be the ID of the subscription the subscription schedule managed prior to being released
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionSchedule.list(limit=3) '''Response { "object": "list", "url": "/v1/subscription_schedules", "has_more": false, "data": [ { "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6", "object": "subscription_schedule", "application": null, "canceled_at": 1637053645, "completed_at": null, "created": 1636545743, "current_phase": null, "customer": "cus_8TEMHVY5moxIPI", "default_settings": { "application_fee_percent": null, "automatic_tax": { "enabled": false }, "billing_cycle_anchor": "automatic", "billing_thresholds": null, "collection_method": "charge_automatically", "default_payment_method": null, "invoice_settings": null, "transfer_data": null }, "end_behavior": "release", "livemode": false, "metadata": {}, "phases": [ { "add_invoice_items": [], "application_fee_percent": null, "billing_cycle_anchor": null, "billing_thresholds": null, "collection_method": null, "coupon": null, "default_payment_method": null, "default_tax_rates": [], "end_date": 1668685170, "invoice_settings": null, "items": [ { "billing_thresholds": null, "price": "plan_JiX4v6L7JY0Vyt", "quantity": 1, "tax_rates": [] } ], "metadata": {}, "proration_behavior": "create_prorations", "start_date": 1637149170, "transfer_data": null, "trial_end": null } ], "released_at": null, "released_subscription": null, "status": "canceled", "subscription": null, "test_clock": null }, {...}, {...} ] }'''
List all schedulesRetrieves the list of your subscription schedules.Parameters customer optional Only return subscription schedules for the given customer.More parametersExpand all canceled_at optional dictionary completed_at optional dictionary created optional dictionary ending_before optional limit optional released_at optional dictionary scheduled optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit subscription schedules, starting after subscription schedule starting_after. Each entry in the array is a separate subscription schedule object. If no more subscription schedules are available, the resulting array will be empty. This request should never raise an error
'''Endpoints  POST /v1/test_helpers/test_clocks   GET /v1/test_helpers/test_clocks/:idDELETE /v1/test_helpers/test_clocks/:id  POST /v1/test_helpers/test_clocks/:id/advance   GET /v1/test_helpers/test_clocks '''
Test ClocksA test clock enables deterministic control over objects in testmode. With a test clock, you can create objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time
'''The test clock object { "id": "clock_1LSdra2eZvKYlo2CQeY0nYT7", "object": "test_helpers.test_clock", "created": 1659518858, "deletes_after": 1660123658, "frozen_time": 1577836800, "livemode": false, "name": null, "status": "ready" } '''
The test clock objectAttributes id string Unique identifier for the object. object string, value is "test_helpers.test_clock" String representing the object’s type. Objects of the same type share the same value. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. deletes_after timestamp Time at which this clock is scheduled to auto delete. frozen_time timestamp Time at which all objects belonging to this clock are frozen. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. name string The custom name supplied at creation. status enum The status of the Test Clock.Possible enum valuesready All test clock objects have advanced to the frozen_time.advancing In the process of advancing time for the test clock objects.internal_failure Failed to advance time. Future requests to advance time will fail
import stripe stripe.api_key = "sk_test_your_key" stripe.test_helpers.TestClock.create( frozen_time=1577836800, ) '''Response { "id": "clock_1LSdra2eZvKYlo2CQeY0nYT7", "object": "test_helpers.test_clock", "created": 1659518858, "deletes_after": 1660123658, "frozen_time": 1577836800, "livemode": false, "name": null, "status": "ready" }'''
Create a test clockCreates a new test clock that can be attached to new customers and quotes.Parameters frozen_time required The initial frozen time for this test clock. name optional The name for this test clock.ReturnsThe newly created TestClock object is returned upon success. Otherwise, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.test_helpers.TestClock.retrieve( "clock_1LSdra2eZvKYlo2CQeY0nYT7", ) '''Response { "id": "clock_1LSdra2eZvKYlo2CQeY0nYT7", "object": "test_helpers.test_clock", "created": 1659518858, "deletes_after": 1660123658, "frozen_time": 1577836800, "livemode": false, "name": null, "status": "ready" }'''
Retrieve a test clockRetrieves a test clock.ParametersNo parameters.ReturnsReturns the TestClock object. Otherwise, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.test_helpers.TestClock.delete( "clock_1LSdra2eZvKYlo2CQeY0nYT7", ) '''Response { "id": "clock_1LSdra2eZvKYlo2CQeY0nYT7", "object": "test_helpers.test_clock", "deleted": true }'''
Delete a test clockDeletes a test clock.ParametersNo parameters.ReturnsThe deleted TestClock object is returned upon success. Otherwise, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.test_helpers.TestClock.advance( "clock_1LSdra2eZvKYlo2CQeY0nYT7", frozen_time=1659605258, ) '''Response { "id": "clock_1LSdra2eZvKYlo2CQeY0nYT7", "object": "test_helpers.test_clock", "created": 1659518858, "deletes_after": 1660123658, "frozen_time": 1659518858, "livemode": false, "name": null, "status": "advancing" }'''
Advance a test clockStarts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.Parameters frozen_time required The time to advance the test clock. Must be after the test clock’s current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.ReturnsA TestClock object with status Advancing is returned upon success. Otherwise, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.test_helpers.TestClock.list(limit=3) '''Response { "object": "list", "url": "/v1/test_helpers/test_clocks", "has_more": false, "data": [ { "id": "clock_1LSdra2eZvKYlo2CQeY0nYT7", "object": "test_helpers.test_clock", "created": 1659518858, "deletes_after": 1660123658, "frozen_time": 1577836800, "livemode": false, "name": null, "status": "ready" }, {...}, {...} ] }'''
List all test clocksReturns a list of your test clocks.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit test clocks, starting after starting_after. Each entry in the array is a separate test clock object. If no more test clocks are available, the resulting array will be empty. This request should never raise an error
'''Endpoints  POST /v1/subscription_items/:id/usage_records   GET /v1/subscription_items/:id/usage_record_summaries '''
Usage RecordsUsage records allow you to report customer usage and metrics to Stripe for metered billing of subscription prices.
'''The usage record object { "id": "mbur_1CkclQ2eZvKYlo2CMSx3PSos", "object": "usage_record", "livemode": false, "quantity": 100, "subscription_item": "si_DAyhPiOTjrdfTv", "timestamp": 1530817484 } '''
The usage record objectAttributes id string Unique identifier for the object. quantity positive integer or zero The usage quantity for the specified date. subscription_item string The ID of the subscription item this usage record contains data for. timestamp timestamp The timestamp when this usage occurred.More attributesExpand all object string, value is "usage_record" livemode boolean
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionItem.create_usage_record( "si_DAyhPiOTjrdfTv", quantity=100, timestamp=1571252444, ) '''Response { "id": "mbur_1CkclQ2eZvKYlo2CMSx3PSos", "object": "usage_record", "livemode": false, "quantity": 100, "subscription_item": "si_DAyhPiOTjrdfTv", "timestamp": 1571252444 }'''
Create a usage recordCreates a usage record for a specified subscription item and date, and fills it with a quantity. Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers. The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter. The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.Parameters quantity required The usage quantity for the specified timestamp. action optional enum Valid values are increment (default) or set. When using increment the specified quantity will be added to the usage at the specified timestamp. The set action will overwrite the usage quantity at that timestamp. If the subscription has billing thresholds, increment is the only allowed value.Possible enum valuesset increment timestamp optional The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided subscription_item, and must not be in the future. When passing "now", Stripe records usage for the current time. Default is "now" if a value is not provided.ReturnsReturns the usage record object
import stripe stripe.api_key = "sk_test_your_key" stripe.SubscriptionItem.list_usage_record_summaries( "si_DAyhPiOTjrdfTv", limit=3, ) '''Response { "object": "list", "url": "/v1/subscription_items/si_DAyhPiOTjrdfTv/usage_record_summaries", "has_more": false, "data": [ { "id": "sis_1DkWqo2eZvKYlo2Cs4NSCMMw", "object": "usage_record_summary", "invoice": "in_1DkWqo2eZvKYlo2Cghtks5xk", "livemode": false, "period": { "end": null, "start": null }, "subscription_item": "si_18PMl42eZvKYlo2CGduFchWC", "total_usage": 1 }, {...}, {...} ] }'''
List all subscription item period summariesFor the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September). The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit summaries, starting after summary starting_after. Each entry in the array is a separate summary object. If no more summaries are available, the resulting array is empty
'''Endpoints  POST /v1/accounts   GET /v1/accounts/:id  POST /v1/accounts/:idDELETE /v1/accounts/:id  POST /v1/accounts/:id/reject   GET /v1/accounts  POST /v1/accounts/:id/login_links '''
AccountsThis is an object representing a Stripe account. You can retrieve it to see properties on the account like its current e-mail address or if the account is enabled yet to make live charges.Some properties, marked below, are available only to platforms that want to create and manage Express or Custom accounts
'''Response (Standard){ "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "controller": { "type": "application", "is_controller": true }, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "requirements.past_due", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "standard" }Response (Express){ "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "requirements.past_due", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "express" }Response (Custom){ "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "business_type": null, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "requirements.past_due", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "custom" }'''
The account objectAttributes id string Unique identifier for the object. business_type enum custom only The business type.Possible enum valuesindividual company non_profit government_entity US only capabilities hash A hash containing the set of capabilities that was requested for this account and their associated states. Keys are names of capabilities. You can see the full list here. Values may be active, inactive, or pending.Show child attributes company hash custom only Information about the company or business. This field is available for any business_type.Show child attributes country string The account’s country. email string An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders. individual hash custom only Information about the person represented by the account. This field is null unless business_type is set to individual.Show child attributes metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. requirements hash Information about the requirements for the account, including what information needs to be collected, and by when.Show child attributes tos_acceptance hash Details on the acceptance of the Stripe Services AgreementShow child attributes type string The Stripe account type. Can be standard, express, or custom.More attributesExpand all object string, value is "account" business_profile hash charges_enabled boolean controller hash created timestamp default_currency string details_submitted boolean external_accounts list future_requirements hash payouts_enabled boolean settings hash
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.create( type="custom", country="US", email="jenny.rosen@example.com", capabilities={ "card_payments": {"requested": True}, "transfers": {"requested": True}, }, ) '''Response { "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "business_type": null, "capabilities": { "card_payments": { "requested": true }, "transfers": { "requested": true } }, "charges_enabled": false, "controller": { "type": "account" }, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "jenny.rosen@example.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "requirements.past_due", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "custom" }'''
Create an accountWith Connect, you can create Stripe accounts for your users. To do this, you’ll first need to register your platform.Parameters type required The type of Stripe account to create. May be one of custom, express or standard. country optional default is your own country The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you’re creating an account is legally represented in Canada, you would use CA as the country for the account being created. Available countries include Stripe’s global markets as well as countries where cross-border payouts are supported. email optional The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. capabilities required for Custom accounts Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. Show child parameters business_type optional enum The business type.Possible enum valuesindividual company non_profit government_entity US only company optional dictionary Information about the company or business. This field is available for any business_type.Show child parameters individual optional dictionary Information about the person represented by the account. This field is null unless business_type is set to individual.Show child parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. tos_acceptance optional dictionary Details on the account’s acceptance of the Stripe Services Agreement.Show child parametersMore parametersExpand all account_token optional business_profile optional dictionary default_currency optional documents optional dictionary external_account optional dictionary settings optional dictionary ReturnsReturns an Account object if the call succeeds
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.retrieve("acct_1032D82eZvKYlo2C") '''Response { "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "business_type": null, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "controller": { "type": "account" }, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "requirements.past_due", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "custom" }'''
Retrieve accountRetrieves the details of an account.ParametersNo parameters.ReturnsReturns an Account object if the call succeeds. If the account ID does not exist, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.modify( "acct_1032D82eZvKYlo2C", metadata={"order_id": "6735"}, ) '''Response { "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "business_type": null, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "controller": { "type": "account" }, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": { "order_id": "6735" }, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "requirements.past_due", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "standard" }'''
Update an accountUpdates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts. To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.Parameters business_type optional enum custom only The business type.Possible enum valuesindividual company non_profit government_entity US only capabilities optional dictionary Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive. Show child parameters company optional dictionary custom only Information about the company or business. This field is available for any business_type.Show child parameters email optional custom only The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent. individual optional dictionary custom only Information about the person represented by the account. This field is null unless business_type is set to individual.Show child parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. tos_acceptance optional dictionary custom only Details on the account’s acceptance of the Stripe Services Agreement.Show child parametersMore parametersExpand all account_token optional business_profile optional dictionary custom and express default_currency optional custom only documents optional dictionary custom only external_account optional dictionary custom only settings optional dictionary ReturnsReturns an Account object if the call succeeds. If the account ID does not exist or another issue occurs, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.delete("acct_1032D82eZvKYlo2C") '''Response { "id": "acct_1032D82eZvKYlo2C", "object": "account", "deleted": true }'''
Delete an accountWith Connect, you can delete accounts you manage. Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero. If you want to delete your own account, use the account information tab in your account settings instead.ParametersNo parameters.ReturnsReturns an object with a deleted parameter if the call succeeds. If the account ID does not exist, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.reject( "acct_1032D82eZvKYlo2C", reason="fraud", ) '''Response { "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "business_type": null, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "controller": { "type": "account" }, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "rejected.fraud", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "custom" }'''
Reject an accountWith Connect, you may flag accounts as suspicious. Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.Parameters reason required The reason for rejecting the account. Can be fraud, terms_of_service, or other.ReturnsReturns an account with payouts_enabled and charges_enabled set to false on success. If the account ID does not exist, this call raises an error
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.list(limit=3) '''Response { "object": "list", "url": "/v1/accounts", "has_more": false, "data": [ { "id": "acct_1032D82eZvKYlo2C", "object": "account", "business_profile": { "mcc": null, "name": "Stripe.com", "product_description": null, "support_address": null, "support_email": null, "support_phone": null, "support_url": null, "url": null }, "business_type": null, "capabilities": { "card_payments": "active", "transfers": "active" }, "charges_enabled": false, "controller": { "type": "account" }, "country": "US", "created": 1385798567, "default_currency": "usd", "details_submitted": false, "email": "site@stripe.com", "external_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts" }, "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "metadata": {}, "payouts_enabled": false, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "disabled_reason": "rejected.fraud", "errors": [], "eventually_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "past_due": [ "business_profile.mcc", "business_profile.product_description", "business_profile.support_phone", "business_profile.url", "business_type", "external_account", "person_8UayFKIMRJklog.first_name", "person_8UayFKIMRJklog.last_name", "tos_acceptance.date", "tos_acceptance.ip" ], "pending_verification": [] }, "settings": { "bacs_debit_payments": {}, "branding": { "icon": null, "logo": null, "primary_color": null, "secondary_color": null }, "card_issuing": { "tos_acceptance": { "date": null, "ip": null } }, "card_payments": { "decline_on": { "avs_failure": true, "cvc_failure": false }, "statement_descriptor_prefix": null, "statement_descriptor_prefix_kanji": null, "statement_descriptor_prefix_kana": null }, "dashboard": { "display_name": "Stripe.com", "timezone": "US/Pacific" }, "payments": { "statement_descriptor": null, "statement_descriptor_kana": null, "statement_descriptor_kanji": null }, "payouts": { "debit_negative_balances": true, "schedule": { "delay_days": 7, "interval": "daily" }, "statement_descriptor": null }, "sepa_debit_payments": {} }, "tos_acceptance": { "date": null, "ip": null, "user_agent": null }, "type": "custom" }, {...}, {...} ] }'''
List all connected accountsReturns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.ParametersExpand all created optional dictionary ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit accounts, starting after account starting_after. Each entry in the array is a separate Account object. If no more accounts are available, the resulting array is empty
'''The login link object { "object": "login_link", "created": 1659519654, "url": "https://connect.stripe.com/express/X09dNBBXgfnV" } '''
The login link objectAttributes url string The URL for the login link.More attributesExpand all object string, value is "login_link" created timestamp
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.create_login_link( "acct_1032D82eZvKYlo2C", ) '''Response { "object": "login_link", "created": 1659519654, "url": "https://connect.stripe.com/express/X09dNBBXgfnV", "id": "lael_MB04tZyQfNL5ik" }'''
Create a login linkCreates a single-use login link for an Express account to access their Stripe dashboard. You may only create login links for Express accounts connected to your platform.ParametersNo parameters.ReturnsReturns a login link object if the call succeeded
'''Endpoints  POST /v1/account_links '''
Account LinksAccount Links are the means by which a Connect platform grants a connected account permission to access Stripe-hosted applications, such as Connect Onboarding.
'''The account link object { "object": "account_link", "created": 1659518871, "expires_at": 1659519171, "url": "https://connect.stripe.com/setup/s/acct_1032D82eZvKYlo2C/NTrNjTttIi9Y" } '''
The account link objectAttributes expires_at timestamp The timestamp at which this account link will expire. url string The URL for the account link.More attributesExpand all object string, value is "account_link" created timestamp
import stripe stripe.api_key = "sk_test_your_key" stripe.AccountLink.create( account="acct_1032D82eZvKYlo2C", refresh_url="https://example.com/reauth", return_url="https://example.com/return", type="account_onboarding", ) '''Response { "object": "account_link", "created": 1659518871, "expires_at": 1659519171, "url": "https://connect.stripe.com/setup/s/acct_1032D82eZvKYlo2C/NTrNjTttIi9Y" }'''
Create an account linkCreates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.Parameters account required The identifier of the account to create an account link for. refresh_url required The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link’s URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. return_url required The URL that the user will be redirected to upon leaving or completing the linked flow. type required The type of account link the user is requesting. Possible values are account_onboarding or account_update.Possible enum valuesaccount_onboarding Provides a form for inputting outstanding requirements. Send the user to the form in this mode to just collect the new information you need.account_update Custom only Displays the fields that are already populated on the account object, and allows your user to edit previously provided information. Consider framing this as “edit my profile” or “update my verification information”.More parametersExpand all collect optional Custom & Express only ReturnsReturns an account link object if the call succeeded
'''Endpoints   GET /v1/application_fees/:id   GET /v1/application_fees '''
Application FeesWhen you collect a transaction fee on top of a charge made for your user (using Connect), an Application Fee object is created in your account. You can list, retrieve, and refund application fees.
'''The application fee object { "id": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "object": "application_fee", "account": "acct_164wxjKbnvuxQXGu", "amount": 105, "amount_refunded": 105, "application": "ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7", "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "charge": "ch_1B73DOKbnvuxQXGurbwPqzsu", "created": 1506609734, "currency": "gbp", "livemode": false, "originating_transaction": null, "refunded": true, "refunds": { "object": "list", "data": [ { "id": "fr_1JAu9EKbnvuxQXGuRdZYkxVW", "object": "fee_refund", "amount": 0, "balance_transaction": null, "created": 1625738880, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": { "order_id": "6735" } }, { "id": "fr_1HZK0UKbnvuxQXGuS428gH0W", "object": "fee_refund", "amount": 0, "balance_transaction": null, "created": 1602005482, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} }, { "id": "fr_D0s7fGBKB40Twy", "object": "fee_refund", "amount": 138, "balance_transaction": "txn_1CaqNg2eZvKYlo2C75cA3Euk", "created": 1528486576, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} } ], "has_more": false, "url": "/v1/application_fees/fee_1B73DOKbnvuxQXGuhY8Aw0TN/refunds" } } '''
The application fee objectAttributes id string Unique identifier for the object. account string expandable ID of the Stripe account this fee was taken from. amount integer Amount earned, in cents. amount_refunded positive integer or zero Amount in cents refunded (can be less than the amount attribute on the fee if a partial refund was issued) charge string expandable ID of the charge that the application fee was taken from. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. refunded boolean Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.More attributesExpand all object string, value is "application_fee" application string expandable "application" balance_transaction string expandable created timestamp livemode boolean originating_transaction string expandable refunds list
import stripe stripe.api_key = "sk_test_your_key" stripe.ApplicationFee.retrieve( "fee_1B73DOKbnvuxQXGuhY8Aw0TN", ) '''Response { "id": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "object": "application_fee", "account": "acct_164wxjKbnvuxQXGu", "amount": 105, "amount_refunded": 105, "application": "ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7", "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "charge": "ch_1B73DOKbnvuxQXGurbwPqzsu", "created": 1506609734, "currency": "gbp", "livemode": false, "originating_transaction": null, "refunded": true, "refunds": { "object": "list", "data": [ { "id": "fr_1JAu9EKbnvuxQXGuRdZYkxVW", "object": "fee_refund", "amount": 0, "balance_transaction": null, "created": 1625738880, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": { "order_id": "6735" } }, { "id": "fr_1HZK0UKbnvuxQXGuS428gH0W", "object": "fee_refund", "amount": 0, "balance_transaction": null, "created": 1602005482, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} }, { "id": "fr_D0s7fGBKB40Twy", "object": "fee_refund", "amount": 138, "balance_transaction": "txn_1CaqNg2eZvKYlo2C75cA3Euk", "created": 1528486576, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} } ], "has_more": false, "url": "/v1/application_fees/fee_1B73DOKbnvuxQXGuhY8Aw0TN/refunds" } }'''
Retrieve an application feeRetrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.ParametersNo parameters.ReturnsReturns an application fee object if a valid identifier was provided, and raises an error otherwise
import stripe stripe.api_key = "sk_test_your_key" stripe.ApplicationFee.list(limit=3) '''Response { "object": "list", "url": "/v1/application_fees", "has_more": false, "data": [ { "id": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "object": "application_fee", "account": "acct_164wxjKbnvuxQXGu", "amount": 105, "amount_refunded": 105, "application": "ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7", "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "charge": "ch_1B73DOKbnvuxQXGurbwPqzsu", "created": 1506609734, "currency": "gbp", "livemode": false, "originating_transaction": null, "refunded": true, "refunds": { "object": "list", "data": [ { "id": "fr_1JAu9EKbnvuxQXGuRdZYkxVW", "object": "fee_refund", "amount": 0, "balance_transaction": null, "created": 1625738880, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": { "order_id": "6735" } }, { "id": "fr_1HZK0UKbnvuxQXGuS428gH0W", "object": "fee_refund", "amount": 0, "balance_transaction": null, "created": 1602005482, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} }, { "id": "fr_D0s7fGBKB40Twy", "object": "fee_refund", "amount": 138, "balance_transaction": "txn_1CaqNg2eZvKYlo2C75cA3Euk", "created": 1528486576, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} } ], "has_more": false, "url": "/v1/application_fees/fee_1B73DOKbnvuxQXGuhY8Aw0TN/refunds" } }, {...}, {...} ] }'''
List all application feesReturns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.Parameters charge optional Only return application fees for the charge specified by this charge ID.More parametersExpand all created optional dictionary ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit application fees, starting after application fee starting_after. Each entry in the array is a separate application fee object. If no more fees are available, the resulting array will be empty
'''Endpoints  POST /v1/application_fees/:id/refunds   GET /v1/application_fees/:id/refunds/:id  POST /v1/application_fees/:id/refunds/:id   GET /v1/application_fees/:id/refunds '''
Application Fee RefundsApplication Fee Refund objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.
'''The application fee refund object { "id": "fr_1LSdsmKbnvuxQXGuvj6t3v8t", "object": "fee_refund", "amount": 100, "balance_transaction": null, "created": 1659518932, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} } '''
The application fee refund objectAttributes id string Unique identifier for the object. amount integer Amount, in cents. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. fee string expandable ID of the application fee that was refunded. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.More attributesExpand all object string, value is "fee_refund" balance_transaction string expandable created timestamp
import stripe stripe.api_key = "sk_test_your_key" stripe.ApplicationFee.create_refund( "fee_1B73DOKbnvuxQXGuhY8Aw0TN", ) '''Response { "id": "fr_1LSdsmKbnvuxQXGuvj6t3v8t", "object": "fee_refund", "amount": 100, "balance_transaction": null, "created": 1659518932, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} }'''
Create an application fee refundRefunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected. You can optionally refund only part of an application fee. You can do so multiple times, until the entire fee has been refunded. Once entirely refunded, an application fee can’t be refunded again. This method will raise an error when called on an already-refunded application fee, or when trying to refund more money than is left on an application fee.Parameters amount optional, default is entire application fee A positive integer, in cents, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.ReturnsReturns the Application Fee Refund object if the refund succeeded. Raises an error if the fee has already been refunded, or if an invalid fee identifier was provided
import stripe stripe.api_key = "sk_test_your_key" stripe.ApplicationFee.retrieve_refund( "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "fr_1LSdsmKbnvuxQXGuvj6t3v8t", ) '''Response { "id": "fr_1LSdsmKbnvuxQXGuvj6t3v8t", "object": "fee_refund", "amount": 100, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1659518932, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} }'''
Retrieve an application fee refundBy default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.ParametersNo parameters.ReturnsReturns the application fee refund object
import stripe stripe.api_key = "sk_test_your_key" stripe.ApplicationFee.modify_refund( "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "fr_1LSdsmKbnvuxQXGuvj6t3v8t", metadata={"order_id": "6735"}, ) '''Response { "id": "fr_1LSdsmKbnvuxQXGuvj6t3v8t", "object": "fee_refund", "amount": 100, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1659518932, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": { "order_id": "6735" } }'''
Update an application fee refundUpdates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata as an argument.Parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.ReturnsReturns the application fee refund object if the update succeeded. This call will raise an error if update parameters are invalid
import stripe stripe.api_key = "sk_test_your_key" stripe.ApplicationFee.list_refunds( "fee_1B73DOKbnvuxQXGuhY8Aw0TN", limit=3, ) '''Response { "object": "list", "url": "/v1/application_fees/fee_1B73DOKbnvuxQXGuhY8Aw0TN/fee_refunds", "has_more": false, "data": [ { "id": "fr_1LSdsmKbnvuxQXGuvj6t3v8t", "object": "fee_refund", "amount": 100, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1659518932, "currency": "usd", "fee": "fee_1B73DOKbnvuxQXGuhY8Aw0TN", "metadata": {} }, {...}, {...} ] }'''
List all application fee refundsYou can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit refunds, starting after starting_after. Each entry in the array is a separate application fee refund object. If no more refunds are available, the resulting array will be empty. If you provide a non-existent application fee ID, this call raises an error
'''Endpoints   GET /v1/accounts/:id/capabilities/:id  POST /v1/accounts/:id/capabilities/:id   GET /v1/accounts/:id/capabilities '''
CapabilitiesThis is an object representing a capability for a Stripe account.
'''The capability object { "id": "card_payments", "object": "capability", "account": "acct_1032D82eZvKYlo2C", "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "requested": true, "requested_at": 1659518932, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "status": "inactive" } '''
The capability objectAttributes id string The identifier for the capability. account string expandable The account for which the capability enables functionality. requested boolean Whether the capability has been requested. requirements hash Information about the requirements for the capability, including what information needs to be collected, and by when.Show child attributes status string The status of the capability. Can be active, inactive, pending, or unrequested.More attributesExpand all object string, value is "capability" future_requirements hash requested_at timestamp
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.retrieve_capability( "acct_1032D82eZvKYlo2C", "card_payments", ) '''Response { "id": "card_payments", "object": "capability", "account": "acct_1032D82eZvKYlo2C", "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "requested": true, "requested_at": 1659518932, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "status": "inactive" }'''
Retrieve an Account CapabilityRetrieves information about the specified Account Capability.ParametersNo parameters.ReturnsReturns an Account Capability object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.modify_capability( "acct_1032D82eZvKYlo2C", "card_payments", requested=True, ) '''Response { "id": "acap_1LSdsm2eZvKYlo2CW09gVzDk", "object": "capability", "account": "acct_1032D82eZvKYlo2C", "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "requested": true, "requested_at": 1659518932, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "status": "inactive" }'''
Update an Account CapabilityUpdates an existing Account Capability.Parameters requested optional Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the requirements arrays.ReturnsReturns an Account Capability object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.list_capabilities( "acct_1032D82eZvKYlo2C", ) '''Response { "object": "list", "url": "/v1/accounts/acct_1032D82eZvKYlo2C/capabilities", "has_more": false, "data": [ { "id": "card_payments", "object": "capability", "account": "acct_1032D82eZvKYlo2C", "future_requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "requested": true, "requested_at": 1659518932, "requirements": { "alternatives": [], "current_deadline": null, "currently_due": [], "disabled_reason": null, "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "status": "inactive" }, {...}, {...} ] }'''
List all account capabilitiesReturns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.ParametersNo parameters.ReturnsA dictionary with a data property that contains an array of the capabilities of this account. Each entry in the array is a separate capability object
'''Endpoints   GET /v1/country_specs   GET /v1/country_specs/:id '''
Country SpecsStripe needs to collect certain pieces of information about each account created. These requirements can differ depending on the account's country. The Country Specs API makes these rules available to your integration.You can also view the information from this API call as an online guide
'''The country spec object { "id": "US", "object": "country_spec", "default_currency": "usd", "supported_bank_account_currencies": { "usd": [ "US" ] }, "supported_payment_currencies": [ "usd", "aed", "afn", "..." ], "supported_payment_methods": [ "ach", "card", "stripe" ], "supported_transfer_countries": [ "US", "AE", "AR", "AT", "AU", "BE", "BG", "BO", "CA", "CH", "CI", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EE", "EG", "ES", "FI", "FR", "GB", "GM", "GR", "HK", "HR", "HU", "ID", "IE", "IL", "IS", "IT", "JP", "KE", "KR", "LI", "LT", "LU", "LV", "MA", "MT", "MX", "MY", "NL", "NO", "NZ", "PE", "PH", "PL", "PT", "PY", "RO", "RS", "SA", "SE", "SG", "SI", "SK", "SV", "TH", "TN", "TR", "TT", "UY", "ZA", "BD", "BJ", "JM", "MC", "NE", "SN", "AG", "BH", "GH", "GT", "GY", "KW", "LC", "MU", "NA", "SM", "AM", "BA", "OM", "PA", "AZ", "BN", "BT", "EC", "MD", "MK", "QA" ], "verification_fields": { "company": { "additional": [], "minimum": [ "business_profile.mcc", "business_profile.url", "business_type", "company.address.city", "company.address.line1", "company.address.postal_code", "company.address.state", "company.name", "company.owners_provided", "company.phone", "company.tax_id", "external_account", "owners.address.city", "owners.address.line1", "owners.address.postal_code", "owners.address.state", "owners.dob.day", "owners.dob.month", "owners.dob.year", "owners.email", "owners.first_name", "owners.id_number", "owners.last_name", "owners.phone", "owners.ssn_last_4", "owners.verification.document", "representative.address.city", "representative.address.line1", "representative.address.postal_code", "representative.address.state", "representative.dob.day", "representative.dob.month", "representative.dob.year", "representative.email", "representative.first_name", "representative.id_number", "representative.last_name", "representative.phone", "representative.relationship.executive", "representative.relationship.title", "representative.ssn_last_4", "representative.verification.document", "tos_acceptance.date", "tos_acceptance.ip" ] }, "individual": { "additional": [], "minimum": [ "business_profile.mcc", "business_profile.url", "business_type", "external_account", "individual.address.city", "individual.address.line1", "individual.address.postal_code", "individual.address.state", "individual.dob.day", "individual.dob.month", "individual.dob.year", "individual.email", "individual.first_name", "individual.id_number", "individual.last_name", "individual.phone", "individual.ssn_last_4", "individual.verification.document", "tos_acceptance.date", "tos_acceptance.ip" ] } } } '''
The country spec objectAttributes id string Unique identifier for the object. Represented as the ISO country code for this country. default_currency string The default currency for this country. This applies to both payment methods and bank accounts. supported_bank_account_currencies hash Currencies that can be accepted in the specific country (for transfers). supported_payment_currencies array containing strings Currencies that can be accepted in the specified country (for payments). supported_payment_methods array containing strings Payment methods available in the specified country. You may need to enable some payment methods (e.g., ACH) on your account before they appear in this list. The stripe payment method refers to charging through your platform. supported_transfer_countries array containing strings Countries that can accept transfers from the specified country.More attributesExpand all object string, value is "country_spec" verification_fields hash
import stripe stripe.api_key = "sk_test_your_key" stripe.CountrySpec.list(limit=3) '''Response { "object": "list", "url": "/v1/country_specs", "has_more": false, "data": [ { "id": "US", "object": "country_spec", "default_currency": "usd", "supported_bank_account_currencies": { "usd": [ "US" ] }, "supported_payment_currencies": [ "usd", "aed", "afn", "..." ], "supported_payment_methods": [ "ach", "card", "stripe" ], "supported_transfer_countries": [ "US", "AE", "AR", "AT", "AU", "BE", "BG", "BO", "CA", "CH", "CI", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EE", "EG", "ES", "FI", "FR", "GB", "GM", "GR", "HK", "HR", "HU", "ID", "IE", "IL", "IS", "IT", "JP", "KE", "KR", "LI", "LT", "LU", "LV", "MA", "MT", "MX", "MY", "NL", "NO", "NZ", "PE", "PH", "PL", "PT", "PY", "RO", "RS", "SA", "SE", "SG", "SI", "SK", "SV", "TH", "TN", "TR", "TT", "UY", "ZA", "BD", "BJ", "JM", "MC", "NE", "SN", "AG", "BH", "GH", "GT", "GY", "KW", "LC", "MU", "NA", "SM", "AM", "BA", "OM", "PA", "AZ", "BN", "BT", "EC", "MD", "MK", "QA" ], "verification_fields": { "company": { "additional": [], "minimum": [ "business_profile.mcc", "business_profile.url", "business_type", "company.address.city", "company.address.line1", "company.address.postal_code", "company.address.state", "company.name", "company.owners_provided", "company.phone", "company.tax_id", "external_account", "owners.address.city", "owners.address.line1", "owners.address.postal_code", "owners.address.state", "owners.dob.day", "owners.dob.month", "owners.dob.year", "owners.email", "owners.first_name", "owners.id_number", "owners.last_name", "owners.phone", "owners.ssn_last_4", "owners.verification.document", "representative.address.city", "representative.address.line1", "representative.address.postal_code", "representative.address.state", "representative.dob.day", "representative.dob.month", "representative.dob.year", "representative.email", "representative.first_name", "representative.id_number", "representative.last_name", "representative.phone", "representative.relationship.executive", "representative.relationship.title", "representative.ssn_last_4", "representative.verification.document", "tos_acceptance.date", "tos_acceptance.ip" ] }, "individual": { "additional": [], "minimum": [ "business_profile.mcc", "business_profile.url", "business_type", "external_account", "individual.address.city", "individual.address.line1", "individual.address.postal_code", "individual.address.state", "individual.dob.day", "individual.dob.month", "individual.dob.year", "individual.email", "individual.first_name", "individual.id_number", "individual.last_name", "individual.phone", "individual.ssn_last_4", "individual.verification.document", "tos_acceptance.date", "tos_acceptance.ip" ] } } }, {...}, {...} ] }'''
List Country SpecsLists all Country Spec objects available in the API.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns a list of country_spec objects
import stripe stripe.api_key = "sk_test_your_key" stripe.CountrySpec.retrieve("US") '''Response { "id": "US", "object": "country_spec", "default_currency": "usd", "supported_bank_account_currencies": { "usd": [ "US" ] }, "supported_payment_currencies": [ "usd", "aed", "afn", "..." ], "supported_payment_methods": [ "ach", "card", "stripe" ], "supported_transfer_countries": [ "US", "AE", "AR", "AT", "AU", "BE", "BG", "BO", "CA", "CH", "CI", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EE", "EG", "ES", "FI", "FR", "GB", "GM", "GR", "HK", "HR", "HU", "ID", "IE", "IL", "IS", "IT", "JP", "KE", "KR", "LI", "LT", "LU", "LV", "MA", "MT", "MX", "MY", "NL", "NO", "NZ", "PE", "PH", "PL", "PT", "PY", "RO", "RS", "SA", "SE", "SG", "SI", "SK", "SV", "TH", "TN", "TR", "TT", "UY", "ZA", "BD", "BJ", "JM", "MC", "NE", "SN", "AG", "BH", "GH", "GT", "GY", "KW", "LC", "MU", "NA", "SM", "AM", "BA", "OM", "PA", "AZ", "BN", "BT", "EC", "MD", "MK", "QA" ], "verification_fields": { "company": { "additional": [], "minimum": [ "business_profile.mcc", "business_profile.url", "business_type", "company.address.city", "company.address.line1", "company.address.postal_code", "company.address.state", "company.name", "company.owners_provided", "company.phone", "company.tax_id", "external_account", "owners.address.city", "owners.address.line1", "owners.address.postal_code", "owners.address.state", "owners.dob.day", "owners.dob.month", "owners.dob.year", "owners.email", "owners.first_name", "owners.id_number", "owners.last_name", "owners.phone", "owners.ssn_last_4", "owners.verification.document", "representative.address.city", "representative.address.line1", "representative.address.postal_code", "representative.address.state", "representative.dob.day", "representative.dob.month", "representative.dob.year", "representative.email", "representative.first_name", "representative.id_number", "representative.last_name", "representative.phone", "representative.relationship.executive", "representative.relationship.title", "representative.ssn_last_4", "representative.verification.document", "tos_acceptance.date", "tos_acceptance.ip" ] }, "individual": { "additional": [], "minimum": [ "business_profile.mcc", "business_profile.url", "business_type", "external_account", "individual.address.city", "individual.address.line1", "individual.address.postal_code", "individual.address.state", "individual.dob.day", "individual.dob.month", "individual.dob.year", "individual.email", "individual.first_name", "individual.id_number", "individual.last_name", "individual.phone", "individual.ssn_last_4", "individual.verification.document", "tos_acceptance.date", "tos_acceptance.ip" ] } } }'''
Retrieve a Country SpecReturns a Country Spec for a given Country code.ParametersNo parameters.ReturnsReturns a country_spec object if a valid country code is provided, and raises an error otherwise
'''Endpoints  POST /v1/accounts/:id/external_accounts   GET /v1/accounts/:id/external_accounts/:id  POST /v1/accounts/:id/external_accounts/:idDELETE /v1/accounts/:id/external_accounts/:id   GET /v1/accounts/:id/external_accounts?object=bank_account  POST /v1/accounts/:id/external_accounts   GET /v1/accounts/:id/external_accounts/:id  POST /v1/accounts/:id/external_accounts/:idDELETE /v1/accounts/:id/external_accounts/:id   GET /v1/accounts/:id/external_accounts?object=card '''
External AccountsExternal Accounts are transfer destinations on Account objects for connected accounts. They can be bank accounts or debit cards.Bank accounts and debit cards can also be used as payment sources on regular charges, and are documented in the links above.
'''The (account) bank account object { "id": "ba_1LSds92eZvKYlo2CqMnJaute", "object": "bank_account", "account": "acct_1032D82eZvKYlo2C", "account_holder_name": "Jane Austen", "account_holder_type": "individual", "account_type": null, "available_payout_methods": [ "standard" ], "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "fingerprint": "1JWtPxqbdX5Gamtz", "last4": "6789", "metadata": {}, "routing_number": "110000000", "status": "new" } '''
The (account) bank account objectAttributes id string Unique identifier for the object. account string expandable The ID of the account that the bank account is associated with. bank_name string Name of the bank associated with the routing number (e.g., WELLS FARGO). country string Two-letter ISO code representing the country the bank account is located in. currency currency Three-letter ISO code for the currency paid out to the bank account. default_for_currency boolean Whether this bank account is the default external account for its currency. last4 string The last four digits of the bank account number. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. routing_number string The routing transit number for the bank account. status string For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn’t had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we’ll set the status to errored and will not continue to send transfers until the bank details are updated. For external accounts, possible values are new and errored. Validations aren’t run against external accounts because they’re only used for payouts. This means the other statuses don’t apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.More attributesExpand all object string, value is "bank_account" account_holder_name string account_holder_type string account_type string available_payout_methods array customer string expandable fingerprint string
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.create_external_account( "acct_1032D82eZvKYlo2C", external_account="btok_1LSds72eZvKYlo2Cn81vxdpp", ) '''Response { "id": "ba_1LSds32eZvKYlo2C27ZyVavY", "object": "bank_account", "account_holder_name": "Jane Austen", "account_holder_type": "company", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "metadata": {}, "routing_number": "110000000", "status": "new", "account": "acct_1032D82eZvKYlo2C" }'''
Create a bank accountWhen you create a new bank account, you must specify a Custom account to create it on.If the bank account's owner has no other external account in the bank account's currency, the new bank account will become the default for that currency. However, if the owner already has a bank account for that currency, the new account will become the default only if the default_for_currency parameter is set to true.Parameters external_account required Either a token, like the ones returned by Stripe.js, or a dictionary containing a user’s bank account details (with the options shown below).Show child parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all default_for_currency optional ReturnsReturns the bank account object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.retrieve_external_account( "acct_1032D82eZvKYlo2C", "ba_1LSds92eZvKYlo2CqMnJaute", ) '''Response { "id": "ba_1LSds32eZvKYlo2C27ZyVavY", "object": "bank_account", "account_holder_name": "Jane Austen", "account_holder_type": "company", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "customer": null, "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "metadata": {}, "routing_number": "110000000", "status": "new" }'''
Retrieve a bank accountBy default, you can see the 10 most recent external accounts stored on a connected account directly on the object. You can also retrieve details about a specific bank account stored on the account.ParametersNo parameters.ReturnsReturns the bank account object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.modify_external_account( "acct_1032D82eZvKYlo2C", "ba_1LSds32eZvKYlo2C27ZyVavY", metadata={"order_id": "6735"}, ) '''Response { "id": "ba_1LSds32eZvKYlo2C27ZyVavY", "object": "bank_account", "account_holder_name": "Jane Austen", "account_holder_type": "company", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "metadata": { "order_id": "6735" }, "routing_number": "110000000", "status": "new", "account": "acct_1032D82eZvKYlo2C" }'''
Update a bank accountUpdates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design. You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.Parameters default_for_currency optional When set to true, this becomes the default external account for its currency. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all account_holder_name optional account_holder_type optional account_type optional ReturnsReturns the bank account object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.delete_external_account( "acct_1032D82eZvKYlo2C", "ba_1LSds32eZvKYlo2C27ZyVavY", ) '''Response { "id": "ba_1LSds92eZvKYlo2CqMnJaute", "object": "bank_account", "deleted": true }'''
Delete a bank accountYou can delete destination bank accounts from a Custom account.There are restrictions for deleting a bank account with default_for_currency set to true. You cannot delete a bank account if any of the following apply:The bank account's currency is the same as the Account[default_currency].There is another external account (card or bank account) with the same currency as the bank account.To delete a bank account, you must first replace the default external account by setting default_for_currency with another external account in the same currency.ParametersNo parameters.ReturnsReturns the deleted bank account object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.list_external_accounts( "acct_1032D82eZvKYlo2C", object="bank_account", limit=3, ) '''Response { "object": "list", "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts", "has_more": false, "data": [ { "id": "ba_1LSds32eZvKYlo2C27ZyVavY", "object": "bank_account", "account_holder_name": "Jane Austen", "account_holder_type": "company", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "metadata": {}, "routing_number": "110000000", "status": "new", "account": "acct_1032D82eZvKYlo2C" }, {...}, {...} ] }'''
List all bank accountsYou can see a list of the bank accounts that belong to a connected account. Note that the 10 most recent external accounts are always available by default on the corresponding Stripe object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns a list of the bank accounts stored on the account
'''The (account) card object { "id": "card_1LSds52eZvKYlo2C2trSBqxB", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "customer": null, "cvc_check": "pass", "dynamic_last4": null, "exp_month": 8, "exp_year": 2023, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "last4": "4242", "metadata": {}, "name": null, "redaction": null, "tokenization_method": null } '''
The (account) card objectAttributes id string Unique identifier for the object. account string expandable custom Connect only The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. address_city string City/District/Suburb/Town/Village. address_country string Billing address country, if provided when creating card. address_line1 string Address line 1 (Street address/PO Box/Company name). address_line2 string Address line 2 (Apartment/Suite/Unit/Building). address_state string State/County/Province/Region. address_zip string ZIP or postal code. address_zip_check string If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked. brand string Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown. country string Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you’ve collected. currency currency custom Connect only Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. cvc_check string If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. A result of unchecked indicates that CVC was provided but hasn’t been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see Check if a card is valid without a charge. default_for_currency boolean custom Connect only Whether this card is the default external account for its currency. exp_month integer Two-digit number representing the card’s expiration month. exp_year integer Four-digit number representing the card’s expiration year. fingerprint string Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card — one for India and one for the rest of the world. funding string Card funding type. Can be credit, debit, prepaid, or unknown. last4 string The last four digits of the card. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. name string Cardholder name. status string For external accounts, possible values are new and errored. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.More attributesExpand all object string, value is "card" address_line1_check string available_payout_methods array customer string expandable dynamic_last4 string recipient string expandable tokenization_method string
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.create_external_account( "acct_1032D82eZvKYlo2C", external_account="tok_visa_debit", ) '''Response { "id": "card_1LSds52eZvKYlo2C2trSBqxB", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 8, "exp_year": 2023, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "last4": "4242", "metadata": {}, "name": null, "redaction": null, "tokenization_method": null, "account": "acct_1032D82eZvKYlo2C" }'''
Create a cardWhen you create a new debit card, you must specify a Custom account to create it on.If the account has no default destination card, then the new card will become the default. However, if the owner already has a default then it will not change. To change the default, you should set default_for_currency to true when creating a card for a Custom account.Parameters external_account required A token, like the ones returned by Stripe.js. Stripe will automatically validate the card.Show child parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all default_for_currency optional ReturnsReturns the card object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.retrieve_external_account( "acct_1032D82eZvKYlo2C", "card_1LSds52eZvKYlo2C2trSBqxB", ) '''Response { "id": "card_1LSds52eZvKYlo2C2trSBqxB", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 8, "exp_year": 2023, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "last4": "4242", "metadata": {}, "name": null, "redaction": null, "tokenization_method": null, "account": "acct_1032D82eZvKYlo2C" }'''
Retrieve a cardBy default, you can see the 10 most recent external accounts stored on a connected account directly on the object. You can also retrieve details about a specific card stored on the account.ParametersNo parameters.ReturnsReturns the card object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.modify_external_account( "acct_1032D82eZvKYlo2C", "card_1LSds52eZvKYlo2C2trSBqxB", metadata={"order_id": "6735"}, ) '''Response { "id": "card_1LSds52eZvKYlo2C2trSBqxB", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 8, "exp_year": 2023, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "last4": "4242", "metadata": {}, "name": "Jenny Rosen", "redaction": null, "tokenization_method": null, "account": "acct_1032D82eZvKYlo2C" }'''
Update a cardIf you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. Stripe also works directly with card networks so that your customers can continue using your service without interruption.Parameters default_for_currency optional When set to true, this becomes the default external account for its currency. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all address_city optional address_country optional address_line1 optional address_line2 optional address_state optional address_zip optional exp_month optional exp_year optional name optional ReturnsReturns the card object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.delete_external_account( "acct_1032D82eZvKYlo2C", "card_1LSds52eZvKYlo2C2trSBqxB", ) '''Response { "id": "card_1LSds52eZvKYlo2C2trSBqxB", "object": "card", "deleted": true }'''
Delete a cardYou can delete cards from a Custom account.There are restrictions for deleting a card with default_for_currency set to true. You cannot delete a card if any of the following apply:The card's currency is the same as the Account[default_currency].There is another external account (card or bank account) with the same currency as the card.To delete a card, you must first replace the default external account by setting default_for_currency with another external account in the same currency.ParametersNo parameters.ReturnsReturns the deleted card object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.list_external_accounts( "acct_1032D82eZvKYlo2C", object="card", limit=3, ) '''Response { "object": "list", "url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts", "has_more": false, "data": [ { "id": "card_1LSds52eZvKYlo2C2trSBqxB", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "US", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 8, "exp_year": 2023, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "last4": "4242", "metadata": {}, "name": null, "redaction": null, "tokenization_method": null, "account": "acct_1032D82eZvKYlo2C" }, {...}, {...} ] }'''
List all cardsYou can see a list of the cards that belong to a connected account. The 10 most recent external accounts are available on the account object. If you need more than 10, you can use this API method and the limit and starting_after parameters to page through additional cards.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns a list of the cards stored on the account
'''Endpoints  POST /v1/accounts/:id/persons   GET /v1/accounts/:id/persons/:id  POST /v1/accounts/:id/persons/:idDELETE /v1/accounts/:id/persons/:id   GET /v1/accounts/:id/persons '''
PersonThis is an object representing a person associated with a Stripe account.A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.
'''The person object { "id": "person_1LSe5d2eZvKYlo2CpJsBMQu0", "object": "person", "account": "acct_1032D82eZvKYlo2C", "created": 1659519729, "dob": { "day": null, "month": null, "year": null }, "first_name": null, "future_requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "id_number_provided": false, "last_name": null, "metadata": {}, "relationship": { "director": false, "executive": false, "owner": false, "percent_ownership": null, "representative": false, "title": null }, "requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "ssn_last_4_provided": false, "verification": { "additional_document": { "back": null, "details": null, "details_code": null, "front": null }, "details": null, "details_code": null, "document": { "back": null, "details": null, "details_code": null, "front": null }, "status": "unverified" } } '''
The person objectAttributes id string Unique identifier for the object. account string The account the person is associated with. address hash The person’s address.Show child attributes dob hash The person’s date of birth.Show child attributes email string The person’s email address. first_name string The person’s first name. last_name string The person’s last name. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. phone string The person’s phone number. relationship hash Describes the person’s relationship to the account.Show child attributes requirements hash Information about the requirements for this person, including what information needs to be collected, and by when.Show child attributesMore attributesExpand all object string, value is "person" address_kana hash address_kanji hash created timestamp first_name_kana string first_name_kanji string full_name_aliases array containing strings future_requirements hash gender string id_number_provided boolean id_number_secondary_provided boolean last_name_kana string last_name_kanji string maiden_name string nationality string political_exposure enum registered_address hash ssn_last_4_provided boolean verification hash
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.create_person( "acct_1032D82eZvKYlo2C", first_name="Jane", last_name="Diaz", ) '''Response { "id": "person_1LSe5d2eZvKYlo2CpJsBMQu0", "object": "person", "account": "acct_1032D82eZvKYlo2C", "created": 1659519729, "dob": { "day": null, "month": null, "year": null }, "first_name": null, "future_requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "id_number_provided": false, "last_name": null, "metadata": {}, "relationship": { "director": false, "executive": false, "owner": false, "percent_ownership": null, "representative": false, "title": null }, "requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "ssn_last_4_provided": false, "verification": { "additional_document": { "back": null, "details": null, "details_code": null, "front": null }, "details": null, "details_code": null, "document": { "back": null, "details": null, "details_code": null, "front": null }, "status": "unverified" } }'''
Create a personCreates a new person.Parameters address optional dictionary The person’s address.Show child parameters dob optional dictionary The person’s date of birth.Show child parameters email optional The person’s email address. first_name optional The person’s first name. id_number optional The person’s ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a PII token provided by Stripe.js. last_name optional The person’s last name. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. phone optional The person’s phone number. relationship optional dictionary The relationship that this person has with the account’s legal entity.Show child parameters ssn_last_4 optional The last four digits of the person’s Social Security number (U.S. only).More parametersExpand all address_kana optional dictionary address_kanji optional dictionary documents optional dictionary first_name_kana optional first_name_kanji optional full_name_aliases optional gender optional id_number_secondary optional last_name_kana optional last_name_kanji optional maiden_name optional nationality optional person_token optional political_exposure optional registered_address optional dictionary verification optional dictionary ReturnsReturns a person object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.retrieve_person( "acct_1032D82eZvKYlo2C", "person_1LSe5d2eZvKYlo2CpJsBMQu0", ) '''Response { "id": "person_1LSe5d2eZvKYlo2CpJsBMQu0", "object": "person", "account": "acct_1032D82eZvKYlo2C", "created": 1659519729, "dob": { "day": null, "month": null, "year": null }, "first_name": null, "future_requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "id_number_provided": false, "last_name": null, "metadata": {}, "relationship": { "director": false, "executive": false, "owner": false, "percent_ownership": null, "representative": false, "title": null }, "requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "ssn_last_4_provided": false, "verification": { "additional_document": { "back": null, "details": null, "details_code": null, "front": null }, "details": null, "details_code": null, "document": { "back": null, "details": null, "details_code": null, "front": null }, "status": "unverified" } }'''
Retrieve a personRetrieves an existing person.ParametersNo parameters.ReturnsReturns a person object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.modify_person( "acct_1032D82eZvKYlo2C", "person_1LSe5d2eZvKYlo2CpJsBMQu0", metadata={"order_id": "6735"}, ) '''Response { "id": "person_1LSe5d2eZvKYlo2CpJsBMQu0", "object": "person", "account": "acct_1032D82eZvKYlo2C", "created": 1659519729, "dob": { "day": null, "month": null, "year": null }, "first_name": null, "future_requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "id_number_provided": false, "last_name": null, "metadata": { "order_id": "6735" }, "relationship": { "director": false, "executive": false, "owner": false, "percent_ownership": null, "representative": false, "title": null }, "requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "ssn_last_4_provided": false, "verification": { "additional_document": { "back": null, "details": null, "details_code": null, "front": null }, "details": null, "details_code": null, "document": { "back": null, "details": null, "details_code": null, "front": null }, "status": "unverified" } }'''
Update a personUpdates an existing person.Parameters address optional dictionary The person’s address.Show child parameters dob optional dictionary The person’s date of birth.Show child parameters email optional The person’s email address. first_name optional The person’s first name. id_number optional The person’s ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a PII token provided by Stripe.js. last_name optional The person’s last name. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. phone optional The person’s phone number. relationship optional dictionary The relationship that this person has with the account’s legal entity.Show child parameters ssn_last_4 optional The last four digits of the person’s Social Security number (U.S. only).More parametersExpand all address_kana optional dictionary address_kanji optional dictionary documents optional dictionary first_name_kana optional first_name_kanji optional full_name_aliases optional gender optional id_number_secondary optional last_name_kana optional last_name_kanji optional maiden_name optional nationality optional person_token optional political_exposure optional registered_address optional dictionary verification optional dictionary ReturnsReturns a person object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.delete_person( "acct_1032D82eZvKYlo2C", "person_1LSe5d2eZvKYlo2CpJsBMQu0", ) '''Response { "id": "person_1LSe5d2eZvKYlo2CpJsBMQu0", "object": "person", "deleted": true }'''
Delete a personDeletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file. ParametersNo parameters.ReturnsReturns the deleted person object
import stripe stripe.api_key = "sk_test_your_key" stripe.Account.list_persons( "acct_1032D82eZvKYlo2C", limit=3, ) '''Response { "object": "list", "url": "/v1/accounts/acct_1032D82eZvKYlo2C/persons", "has_more": false, "data": [ { "id": "person_1LSe5d2eZvKYlo2CpJsBMQu0", "object": "person", "account": "acct_1032D82eZvKYlo2C", "created": 1659519729, "dob": { "day": null, "month": null, "year": null }, "first_name": null, "future_requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "id_number_provided": false, "last_name": null, "metadata": {}, "relationship": { "director": false, "executive": false, "owner": false, "percent_ownership": null, "representative": false, "title": null }, "requirements": { "alternatives": [], "currently_due": [], "errors": [], "eventually_due": [], "past_due": [], "pending_verification": [] }, "ssn_last_4_provided": false, "verification": { "additional_document": { "back": null, "details": null, "details_code": null, "front": null }, "details": null, "details_code": null, "document": { "back": null, "details": null, "details_code": null, "front": null }, "status": "unverified" } }, {...}, {...} ] }'''
List all personsReturns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.Parameters relationship optional dictionary Filters on the list of people returned based on the person’s relationship to the account’s company.Show child parametersMore parametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit people, starting after person starting_after. Each entry in the array is a separate person object. If no more people are available, the resulting array will be empty
'''Endpoints  POST /v1/topups   GET /v1/topups/:id  POST /v1/topups/:id   GET /v1/topups  POST /v1/topups/:id/cancel '''
Top-upsTo top up your Stripe balance, you create a top-up object. You can retrieve individual top-ups, as well as list all top-ups. Top-ups are identified by a unique, random ID.
'''The top-up object { "id": "tu_1LSdsB2eZvKYlo2CPBrD5rKA", "object": "topup", "amount": 1000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up description", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "metadata": { "order_id": "12345678" }, "source": { "id": "src_1LSdsB2eZvKYlo2CYlHKaT69", "object": "source", "ach_debit": { "country": "US", "type": "individual", "routing_number": "110000000", "bank_name": "STRIPE TEST BANK", "fingerprint": "5Wh4KBcfDrz5IOnx", "last4": "6789" }, "amount": null, "client_secret": "src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I", "created": 1659518895, "currency": "usd", "flow": "code_verification", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redaction": null, "statement_descriptor": null, "status": "pending", "type": "ach_debit", "usage": "reusable" }, "statement_descriptor": null, "status": "pending", "transfer_group": null } '''
The top-up objectAttributes id string Unique identifier for the object. amount integer Amount transferred. currency string Three-letter ISO currency code, in lowercase. Must be a supported currency. description string An arbitrary string attached to the object. Often useful for displaying to users. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. status string The status of the top-up is either canceled, failed, pending, reversed, or succeeded.More attributesExpand all object string, value is "topup" balance_transaction string expandable created timestamp expected_availability_date integer failure_code string failure_message string livemode boolean source hash, source object statement_descriptor string transfer_group string
import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.Topup.create( amount=2000, currency="usd", description="Top-up for Jenny Rosen", statement_descriptor="Top-up", ) '''Response { "id": "tu_1LSdsB2eZvKYlo2CPBrD5rKA", "object": "topup", "amount": 2000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up for Jenny Rosen", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "metadata": { "order_id": "12345678" }, "source": { "id": "src_1LSdsB2eZvKYlo2CYlHKaT69", "object": "source", "ach_debit": { "country": "US", "type": "individual", "routing_number": "110000000", "bank_name": "STRIPE TEST BANK", "fingerprint": "5Wh4KBcfDrz5IOnx", "last4": "6789" }, "amount": null, "client_secret": "src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I", "created": 1659518895, "currency": "usd", "flow": "code_verification", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redaction": null, "statement_descriptor": null, "status": "pending", "type": "ach_debit", "usage": "reusable" }, "statement_descriptor": "Top-up", "status": "pending", "transfer_group": null }'''
Create a top-upTop up the balance of an accountParameters amount required A positive integer representing how much to transfer. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. description optional An arbitrary string attached to the object. Often useful for displaying to users. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all source optional statement_descriptor optional transfer_group optional ReturnsReturns the top-up object
import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.Topup.retrieve( "tu_1LSdsB2eZvKYlo2CPBrD5rKA", ) '''Response { "id": "tu_1LSdsB2eZvKYlo2CPBrD5rKA", "object": "topup", "amount": 1000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up description", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "metadata": { "order_id": "12345678" }, "source": { "id": "src_1LSdsB2eZvKYlo2CYlHKaT69", "object": "source", "ach_debit": { "country": "US", "type": "individual", "routing_number": "110000000", "bank_name": "STRIPE TEST BANK", "fingerprint": "5Wh4KBcfDrz5IOnx", "last4": "6789" }, "amount": null, "client_secret": "src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I", "created": 1659518895, "currency": "usd", "flow": "code_verification", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redaction": null, "statement_descriptor": null, "status": "pending", "type": "ach_debit", "usage": "reusable" }, "statement_descriptor": null, "status": "pending", "transfer_group": null }'''
Retrieve a top-upRetrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.ParametersNo parameters.ReturnsReturns a top-up if a valid identifier was provided, and raises an error otherwise
import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.Topup.modify( "tu_1LSdsB2eZvKYlo2CPBrD5rKA", metadata={"order_id": "6735"}, ) '''Response { "id": "tu_1LSdsB2eZvKYlo2CPBrD5rKA", "object": "topup", "amount": 1000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up description", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "metadata": { "order_id": "6735" }, "source": { "id": "src_1LSdsB2eZvKYlo2CYlHKaT69", "object": "source", "ach_debit": { "country": "US", "type": "individual", "routing_number": "110000000", "bank_name": "STRIPE TEST BANK", "fingerprint": "5Wh4KBcfDrz5IOnx", "last4": "6789" }, "amount": null, "client_secret": "src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I", "created": 1659518895, "currency": "usd", "flow": "code_verification", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redaction": null, "statement_descriptor": null, "status": "pending", "type": "ach_debit", "usage": "reusable" }, "statement_descriptor": null, "status": "pending", "transfer_group": null }'''
Update a top-upUpdates the metadata of a top-up. Other top-up details are not editable by design.Parameters description optional An arbitrary string attached to the object. Often useful for displaying to users. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.ReturnsThe newly updated top-up object if the call succeeded. Otherwise, this call raises an error
import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.Topup.list(limit=3) '''Response { "object": "list", "url": "/v1/topups", "has_more": false, "data": [ { "id": "tu_1LSdsB2eZvKYlo2CPBrD5rKA", "object": "topup", "amount": 1000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up description", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "metadata": { "order_id": "12345678" }, "source": { "id": "src_1LSdsB2eZvKYlo2CYlHKaT69", "object": "source", "ach_debit": { "country": "US", "type": "individual", "routing_number": "110000000", "bank_name": "STRIPE TEST BANK", "fingerprint": "5Wh4KBcfDrz5IOnx", "last4": "6789" }, "amount": null, "client_secret": "src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I", "created": 1659518895, "currency": "usd", "flow": "code_verification", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redaction": null, "statement_descriptor": null, "status": "pending", "type": "ach_debit", "usage": "reusable" }, "statement_descriptor": null, "status": "pending", "transfer_group": null }, {...}, {...} ] }'''
List all top-upsReturns a list of top-ups.Parameters status optional Only return top-ups that have the given status. One of canceled, failed, pending or succeeded.More parametersExpand all amount optional dictionary created optional dictionary ending_before optional limit optional starting_after optional ReturnsA dictionary containing the data property, which is an array of separate top-up objects. The number of top-ups in the array is limited to the number designated in limit. If no more top-ups are available, the resulting array will be empty. This request should never raise an error
import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.Topup.cancel("tu_1LSdsB2eZvKYlo2CPBrD5rKA") '''Response { "id": "tu_1LSdsB2eZvKYlo2CPBrD5rKA", "object": "topup", "amount": 1000, "balance_transaction": null, "created": 123456789, "currency": "usd", "description": "Top-up for Jenny Rosen", "expected_availability_date": 123456789, "failure_code": null, "failure_message": null, "livemode": false, "metadata": { "order_id": "12345678" }, "source": { "id": "src_1LSdsB2eZvKYlo2CYlHKaT69", "object": "source", "ach_debit": { "country": "US", "type": "individual", "routing_number": "110000000", "bank_name": "STRIPE TEST BANK", "fingerprint": "5Wh4KBcfDrz5IOnx", "last4": "6789" }, "amount": null, "client_secret": "src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I", "created": 1659518895, "currency": "usd", "flow": "code_verification", "livemode": false, "metadata": {}, "owner": { "address": null, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redaction": null, "statement_descriptor": null, "status": "pending", "type": "ach_debit", "usage": "reusable" }, "statement_descriptor": null, "status": "canceled", "transfer_group": null }'''
Cancel a top-upCancels a top-up. Only pending top-ups can be canceled.ParametersNo parameters.ReturnsReturns the canceled top-up. If the top-up is already canceled or can’t be canceled, an error is returned
'''Endpoints  POST /v1/transfers   GET /v1/transfers/:id  POST /v1/transfers/:id   GET /v1/transfers '''
TransfersA Transfer object is created when you move funds between Stripe accounts as part of Connect.Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout object, with corresponding payout endpoints. For more information, read about the transfer/payout split.
'''The transfer object { "id": "tr_3LCspD2eZvKYlo2C02wegtL1", "object": "transfer", "amount": 8000, "amount_reversed": 400, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1655763124, "currency": "usd", "description": "files", "destination": "acct_1AojmwI9Pbw6jkMZ", "destination_payment": "py_1LCspEI9Pbw6jkMZFXNCdw6R", "livemode": false, "metadata": {}, "reversals": { "object": "list", "data": [ { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOIHA2eZvKYlo2C5BcdzQSo", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIHA2eZvKYlo2Cipghkcca", "created": 1658482564, "currency": "usd", "destination_payment_refund": "pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOHcd2eZvKYlo2Cnij37pKX", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOHcd2eZvKYlo2C29QFNLJI", "created": 1658480051, "currency": "usd", "destination_payment_refund": "pyr_1LOHcdI9Pbw6jkMZiDv4NOH4", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LNxbx2eZvKYlo2CUmCEbiBC", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LNxbx2eZvKYlo2CO2wY5Zen", "created": 1658403129, "currency": "usd", "destination_payment_refund": "pyr_1LNxbxI9Pbw6jkMZHiYe6cyc", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" } ], "has_more": false, "url": "/v1/transfers/tr_3LCspD2eZvKYlo2C02wegtL1/reversals" }, "reversed": false, "source_transaction": "ch_3LCspD2eZvKYlo2C0x1hr0GY", "source_type": "card", "transfer_group": "group_pi_3LCspD2eZvKYlo2C0vli1FBj" } '''
The transfer objectAttributes id string Unique identifier for the object. amount integer Amount in cents to be transferred. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. description string An arbitrary string attached to the object. Often useful for displaying to users. destination string expandable ID of the Stripe account the transfer was sent to. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.More attributesExpand all object string, value is "transfer" amount_reversed integer balance_transaction string expandable created timestamp destination_payment string expandable livemode boolean reversals list reversed boolean source_transaction string expandable source_type string transfer_group string
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.create( amount=400, currency="usd", destination="acct_1032D82eZvKYlo2C", transfer_group="ORDER_95", ) '''Response { "id": "tr_3LCspD2eZvKYlo2C02wegtL1", "object": "transfer", "amount": 400, "amount_reversed": 400, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1655763124, "currency": "usd", "description": "files", "destination": "acct_1032D82eZvKYlo2C", "destination_payment": "py_1LCspEI9Pbw6jkMZFXNCdw6R", "livemode": false, "metadata": {}, "reversals": { "object": "list", "data": [ { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOIHA2eZvKYlo2C5BcdzQSo", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIHA2eZvKYlo2Cipghkcca", "created": 1658482564, "currency": "usd", "destination_payment_refund": "pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOHcd2eZvKYlo2Cnij37pKX", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOHcd2eZvKYlo2C29QFNLJI", "created": 1658480051, "currency": "usd", "destination_payment_refund": "pyr_1LOHcdI9Pbw6jkMZiDv4NOH4", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LNxbx2eZvKYlo2CUmCEbiBC", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LNxbx2eZvKYlo2CO2wY5Zen", "created": 1658403129, "currency": "usd", "destination_payment_refund": "pyr_1LNxbxI9Pbw6jkMZHiYe6cyc", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" } ], "has_more": false, "url": "/v1/transfers/tr_3LCspD2eZvKYlo2C02wegtL1/reversals" }, "reversed": false, "source_transaction": "ch_3LCspD2eZvKYlo2C0x1hr0GY", "source_type": "card", "transfer_group": "ORDER_95" }'''
Create a transferTo send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.Parameters amount required A positive integer in cents representing how much to transfer. currency required 3-letter ISO code for currency. destination required The ID of a connected Stripe account. See the Connect documentation for details. description optional An arbitrary string attached to the object. Often useful for displaying to users. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all source_transaction optional source_type optional transfer_group optional ReturnsReturns a transfer object if there were no initial errors with the transfer creation (e.g., insufficient funds)
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.retrieve( "tr_3LCspD2eZvKYlo2C02wegtL1", ) '''Response { "id": "tr_3LCspD2eZvKYlo2C02wegtL1", "object": "transfer", "amount": 8000, "amount_reversed": 400, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1655763124, "currency": "usd", "description": "files", "destination": "acct_1AojmwI9Pbw6jkMZ", "destination_payment": "py_1LCspEI9Pbw6jkMZFXNCdw6R", "livemode": false, "metadata": {}, "reversals": { "object": "list", "data": [ { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOIHA2eZvKYlo2C5BcdzQSo", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIHA2eZvKYlo2Cipghkcca", "created": 1658482564, "currency": "usd", "destination_payment_refund": "pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOHcd2eZvKYlo2Cnij37pKX", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOHcd2eZvKYlo2C29QFNLJI", "created": 1658480051, "currency": "usd", "destination_payment_refund": "pyr_1LOHcdI9Pbw6jkMZiDv4NOH4", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LNxbx2eZvKYlo2CUmCEbiBC", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LNxbx2eZvKYlo2CO2wY5Zen", "created": 1658403129, "currency": "usd", "destination_payment_refund": "pyr_1LNxbxI9Pbw6jkMZHiYe6cyc", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" } ], "has_more": false, "url": "/v1/transfers/tr_3LCspD2eZvKYlo2C02wegtL1/reversals" }, "reversed": false, "source_transaction": "ch_3LCspD2eZvKYlo2C0x1hr0GY", "source_type": "card", "transfer_group": "group_pi_3LCspD2eZvKYlo2C0vli1FBj" }'''
Retrieve a transferRetrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.ParametersNo parameters.ReturnsReturns a transfer object if a valid identifier was provided, and raises an error otherwise
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.modify( "tr_3LCspD2eZvKYlo2C02wegtL1", metadata={"order_id": "6735"}, ) '''Response { "id": "tr_3LCspD2eZvKYlo2C02wegtL1", "object": "transfer", "amount": 8000, "amount_reversed": 400, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1655763124, "currency": "usd", "description": "files", "destination": "acct_1AojmwI9Pbw6jkMZ", "destination_payment": "py_1LCspEI9Pbw6jkMZFXNCdw6R", "livemode": false, "metadata": { "order_id": "6735" }, "reversals": { "object": "list", "data": [ { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOIHA2eZvKYlo2C5BcdzQSo", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIHA2eZvKYlo2Cipghkcca", "created": 1658482564, "currency": "usd", "destination_payment_refund": "pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOHcd2eZvKYlo2Cnij37pKX", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOHcd2eZvKYlo2C29QFNLJI", "created": 1658480051, "currency": "usd", "destination_payment_refund": "pyr_1LOHcdI9Pbw6jkMZiDv4NOH4", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LNxbx2eZvKYlo2CUmCEbiBC", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LNxbx2eZvKYlo2CO2wY5Zen", "created": 1658403129, "currency": "usd", "destination_payment_refund": "pyr_1LNxbxI9Pbw6jkMZHiYe6cyc", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" } ], "has_more": false, "url": "/v1/transfers/tr_3LCspD2eZvKYlo2C02wegtL1/reversals" }, "reversed": false, "source_transaction": "ch_3LCspD2eZvKYlo2C0x1hr0GY", "source_type": "card", "transfer_group": "group_pi_3LCspD2eZvKYlo2C0vli1FBj" }'''
Update a transferUpdates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only metadata as an argument.Parameters description optional An arbitrary string attached to the object. Often useful for displaying to users. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.ReturnsReturns the transfer object if the update succeeded. This call will raise an error if update parameters are invalid
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.list(limit=3) '''Response { "object": "list", "url": "/v1/transfers", "has_more": false, "data": [ { "id": "tr_3LCspD2eZvKYlo2C02wegtL1", "object": "transfer", "amount": 8000, "amount_reversed": 400, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1655763124, "currency": "usd", "description": "files", "destination": "acct_1AojmwI9Pbw6jkMZ", "destination_payment": "py_1LCspEI9Pbw6jkMZFXNCdw6R", "livemode": false, "metadata": {}, "reversals": { "object": "list", "data": [ { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOIHA2eZvKYlo2C5BcdzQSo", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIHA2eZvKYlo2Cipghkcca", "created": 1658482564, "currency": "usd", "destination_payment_refund": "pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LOHcd2eZvKYlo2Cnij37pKX", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOHcd2eZvKYlo2C29QFNLJI", "created": 1658480051, "currency": "usd", "destination_payment_refund": "pyr_1LOHcdI9Pbw6jkMZiDv4NOH4", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, { "id": "trr_1LNxbx2eZvKYlo2CUmCEbiBC", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LNxbx2eZvKYlo2CO2wY5Zen", "created": 1658403129, "currency": "usd", "destination_payment_refund": "pyr_1LNxbxI9Pbw6jkMZHiYe6cyc", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" } ], "has_more": false, "url": "/v1/transfers/tr_3LCspD2eZvKYlo2C02wegtL1/reversals" }, "reversed": false, "source_transaction": "ch_3LCspD2eZvKYlo2C0x1hr0GY", "source_type": "card", "transfer_group": "group_pi_3LCspD2eZvKYlo2C0vli1FBj" }, {...}, {...} ] }'''
List all transfersReturns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.Parameters destination optional Only return transfers for the destination specified by this account ID.More parametersExpand all created optional dictionary ending_before optional limit optional starting_after optional transfer_group optional ReturnsA dictionary with a data property that contains an array of up to limit transfers, starting after transfer starting_after. Each entry in the array is a separate transfer object. If no more transfers are available, the resulting array will be empty
'''Endpoints  POST /v1/transfers/:id/reversals   GET /v1/transfers/:id/reversals/:id  POST /v1/transfers/:id/reversals/:id   GET /v1/transfers/:id/reversals '''
Transfer ReversalsStripe Connect platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance.Reversing a transfer that was made for a destination charge is allowed only up to the amount of the charge. It is possible to reverse a transfer_group transfer only if the destination account has enough balance to cover the reversal.
'''The transfer reversal object { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" } '''
The transfer reversal objectAttributes id string Unique identifier for the object. amount integer Amount, in pence. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. metadata hash Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. transfer string expandable ID of the transfer that was reversed.More attributesExpand all object string, value is "transfer_reversal" balance_transaction string expandable created timestamp destination_payment_refund string expandable source_refund string expandable
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.create_reversal( "tr_3LCspD2eZvKYlo2C02wegtL1", amount=100, ) '''Response { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1LOIlS2eZvKYlo2CqVLqZUir", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }'''
Create a transfer reversalWhen you create a new reversal, you must specify a transfer to create it on. When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.Parameters amount optional A positive integer in pence representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. description optional An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.More parametersExpand all refund_application_fee optional ReturnsReturns a transfer reversal object if the reversal succeeded. Raises an error if the transfer has already been reversed or an invalid transfer identifier was provided
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.retrieve_reversal( "tr_3LCspD2eZvKYlo2C02wegtL1", "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", ) '''Response { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }'''
Retrieve a reversalBy default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.ParametersNo parameters.ReturnsReturns the reversal object
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.modify_reversal( "tr_3LCspD2eZvKYlo2C02wegtL1", "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", metadata={"order_id": "6735"}, ) '''Response { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": { "order_id": "6735" }, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }'''
Update a reversalUpdates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments.Parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.ReturnsReturns the reversal object if the update succeeded. This call will raise an error if update parameters are invalid
import stripe stripe.api_key = "sk_test_your_key" stripe.Transfer.list_reversals( "tr_3LCspD2eZvKYlo2C02wegtL1", limit=3, ) '''Response { "object": "list", "url": "/v1/transfers/tr_3LCspD2eZvKYlo2C02wegtL1/reversals", "has_more": false, "data": [ { "id": "trr_1LOIlS2eZvKYlo2C4uzbNRsJ", "object": "transfer_reversal", "amount": 100, "balance_transaction": "txn_1032HU2eZvKYlo2CEPtcnUvl", "created": 1658484442, "currency": "usd", "destination_payment_refund": "pyr_1LOIlSI9Pbw6jkMZi6TfasGy", "metadata": {}, "source_refund": null, "transfer": "tr_3LCspD2eZvKYlo2C02wegtL1" }, {...}, {...} ] }'''
List all reversalsYou can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit reversals, starting after reversal starting_after. Each entry in the array is a separate reversal object. If no more reversals are available, the resulting array will be empty. If you provide a non-existent transfer ID, this call raises an error
'''Endpoints  POST /v1/apps/secrets   GET /v1/apps/secrets/find  POST /v1/apps/secrets/delete   GET /v1/apps/secrets '''
SecretsSecret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.The primary resource in Secret Store is a secret. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.All Dashboard users and the app backend share account scoped secrets. Use the account scope for secrets that don't change per-user, like a third-party API key.A user scoped secret is accessible by the app backend and one specific Dashboard user. Use the user scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.
'''The Secret object { "id": "appsecret_5110QzMIZ0005GiEH1m0419O8KAxCG", "object": "apps.secret", "created": 1659519, "expires_at": null, "livemode": false, "name": "test-secret", "scope": { "type": "account" } } '''
The Secret objectAttributes id string Unique identifier for the object. object string, value is "apps.secret" String representing the object’s type. Objects of the same type share the same value. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. deleted boolean If true, indicates that this secret has been deleted expires_at timestamp preview feature The Unix timestamp for the expiry time of the secret, after which the secret deletes. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. name string A name for the secret that’s unique within the scope. payload string expandable The plaintext secret value to be stored. This field is not included by default. To include it in the response, expand the payload field. scope hash Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.Show child attribute
import stripe stripe.api_key = "sk_test_your_key" stripe.apps.Secret.create( name="my-api-key", payload="secret_key_xxxxxx", scope={"type": "account"}, ) '''Response { "id": "appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy", "object": "apps.secret", "created": 1648494781232, "expires_at": null, "livemode": false, "name": "my-api-key", "scope": { "type": "account" } }'''
Set a SecretCreate or replace a secret in the secret store.Parameters name required A name for the secret that’s unique within the scope. payload required The plaintext secret value to be stored. scope required Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.Show child parameters expires_at optional preview feature The Unix timestamp for the expiry time of the secret, after which the secret deletes.ReturnsReturns a secret object
import stripe stripe.api_key = "sk_test_your_key" stripe.apps.Secret.find( name="my-api-key", scope={"type": "account"}, ) '''Response { "id": "appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy", "object": "apps.secret", "created": 1648494781232, "expires_at": null, "livemode": false, "name": "my-api-key", "scope": { "type": "account" } }'''
Find a SecretFinds a secret in the secret store by name and scope.Parameters name required A name for the secret that’s unique within the scope. scope required Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.Show child parametersReturnsReturns a secret object
import stripe stripe.api_key = "sk_test_your_key" stripe.apps.Secret.delete_where( name="my-api-key", scope={"type": "account"}, ) '''Response { "id": "appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy", "object": "apps.secret", "created": 1648494781232, "expires_at": null, "livemode": false, "name": "my-api-key", "scope": { "type": "account" }, "deleted": true }'''
Delete a SecretDeletes a secret from the secret store by name and scope.Parameters name required A name for the secret that’s unique within the scope. scope required Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.Show child parametersReturnsReturns the deleted secret object
import stripe stripe.api_key = "sk_test_your_key" stripe.apps.Secret.list( scope={"type": "account"}, limit=2, ) '''Response { "object": "list", "url": "/v1/apps/secrets", "has_more": false, "data": [ { "object": "list", "url": "/v1/apps/secrets", "has_more": false, "data": [ { "id": "appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy", "object": "apps.secret", "created": 1648494781232, "expires_at": null, "livemode": false, "name": "my-api-key", "scope": { "type": "account" } }, { "id": "appsecret_5110UWLXV0040GHjtzG1F5WYaFhJjy", "object": "apps.secret", "created": 1648502711249, "expires_at": null, "livemode": false, "name": "my-api-key2", "scope": { "type": "account" } } ] }, {...}, {...} ] }'''
List secretsList all secrets stored on the given scope.Parameters scope required Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.Show child parametersMore parametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit Secrets, starting after Secret starting_after. Each entry in the array is a separate Secret object. If no more Secrets are available, the resulting array will be empty
'''Endpoints   GET /v1/radar/early_fraud_warnings/:id   GET /v1/radar/early_fraud_warnings '''
Early Fraud WarningAn early fraud warning indicates that the card issuer has notified us that a charge may be fraudulent.
'''The early fraud warning object { "id": "issfr_1LSe5d2eZvKYlo2CGrFuyZYx", "object": "radar.early_fraud_warning", "actionable": true, "charge": "ch_1234", "created": 123456789, "fraud_type": "misc", "livemode": false } '''
The early fraud warning objectAttributes id string Unique identifier for the object. object string, value is "radar.early_fraud_warning" String representing the object’s type. Objects of the same type share the same value. actionable boolean An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. charge string expandable ID of the charge this early fraud warning is for, optionally expanded. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. fraud_type string The type of fraud labelled by the issuer. One of card_never_received, fraudulent_card_application, made_with_counterfeit_card, made_with_lost_card, made_with_stolen_card, misc, unauthorized_use_of_card. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. payment_intent string expandable ID of the Payment Intent this early fraud warning is for, optionally expanded
import stripe stripe.api_key = "sk_test_your_key" stripe.radar.EarlyFraudWarning.retrieve( "issfr_1LSe5d2eZvKYlo2CGrFuyZYx", ) '''Response { "id": "issfr_1LSe5d2eZvKYlo2CGrFuyZYx", "object": "radar.early_fraud_warning", "actionable": true, "charge": "ch_1234", "created": 123456789, "fraud_type": "misc", "livemode": false }'''
Retrieve an early fraud warningRetrieves the details of an early fraud warning that has previously been created. Please refer to the early fraud warning object reference for more details.ParametersNo parameters.ReturnsReturns an EarlyFraudWarning if a valid identifier was provided
import stripe stripe.api_key = "sk_test_your_key" stripe.radar.EarlyFraudWarning.list(limit=3) '''Response { "object": "list", "url": "/v1/radar/early_fraud_warnings", "has_more": false, "data": [ { "id": "issfr_1LSe5d2eZvKYlo2CGrFuyZYx", "object": "radar.early_fraud_warning", "actionable": true, "charge": "ch_1234", "created": 123456789, "fraud_type": "misc", "livemode": false }, {...}, {...} ] }'''
List all early fraud warningsReturns a list of early fraud warnings.Parameters charge optional Only return early fraud warnings for the charge specified by this charge ID. payment_intent optional Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.More parametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit EarlyFraudWarnings, starting after EarlyFraudWarnings starting_after. Each entry in the array is a separate EarlyFraudWarning object. If no more EarlyFraudWarnings are available, the resulting array will be empty. This request should never raise an error
'''Endpoints  POST /v1/reviews/:id/approve   GET /v1/reviews/:id   GET /v1/reviews '''
ReviewsReviews can be used to supplement automated fraud detection with human expertise.Learn more about Radar and reviewing payments here