[{"nl":"AuthenticationThe Stripe API uses API keys to authenticate requests. You can view and manage your API keys in the Stripe Dashboard.Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_. Alternatively, you can use restricted API keys for granular permissions.Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.Use your API key by assigning it to stripe.api_key. The Python library will then automatically send this key in each request.You can also set a per-request key with an option. This is often useful for Connect applications that use multiple API keys during the lifetime of a process. Methods on the returned object reuse the same API key.All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.","code":"import stripe\nimport stripe\ncharge = stripe.Charge.retrieve(\n \"ch_3LSdyT2eZvKYlo2C0gCKd4XD\",\n api_key=\"sk_test_your_key\"\n)\ncharge.save() # Uses the same API Key.Your API KeyA sample test API key is included in all the examples here, so you can test any example right away. Do not submit any personally identifiable information in requests made with this key.To test requests using your account, replace the sample API key with your actual API key or sign in."},{"nl":"Connected AccountsClients can make requests as connected accounts using the special header Stripe-Account which should contain a Stripe account ID (usually starting with the prefix acct_).The value is set per-request as shown in the adjacent code sample. Methods on the returned object reuse the same account ID.See also Making API calls for connected accounts","code":"import stripe\ncharge = stripe.Charge.retrieve(\n \"ch_3LSdcO2eZvKYlo2C0QI5DNPX\",\n stripe_account=\"acct_1032D82eZvKYlo2C\"\n)\ncharge.save() # Uses the same account."},{"nl":"ErrorsStripe uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Stripe's servers (these are rare).Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.Attributes type string The type of error returned. One of api_error, card_error, idempotency_error, or invalid_request_error code string For some errors that could be handled programmatically, a short string indicating the error code reported. decline_code string For card errors resulting from a card issuer decline, a short string indicating the card issuer\u2019s reason for the decline if they provide one. message string A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. param string If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. payment_intent hash The PaymentIntent object for errors returned on a request involving a PaymentIntent.Show child attributesMore attributesExpand all charge string doc_url string payment_method hash payment_method_type string setup_intent hash source hash","code":"'''HTTP status code summary200 - OKEverything worked as expected.400 - Bad RequestThe request was unacceptable, often due to missing a required\n parameter.401 - UnauthorizedNo valid API key provided.402 - Request FailedThe parameters were valid but the request failed.403 - ForbiddenThe API key doesn't have permissions to perform the request.404 - Not FoundThe requested resource doesn't exist.409 - ConflictThe request conflicts with another request (perhaps due to\n using the same idempotent key).429 - Too Many RequestsToo many requests hit the API too quickly. We recommend an\n exponential backoff of your requests.500, 502, 503, 504 - Server ErrorsSomething went wrong on Stripe's end. (These are rare.)Error typesapi_errorAPI errors cover any other type of problem (e.g., a temporary\n problem with Stripe's servers), and are extremely\n uncommon.card_errorCard errors are the most common type of error you should\n expect to handle. They result when the user enters a card that\n can't be charged for some reason.idempotency_errorIdempotency errors occur when an Idempotency-Key\n is re-used on a request that does not match the first request's\n API endpoint and parameters.invalid_request_errorInvalid request errors arise when your request has invalid\n parameters.\n'''"},{"nl":"Handling errorsOur Client libraries raise exceptions for many reasons, such as a failed charge, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.","code":"'''PythoncURLStripe CLIRubyPythonPHPJavaNode.jsGo.NET12345678910111213141516171819202122232425262728293031try:\n # Use Stripe's library to make requests...\n pass\nexcept stripe.error.CardError as e:\n # Since it's a decline, stripe.error.CardError will be caught\n\n print('Status is: %s' % e.http_status)\n print('Code is: %s' % e.code)\n # param is '' in this case\n print('Param is: %s' % e.param)\n print('Message is: %s' % e.user_message)\nexcept stripe.error.RateLimitError as e:\n # Too many requests made to the API too quickly\n pass\nexcept stripe.error.InvalidRequestError as e:\n # Invalid parameters were supplied to Stripe's API\n pass\nexcept stripe.error.AuthenticationError as e:\n # Authentication with Stripe's API failed\n # (maybe you changed API keys recently)\n pass\nexcept stripe.error.APIConnectionError as e:\n # Network communication with Stripe failed\n pass\nexcept stripe.error.StripeError as e:\n # Display a very generic error to the user, and maybe send\n # yourself an email\n pass\nexcept Exception as e:\n # Something else happened, completely unrelated to Stripe\n pass\n'''"},{"nl":"Expanding ResponsesMany objects allow you to request additional information as an expanded response by using the expand request parameter. This parameter is available on all API requests, and applies to the response of that request only. Responses can be expanded in two ways.In many cases, an object contains the ID of a related object in its response properties. For example, a Charge may have an associated Customer ID. Those objects can be expanded inline with the expand request parameter. ID fields that can be expanded into objects are noted in this documentation with theexpandable label.In some cases, such as the Issuing Card object's number and cvc fields, there are available fields that are not included in responses by default. You can request these fields as an expanded response by using the expand request parameter. Fields that can be included in an expanded response are noted in this documentation with the expandable label.You can expand recursively by specifying nested fields after a dot (.). For example, requesting invoice.subscription on a charge will expand the invoice property into a full Invoice object, and will then expand the subscription property on that invoice into a full Subscription object.You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints.Expansions on list requests start with the data property. For example, you would expand data.customers on a request to list charges and associated customers. Many deep expansions on list requests can be slow.Expansions have a maximum depth of four levels (so for example, when listing charges,data.invoice.subscription.default_source is the deepest allowed).You can expand multiple objects at once by identifying multiple items in the expand array.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.retrieve(\n 'ch_3LSdrM2eZvKYlo2C1A6YRLyL',\n expand=['customer', 'invoice.subscription']\n)\n'''Response {\n \"id\": \"ch_3LSdrM2eZvKYlo2C1A6YRLyL\",\n \"object\": \"charge\",\n \"customer\": {\n \"id\": \"cu_18CHts2eZvKYlo2CbmAAQORe\",\n \"object\": \"customer\",\n ...\n },\n \"invoice\": {\n \"id\": \"in_1LSdrM2eZvKYlo2CdjHtGeNU\",\n \"object\": \"invoice\",\n \"subscription\": {\n \"id\": \"su_1JbiLB2eZvKYlo2CRmgET2WF\",\n \"object\": \"subscription\",\n ...\n },\n ...\n },\n ...\n}'''"},{"nl":"Idempotent RequestsThe API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. For example, if a request to create a charge does not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee that no more than one charge is created.To perform an idempotent request, provide an additional idempotency_key element to the request options.Stripe's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.Keys are eligible to be removed from the system automatically after they're at least 24 hours old, and a new request is generated if a key is reused after the original has been pruned. The idempotency layer compares incoming parameters to those of the original request and errors unless they're the same to prevent accidental misuse.Results are only saved if an API endpoint started executing. If incoming parameters failed validation, or the request conflicted with another that was executing concurrently, no idempotent result is saved because no API endpoint began execution. It is safe to retry these requests.All POST requests accept idempotency keys. Sending idempotency keys in GET and DELETE requests has no effect and should be avoided, as these requests are idempotent by definition.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\ncharge = stripe.Charge.create(\n amount=2000,\n currency=\"usd\",\n description=\"My First Test Charge (created for API docs at https:\/\/www.stripe.com\/docs\/api)\",\n source=\"tok_amex\", # obtained with Stripe.js\n idempotency_key='TR1auKhAiiFBWi5b'\n)"},{"nl":"MetadataUpdateable Stripe objects\u2014including Account, Charge, Customer, PaymentIntent, Refund, Subscription, and Transfer\u2014have a metadata parameter. You can use this parameter to attach key-value data to these Stripe objects.You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.Metadata is useful for storing additional, structured information on an object. As an example, you could store your user's full name and corresponding unique identifier from your system on a Stripe Customer object. Metadata is not used by Stripe\u2014for example, not used to authorize or decline a charge\u2014and won't be seen by your users unless you choose to show it to them.Some of the objects listed above also support a description parameter. You can use the description parameter to annotate a charge\u2014with, for example, a human-readable description like 2 shirts for test@example.com. Unlike metadata, description is a single string, and your users may see it (e.g., in email receipts Stripe sends on your behalf).Do not store any sensitive information (bank account numbers, card details, etc.) as metadata or in the description parameter.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.create(\n amount=2000,\n currency=\"usd\",\n source=\"tok_visa\", # obtained with Stripe.js\n metadata={'order_id': '6735'}\n)\n'''Response {\n \"id\": \"ch_3LSdrM2eZvKYlo2C1A6YRLyL\",\n \"object\": \"charge\",\n \"amount\": 100,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518844,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdrL2eZvKYlo2CtnWPUQ1I\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdrM2eZvKYlo2C1A6YRLyL\/rcpt_MAzrg6YgiqYH9yomNqsCRuLOeTiFRBy\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdrM2eZvKYlo2C1A6YRLyL\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"PaginationAll top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list charges, list customers, and list invoices. These list API methods share a common structure, taking at least these three parameters: limit, starting_after, and ending_before.Stripe's list API methods utilize cursor-based pagination via the starting_after and ending_before parameters. Both parameters take an existing object ID value (see below) and return objects in reverse chronological order. The ending_before parameter returns objects listed before the named object. The starting_after parameter returns objects listed after the named object. These parameters are mutually exclusive -- only one of starting_after orending_before may be used.Our client libraries offer auto-pagination helpers to easily traverse all pages of a list.","code":"\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": null,\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"SearchSome top-level API resource have support for retrieval via \"search\" API methods. For example, you can search charges, search customers, and search subscriptions.Stripe's search API methods utilize cursor-based pagination via the page request parameter and next_page response parameter. For example, if you make a search request and receive \"next_page\": \"pagination_key\" in the response, your subsequent call can include page=pagination_key to fetch the next page of results.Our client libraries offer auto-pagination helpers to easily traverse all pages of a search result.Search request format query required The search query string. See search query language. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.Search response format object string, value is \"search_result\" A string describing the object type returned. url string The URL for accessing this list. has_more boolean Whether or not there are more elements available after this\n set. If false, this set comprises the end of\n the list. data array An array containing the actual response elements, paginated\n by any request parameters. next_page string A cursor for use in pagination. If has_more is true,\n you can pass the value of next_page to a subsequent call to\n fetch the next page of results. total_count optional positive integer or zero expandable The total number of objects that match the query, only accurate\n up to 10,000. This field is not included by default. To include it in the response, expand the total_count field","code":"\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/customers\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {\n \"foo\": \"bar\"\n },\n \"name\": \"fakename\",\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Auto-paginationOur libraries support auto-pagination. This feature easily handles fetching large lists of resources without having to manually paginate results and perform subsequent requests.To use the auto-pagination feature in Python, simply issue an initial \"list\" call with the parameters you need, then call auto_paging_iter() on the returned list object to iterate over all objects matching your initial parameters","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\ncustomers = stripe.Customer.list(limit=3)\nfor customer in customers.auto_paging_iter():\n # Do something with customer"},{"nl":"Request IDsEach API request has an associated request identifier. You can find this value in the response headers, under Request-Id. You can also find request identifiers in the URLs of individual request logs in your Dashboard. If you need to contact us about a specific request, providing the request identifier will ensure the fastest possible resolution","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\ncustomer = stripe.Customer.create()\nprint(customer.last_response.request_id)"},{"nl":"VersioningWhen backwards-incompatible changes are made to the API, a new, dated version is released. The current version is 2022-08-01. Read our API upgrades guide to see our API changelog and to learn more about backwards compatibility.All requests use your account API settings, unless you override the API version. The changelog lists every available version. Note that by default webhook events are structured according to your account API version, unless you set an API version during endpoint creation.To override the API version, assign the version to the stripe.api_version property, or set it per-request as shown in the adjacent code sample. When overriding it per-request, methods on the returned object reuse the same Stripe version.You can visit your Dashboard to upgrade your API version. As a precaution, use API versioning to test a new API version before committing to an upgrade.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nimport stripe\nintent = stripe.PaymentIntent.retrieve(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n stripe_version=\"2022-08-01\"\n)\nintent.capture()"},{"nl":"BalanceThis is an object representing your Stripe balance. You can retrieve it to see\nthe balance currently on your Stripe account.You can also retrieve the balance history, which contains a list of\ntransactions that contributed to the balance\n(charges, payouts, and so forth).The available and pending amounts for each currency are broken down further by\npayment source types.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/balance\n'''"},{"nl":"The balance objectAttributes available array of hashes Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types property.Show child attributes pending array of hashes Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the source_types property.Show child attributesMore attributesExpand all object string, value is \"balance\" connect_reserved array of hashes Connect only instant_available array of hashes issuing hash livemode boolean","code":"'''The balance object {\n \"object\": \"balance\",\n \"available\": [\n {\n \"amount\": 2217713,\n \"currency\": \"cad\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 2217713\n }\n },\n {\n \"amount\": 2685,\n \"currency\": \"nok\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 2685\n }\n },\n {\n \"amount\": 7254790,\n \"currency\": \"gbp\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 7254790\n }\n },\n {\n \"amount\": 218420,\n \"currency\": \"nzd\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 218420\n }\n },\n {\n \"amount\": 779902,\n \"currency\": \"czk\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 779902\n }\n },\n {\n \"amount\": -1854,\n \"currency\": \"aud\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -1854\n }\n },\n {\n \"amount\": 457105499457,\n \"currency\": \"usd\",\n \"source_types\": {\n \"bank_account\": 367939412,\n \"card\": 456736007919\n }\n },\n {\n \"amount\": -76455,\n \"currency\": \"eur\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -76455\n }\n },\n {\n \"amount\": -40320,\n \"currency\": \"jpy\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -40320\n }\n },\n {\n \"amount\": 12000,\n \"currency\": \"brl\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 12000\n }\n },\n {\n \"amount\": -412,\n \"currency\": \"sek\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -412\n }\n }\n ],\n \"connect_reserved\": [\n {\n \"amount\": 0,\n \"currency\": \"cad\"\n },\n {\n \"amount\": 0,\n \"currency\": \"nok\"\n },\n {\n \"amount\": 0,\n \"currency\": \"gbp\"\n },\n {\n \"amount\": 0,\n \"currency\": \"nzd\"\n },\n {\n \"amount\": 0,\n \"currency\": \"czk\"\n },\n {\n \"amount\": 0,\n \"currency\": \"aud\"\n },\n {\n \"amount\": 83080,\n \"currency\": \"usd\"\n },\n {\n \"amount\": 54584,\n \"currency\": \"eur\"\n },\n {\n \"amount\": 0,\n \"currency\": \"jpy\"\n },\n {\n \"amount\": 0,\n \"currency\": \"brl\"\n },\n {\n \"amount\": 0,\n \"currency\": \"sek\"\n }\n ],\n \"livemode\": false,\n \"pending\": [\n {\n \"amount\": 0,\n \"currency\": \"cad\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"nok\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"gbp\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"nzd\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"czk\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"aud\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 2624141650,\n \"currency\": \"usd\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 2624141650\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"eur\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"jpy\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"brl\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"sek\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n }\n ]\n}\n'''"},{"nl":"Retrieve balanceRetrieves the current account balance, based on the authentication that was used to make the request.\n For a sample request, see Accounting for negative balances.ParametersNo parameters.ReturnsReturns a balance object for the account that was authenticated in the request","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Balance.retrieve()\n'''Response {\n \"object\": \"balance\",\n \"available\": [\n {\n \"amount\": 2217713,\n \"currency\": \"cad\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 2217713\n }\n },\n {\n \"amount\": 2685,\n \"currency\": \"nok\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 2685\n }\n },\n {\n \"amount\": 7254790,\n \"currency\": \"gbp\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 7254790\n }\n },\n {\n \"amount\": 218420,\n \"currency\": \"nzd\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 218420\n }\n },\n {\n \"amount\": 779902,\n \"currency\": \"czk\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 779902\n }\n },\n {\n \"amount\": -1854,\n \"currency\": \"aud\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -1854\n }\n },\n {\n \"amount\": 457105499457,\n \"currency\": \"usd\",\n \"source_types\": {\n \"bank_account\": 367939412,\n \"card\": 456736007919\n }\n },\n {\n \"amount\": -76455,\n \"currency\": \"eur\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -76455\n }\n },\n {\n \"amount\": -40320,\n \"currency\": \"jpy\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -40320\n }\n },\n {\n \"amount\": 12000,\n \"currency\": \"brl\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 12000\n }\n },\n {\n \"amount\": -412,\n \"currency\": \"sek\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": -412\n }\n }\n ],\n \"connect_reserved\": [\n {\n \"amount\": 0,\n \"currency\": \"cad\"\n },\n {\n \"amount\": 0,\n \"currency\": \"nok\"\n },\n {\n \"amount\": 0,\n \"currency\": \"gbp\"\n },\n {\n \"amount\": 0,\n \"currency\": \"nzd\"\n },\n {\n \"amount\": 0,\n \"currency\": \"czk\"\n },\n {\n \"amount\": 0,\n \"currency\": \"aud\"\n },\n {\n \"amount\": 83080,\n \"currency\": \"usd\"\n },\n {\n \"amount\": 54584,\n \"currency\": \"eur\"\n },\n {\n \"amount\": 0,\n \"currency\": \"jpy\"\n },\n {\n \"amount\": 0,\n \"currency\": \"brl\"\n },\n {\n \"amount\": 0,\n \"currency\": \"sek\"\n }\n ],\n \"livemode\": false,\n \"pending\": [\n {\n \"amount\": 0,\n \"currency\": \"cad\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"nok\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"gbp\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"nzd\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"czk\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"aud\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 2624141650,\n \"currency\": \"usd\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 2624141650\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"eur\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"jpy\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"brl\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n },\n {\n \"amount\": 0,\n \"currency\": \"sek\",\n \"source_types\": {\n \"bank_account\": 0,\n \"card\": 0\n }\n }\n ]\n}'''"},{"nl":"Balance TransactionsBalance transactions represent funds moving through your Stripe account.\nThey're created for every type of transaction that comes into or flows out of your Stripe account balance.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/balance_transactions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/balance_transactions\n'''"},{"nl":"The balance transaction objectAttributes id string Unique identifier for the object. amount integer Gross amount of the transaction, in cents. 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. fee integer Fees (in cents) paid for this transaction. fee_details array of hashes Detailed breakdown of fees (in cents) paid for this transaction.Show child attributes net integer Net amount of the transaction, in cents. source string expandable The Stripe object to which this transaction is related. status string If the transaction\u2019s net funds are available in the Stripe balance yet. Either available or pending. type string Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead.More attributesExpand all object string, value is \"balance_transaction\" available_on timestamp created timestamp exchange_rate decimal reporting_category string","code":"'''The balance transaction object {\n \"id\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"object\": \"balance_transaction\",\n \"amount\": 400,\n \"available_on\": 1386374400,\n \"created\": 1385814763,\n \"currency\": \"usd\",\n \"description\": \"Charge for test@example.com\",\n \"exchange_rate\": null,\n \"fee\": 42,\n \"fee_details\": [\n {\n \"amount\": 42,\n \"application\": null,\n \"currency\": \"usd\",\n \"description\": \"Stripe processing fees\",\n \"type\": \"stripe_fee\"\n }\n ],\n \"net\": 358,\n \"reporting_category\": \"charge\",\n \"source\": \"ch_1032HU2eZvKYlo2C0FuZb3X7\",\n \"status\": \"available\",\n \"type\": \"charge\"\n}\n'''"},{"nl":"Retrieve a balance transactionRetrieves the balance transaction with the given ID.\nNote that this endpoint previously used the path \/v1\/balance\/history\/:id.ParametersNo parameters.ReturnsReturns a balance transaction if a valid balance transaction ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.BalanceTransaction.retrieve(\n \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n)\n'''Response {\n \"id\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"object\": \"balance_transaction\",\n \"amount\": 400,\n \"available_on\": 1386374400,\n \"created\": 1385814763,\n \"currency\": \"usd\",\n \"description\": \"Charge for test@example.com\",\n \"exchange_rate\": null,\n \"fee\": 42,\n \"fee_details\": [\n {\n \"amount\": 42,\n \"application\": null,\n \"currency\": \"usd\",\n \"description\": \"Stripe processing fees\",\n \"type\": \"stripe_fee\"\n }\n ],\n \"net\": 358,\n \"reporting_category\": \"charge\",\n \"source\": \"ch_1032HU2eZvKYlo2C0FuZb3X7\",\n \"status\": \"available\",\n \"type\": \"charge\"\n}'''"},{"nl":"List all balance transactionsReturns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.\nNote that this endpoint was previously called \u201cBalance history\u201d and used the path \/v1\/balance\/history.Parameters payout optional For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. type optional Only returns transactions of the given type. One of: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, payment, payment_failure_refund, payment_refund, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund.More parametersExpand all created optional dictionary currency optional ending_before optional limit optional source optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit transactions, starting after transaction starting_after. Each entry in the array is a separate transaction history object. If no more transactions are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.BalanceTransaction.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/balance_transactions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"object\": \"balance_transaction\",\n \"amount\": 400,\n \"available_on\": 1386374400,\n \"created\": 1385814763,\n \"currency\": \"usd\",\n \"description\": \"Charge for test@example.com\",\n \"exchange_rate\": null,\n \"fee\": 42,\n \"fee_details\": [\n {\n \"amount\": 42,\n \"application\": null,\n \"currency\": \"usd\",\n \"description\": \"Stripe processing fees\",\n \"type\": \"stripe_fee\"\n }\n ],\n \"net\": 358,\n \"reporting_category\": \"charge\",\n \"source\": \"ch_1032HU2eZvKYlo2C0FuZb3X7\",\n \"status\": \"available\",\n \"type\": \"charge\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"ChargesTo charge a credit or a debit card, you create a Charge object. You can\nretrieve and refund individual charges as well as list all charges. Charges\nare identified by a unique, random ID.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/charges\u00a0\u00a0\u00a0GET\u00a0\/v1\/charges\/:id\u00a0\u00a0POST\u00a0\/v1\/charges\/:id\u00a0\u00a0POST\u00a0\/v1\/charges\/:id\/capture\u00a0\u00a0\u00a0GET\u00a0\/v1\/charges\u00a0\u00a0\u00a0GET\u00a0\/v1\/charges\/search\n'''"},{"nl":"The charge objectAttributes id string Unique identifier for the object. amount positive integer or zero Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). balance_transaction string expandable ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). billing_details hash Billing information associated with the payment method at the time of the transaction.Show child attributes currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable ID of the customer this charge is for if one exists. description string An arbitrary string attached to the object. Often useful for displaying to users. disputed boolean Whether the charge has been disputed. invoice string expandable ID of the invoice this charge is for if one exists. 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. payment_intent string expandable ID of the PaymentIntent associated with this charge, if one exists. payment_method_details hash Details about the payment method at the time of the transaction.Show child attributes receipt_email string This is the email address that the receipt for this charge was sent to. refunded boolean Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. shipping hash Shipping information for the charge.Show child attributes statement_descriptor string For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers\u2019 statements. Must contain at least one letter, maximum 22 characters. statement_descriptor_suffix string Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that\u2019s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. status enum The status of the payment is either succeeded, pending, or failed.Possible enum valuessucceeded pending failed More attributesExpand all object string, value is \"charge\" amount_captured positive integer or zero amount_refunded positive integer or zero application string expandable \"application\" Connect only application_fee string expandable Connect only application_fee_amount integer Connect only calculated_statement_descriptor string captured boolean created timestamp failure_balance_transaction string expandable failure_code string failure_message string fraud_details hash livemode boolean on_behalf_of string expandable Connect only outcome hash paid boolean payment_method string radar_options hash receipt_number string receipt_url string refunds list review string expandable source_transfer string expandable Connect only transfer string expandable Connect only transfer_data hash Connect only transfer_group string Connect only","code":"'''The charge object {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 100,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}\n'''"},{"nl":"Create a chargeTo charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won\u2019t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).Parameters amount required Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. customer optional The ID of an existing customer that will be charged in this request. description optional An arbitrary string which you can attach to a Charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing. 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. receipt_email optional The email address to which this charge\u2019s receipt will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a Customer, the email address specified here will override the customer\u2019s email address. If receipt_email is specified for a charge in live mode, a receipt will be sent regardless of your email settings. shipping optional dictionary Shipping information for the charge. Helps prevent fraud on charges for physical goods.Show child parameters source optional A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected account. For certain sources\u2014namely, cards, bank accounts, and attached sources\u2014you must also pass the ID of the associated customer. statement_descriptor optional For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers\u2019 statements. Must contain at least one letter, maximum 22 characters. statement_descriptor_suffix optional Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that\u2019s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.More parametersExpand all application_fee_amount optional Connect only capture optional on_behalf_of optional Connect only radar_options optional dictionary transfer_data optional dictionary Connect only transfer_group optional Connect only ReturnsReturns the charge object if the charge succeeded.\nThis call will raise an error if something goes wrong.\nA common source of error is an invalid or expired card,\nor a valid card with insufficient available balance.Verification responsesIf the cvc parameter is provided, Stripe will attempt to check the correctness of the CVC,\nand will return this check's result. Similarly, if address_line1 or address_zip are provided,\nStripe will try to check the validity of those parameters.Some card issuers do not support checking one or more of these parameters,\nin which case Stripe will return an unavailable result.Also note that, depending on the card issuer,\ncharges can succeed even when passed incorrect CVC and address information.\n CVC payment_method_details.card.checks.cvc_checkpassThe CVC provided is correct.failThe CVC provided is incorrect.unavailableThe customer's card issuer did not check the CVC provided.uncheckedThe 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.Address line payment_method_details.card.checks.address_line1_checkpassThe first address line provided is correct.failThe first address line provided is incorrect.unavailableThe customer's card issuer did not check the first address line provided.uncheckedThe first address line 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.Address ZIP payment_method_details.card.checks.address_zip_checkpassThe ZIP code provided is correct.failThe ZIP code provided is incorrect.unavailableThe customer's card issuer did not check the ZIP code.uncheckedThe ZIP code 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\n# `source` is obtained with Stripe.js; see https:\/\/stripe.com\/docs\/payments\/accept-a-payment-charges#web-create-token\nstripe.Charge.create(\n amount=2000,\n currency=\"usd\",\n source=\"tok_mastercard\",\n description=\"My First Test Charge (created for API docs at https:\/\/www.stripe.com\/docs\/api)\",\n)\n'''Response {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 2000,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs at https:\/\/www.stripe.com\/docs\/api)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null,\n \"source\": \"tok_amex\"\n}'''"},{"nl":"Retrieve a chargeRetrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.ParametersNo parameters.ReturnsReturns a charge if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.retrieve(\n \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n)\n'''Response {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 100,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Update a chargeUpdates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters customer optional The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. description optional An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing. 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. receipt_email optional This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. shipping optional dictionary Shipping information for the charge. Helps prevent fraud on charges for physical goods.Show child parametersMore parametersExpand all fraud_details optional dictionary transfer_group optional Connect only ReturnsReturns the charge object if the update succeeded. This call will raise an error if update parameters are invalid","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.modify(\n \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 100,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Capture a chargeCapture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.\nUncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.Parameters amount optional The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. receipt_email optional The email address to send this charge\u2019s receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. statement_descriptor optional For card charges, use statement_descriptor_suffix instead. Otherwise, you can use this value as the complete description of a charge on your customers\u2019 statements. Must contain at least one letter, maximum 22 characters. statement_descriptor_suffix optional Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that\u2019s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.More parametersExpand all application_fee_amount optional Connect only transfer_data optional dictionary Connect only transfer_group optional Connect only ReturnsReturns the charge object, with an updated captured property (set to true). Capturing a charge will always succeed, unless the charge is already refunded, expired, captured, or an invalid capture amount is specified, in which case this method will raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.capture(\n \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n)\n'''Response {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 100,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"List all chargesReturns a list of charges you\u2019ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.Parameters customer optional Only return charges for the customer specified by this customer ID.More parametersExpand all created optional dictionary ending_before optional limit optional payment_intent optional starting_after optional transfer_group optional Connect only ReturnsA dictionary with a data property that contains an array of up to limit charges, starting after charge starting_after. Each entry in the array is a separate charge object. If no more charges are available, the resulting array will be empty. If you provide a non-existent customer ID, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/charges\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 100,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Search chargesSearch for charges you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for charges. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit charges. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Charge.search(\n query=\"amount>999 AND metadata['order_id']:'6735'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/charges\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ch_3LSdsa2eZvKYlo2C1pk5D2K6\",\n \"object\": \"charge\",\n \"amount\": 1000,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": null,\n \"captured\": false,\n \"created\": 1659518920,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"My First Test Charge (created for API docs)\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"on_behalf_of\": null,\n \"outcome\": null,\n \"paid\": true,\n \"payment_intent\": null,\n \"payment_method\": \"card_1LSdsU2eZvKYlo2C1BKhCSWF\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": null,\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/rcpt_MAzsX8H9XHu2XoHLHOqQ1d3gDS78hzU\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_3LSdsa2eZvKYlo2C1pk5D2K6\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"CustomersThis object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/customers\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\u00a0\u00a0POST\u00a0\/v1\/customers\/:idDELETE\u00a0\/v1\/customers\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/search\n'''"},{"nl":"The customer objectAttributes id string Unique identifier for the object. address hash The customer\u2019s address.Show child attributes description string An arbitrary string attached to the object. Often useful for displaying to users. email string The customer\u2019s email address. 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 The customer\u2019s full name or business name. phone string The customer\u2019s phone number. shipping hash Mailing and shipping address for the customer. Appears on invoices emailed to this customer.Show child attributesMore attributesExpand all object string, value is \"customer\" balance integer cash_balance hash expandable preview feature created timestamp currency string default_source string expandable bank account, card, or source (e.g., card) delinquent boolean discount hash, discount object invoice_credit_balance hash expandable invoice_prefix string invoice_settings hash livemode boolean next_invoice_sequence integer preferred_locales array containing strings sources list expandable subscriptions list expandable tax hash expandable tax_exempt string tax_ids list expandable test_clock string expandable ","code":"'''The customer object {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": null,\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n}\n'''"},{"nl":"Create a customerParameters address optional dictionary The customer\u2019s address.Show child parameters description optional An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. email optional Customer\u2019s email address. It\u2019s displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to 512 characters. 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. name optional The customer\u2019s full name or business name. payment_method optional The ID of the PaymentMethod to attach to the customer. phone optional The customer\u2019s phone number. shipping optional dictionary The customer\u2019s shipping information. Appears on invoices emailed to this customer.Show child parametersMore parametersExpand all balance optional cash_balance optional dictionary preview feature coupon optional invoice_prefix optional invoice_settings optional dictionary next_invoice_sequence optional preferred_locales optional promotion_code optional source optional tax optional dictionary tax_exempt optional tax_id_data optional array of hashes test_clock optional ReturnsReturns the customer object if the update succeeded. Raises an error if create parameters are invalid (e.g. specifying an invalid coupon or an invalid source)","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.create(\n description=\"My First Test Customer (created for API docs at https:\/\/www.stripe.com\/docs\/api)\",\n)\n'''Response {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"My First Test Customer (created for API docs at https:\/\/www.stripe.com\/docs\/api)\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": null,\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n}'''"},{"nl":"Retrieve a customerRetrieves a Customer object.ParametersNo parameters.ReturnsReturns the Customer object for a valid identifier. If it\u2019s for a deleted Customer, a subset of the customer\u2019s information is returned, including a deleted property that\u2019s set to true","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve(\"cus_8TEMHVY5moxIPI\")\n'''Response {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": null,\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n}'''"},{"nl":"Update a customerUpdates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer\u2019s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer\u2019s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.\nThis request accepts mostly the same arguments as the customer creation call.Parameters address optional dictionary The customer\u2019s address.Show child parameters description optional An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. email optional Customer\u2019s email address. It\u2019s displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to 512 characters. 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. name optional The customer\u2019s full name or business name. phone optional The customer\u2019s phone number. shipping optional dictionary The customer\u2019s shipping information. Appears on invoices emailed to this customer.Show child parametersMore parametersExpand all balance optional cash_balance optional dictionary preview feature coupon optional default_source optional invoice_prefix optional invoice_settings optional dictionary next_invoice_sequence optional preferred_locales optional promotion_code optional source optional tax optional dictionary tax_exempt optional ReturnsReturns the customer object if the update succeeded. Raises an error if update parameters are invalid (e.g. specifying an invalid coupon or an invalid source)","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.modify(\n \"cus_8TEMHVY5moxIPI\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"name\": null,\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n}'''"},{"nl":"Delete a customerPermanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.ParametersNo parameters.ReturnsReturns an object with a deleted parameter on success. If the customer ID does not exist, this call raises an error.\nUnlike other objects, deleted customers can still be retrieved through the API, in order to be able to track the history of customers while still removing their credit card details and preventing any further operations to be performed (such as adding a new subscription)","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.delete(\"cus_8TEMHVY5moxIPI\")\n'''Response {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"deleted\": true\n}'''"},{"nl":"List all customersReturns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.Parameters email optional A case-sensitive filter on the list based on the customer\u2019s email field. The value must be a string.More parametersExpand all created optional dictionary ending_before optional limit optional starting_after optional test_clock optional ReturnsA dictionary with a data property that contains an array of up to limit customers, starting after customer starting_after. Passing an optional email will result in filtering to customers with only that exact email address. Each entry in the array is a separate customer object. If no more customers are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": null,\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Search customersSearch for customers you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for customers. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit customers. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.search(\n query=\"name:'fakename' AND metadata['foo']:'bar'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/customers\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cus_8TEMHVY5moxIPI\",\n \"object\": \"customer\",\n \"address\": null,\n \"balance\": 0,\n \"created\": 1463528816,\n \"currency\": \"usd\",\n \"default_source\": \"card_18CHs82eZvKYlo2C9BGk8uHq\",\n \"delinquent\": true,\n \"description\": \"Ava Anderson\",\n \"discount\": null,\n \"email\": \"ava.anderson.22@example.com\",\n \"invoice_prefix\": \"F899D8E\",\n \"invoice_settings\": {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n \"footer\": null,\n \"rendering_options\": null\n },\n \"livemode\": false,\n \"metadata\": {\n \"foo\": \"bar\"\n },\n \"name\": \"fakename\",\n \"next_invoice_sequence\": 12,\n \"phone\": null,\n \"preferred_locales\": [],\n \"shipping\": null,\n \"tax_exempt\": \"none\",\n \"test_clock\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"DisputesA dispute occurs when a customer questions your charge with their card issuer.\nWhen this happens, you're given the opportunity to respond to the dispute with\nevidence that shows that the charge is legitimate. You can find more\ninformation about the dispute process in our Disputes and\nFraud documentation.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/disputes\/:id\u00a0\u00a0POST\u00a0\/v1\/disputes\/:id\u00a0\u00a0POST\u00a0\/v1\/disputes\/:id\/close\u00a0\u00a0\u00a0GET\u00a0\/v1\/disputes\n'''"},{"nl":"The dispute objectAttributes id string Unique identifier for the object. amount integer Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). charge string expandable ID of the charge that was disputed. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. evidence hash Evidence provided to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. 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. payment_intent string expandable ID of the PaymentIntent that was disputed. reason string Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons. status string Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, charge_refunded, won, or lost.More attributesExpand all object string, value is \"dispute\" balance_transactions array, contains: balance_transaction object created timestamp evidence_details hash is_charge_refundable boolean livemode boolean","code":"'''The dispute object {\n \"id\": \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n \"object\": \"dispute\",\n \"amount\": 1000,\n \"balance_transactions\": [],\n \"charge\": \"ch_1AZtxr2eZvKYlo2CJDX8whov\",\n \"created\": 1659518876,\n \"currency\": \"usd\",\n \"evidence\": {\n \"access_activity_log\": null,\n \"billing_address\": null,\n \"cancellation_policy\": null,\n \"cancellation_policy_disclosure\": null,\n \"cancellation_rebuttal\": null,\n \"customer_communication\": null,\n \"customer_email_address\": null,\n \"customer_name\": null,\n \"customer_purchase_ip\": null,\n \"customer_signature\": null,\n \"duplicate_charge_documentation\": null,\n \"duplicate_charge_explanation\": null,\n \"duplicate_charge_id\": null,\n \"product_description\": null,\n \"receipt\": null,\n \"refund_policy\": null,\n \"refund_policy_disclosure\": null,\n \"refund_refusal_explanation\": null,\n \"service_date\": null,\n \"service_documentation\": null,\n \"shipping_address\": null,\n \"shipping_carrier\": null,\n \"shipping_date\": null,\n \"shipping_documentation\": null,\n \"shipping_tracking_number\": null,\n \"uncategorized_file\": null,\n \"uncategorized_text\": null\n },\n \"evidence_details\": {\n \"due_by\": 1661212799,\n \"has_evidence\": false,\n \"past_due\": false,\n \"submission_count\": 0\n },\n \"is_charge_refundable\": true,\n \"livemode\": false,\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": \"general\",\n \"status\": \"warning_needs_response\"\n}\n'''"},{"nl":"The dispute evidence objectAttributes access_activity_log string Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. billing_address string The billing address provided by the customer. cancellation_policy string expandable (ID of a file upload) Your subscription cancellation policy, as shown to the customer. cancellation_policy_disclosure string An explanation of how and when the customer was shown your refund policy prior to purchase. cancellation_rebuttal string A justification for why the customer\u2019s subscription was not canceled. customer_communication string expandable (ID of a file upload) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. customer_email_address string The email address of the customer. customer_name string The name of the customer. customer_purchase_ip string The IP address that the customer used when making the purchase. customer_signature string expandable (ID of a file upload) A relevant document or contract showing the customer\u2019s signature. duplicate_charge_documentation string expandable (ID of a file upload) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. duplicate_charge_explanation string An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. duplicate_charge_id string The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. product_description string A description of the product or service that was sold. receipt string expandable (ID of a file upload) Any receipt or message sent to the customer notifying them of the charge. refund_policy string expandable (ID of a file upload) Your refund policy, as shown to the customer. refund_policy_disclosure string Documentation demonstrating that the customer was shown your refund policy prior to purchase. refund_refusal_explanation string A justification for why the customer is not entitled to a refund. service_date string The date on which the customer received or began receiving the purchased service, in a clear human-readable format. service_documentation string expandable (ID of a file upload) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. shipping_address string The address to which a physical product was shipped. You should try to include as complete address information as possible. shipping_carrier string The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. shipping_date string The date on which a physical product began its route to the shipping address, in a clear human-readable format. shipping_documentation string expandable (ID of a file upload) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer\u2019s full shipping address, if possible. shipping_tracking_number string The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. uncategorized_file string expandable (ID of a file upload) Any additional evidence or statements. uncategorized_text string Any additional evidence or statements","code":"'''The dispute evidence object {\n \"access_activity_log\": null,\n \"billing_address\": null,\n \"cancellation_policy\": null,\n \"cancellation_policy_disclosure\": null,\n \"cancellation_rebuttal\": null,\n \"customer_communication\": null,\n \"customer_email_address\": null,\n \"customer_name\": null,\n \"customer_purchase_ip\": null,\n \"customer_signature\": null,\n \"duplicate_charge_documentation\": null,\n \"duplicate_charge_explanation\": null,\n \"duplicate_charge_id\": null,\n \"product_description\": null,\n \"receipt\": null,\n \"refund_policy\": null,\n \"refund_policy_disclosure\": null,\n \"refund_refusal_explanation\": null,\n \"service_date\": null,\n \"service_documentation\": null,\n \"shipping_address\": null,\n \"shipping_carrier\": null,\n \"shipping_date\": null,\n \"shipping_documentation\": null,\n \"shipping_tracking_number\": null,\n \"uncategorized_file\": null,\n \"uncategorized_text\": null\n}\n'''"},{"nl":"Retrieve a disputeRetrieves the dispute with the given ID.ParametersNo parameters.ReturnsReturns a dispute if a valid dispute ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Dispute.retrieve(\n \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n)\n'''Response {\n \"id\": \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n \"object\": \"dispute\",\n \"amount\": 1000,\n \"balance_transactions\": [],\n \"charge\": \"ch_1AZtxr2eZvKYlo2CJDX8whov\",\n \"created\": 1659518876,\n \"currency\": \"usd\",\n \"evidence\": {\n \"access_activity_log\": null,\n \"billing_address\": null,\n \"cancellation_policy\": null,\n \"cancellation_policy_disclosure\": null,\n \"cancellation_rebuttal\": null,\n \"customer_communication\": null,\n \"customer_email_address\": null,\n \"customer_name\": null,\n \"customer_purchase_ip\": null,\n \"customer_signature\": null,\n \"duplicate_charge_documentation\": null,\n \"duplicate_charge_explanation\": null,\n \"duplicate_charge_id\": null,\n \"product_description\": null,\n \"receipt\": null,\n \"refund_policy\": null,\n \"refund_policy_disclosure\": null,\n \"refund_refusal_explanation\": null,\n \"service_date\": null,\n \"service_documentation\": null,\n \"shipping_address\": null,\n \"shipping_carrier\": null,\n \"shipping_date\": null,\n \"shipping_documentation\": null,\n \"shipping_tracking_number\": null,\n \"uncategorized_file\": null,\n \"uncategorized_text\": null\n },\n \"evidence_details\": {\n \"due_by\": 1661212799,\n \"has_evidence\": false,\n \"past_due\": false,\n \"submission_count\": 0\n },\n \"is_charge_refundable\": true,\n \"livemode\": false,\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": \"general\",\n \"status\": \"warning_needs_response\"\n}'''"},{"nl":"Update a disputeWhen you get a dispute, contacting your customer is always the best first step. If that doesn\u2019t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.\nDepending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.Parameters evidence optional dictionary Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.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. submit optional Whether to immediately submit evidence to the bank. If false, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to true (the default).ReturnsReturns the dispute object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Dispute.modify(\n \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n \"object\": \"dispute\",\n \"amount\": 1000,\n \"balance_transactions\": [],\n \"charge\": \"ch_1AZtxr2eZvKYlo2CJDX8whov\",\n \"created\": 1659518876,\n \"currency\": \"usd\",\n \"evidence\": {\n \"access_activity_log\": null,\n \"billing_address\": null,\n \"cancellation_policy\": null,\n \"cancellation_policy_disclosure\": null,\n \"cancellation_rebuttal\": null,\n \"customer_communication\": null,\n \"customer_email_address\": null,\n \"customer_name\": null,\n \"customer_purchase_ip\": null,\n \"customer_signature\": null,\n \"duplicate_charge_documentation\": null,\n \"duplicate_charge_explanation\": null,\n \"duplicate_charge_id\": null,\n \"product_description\": null,\n \"receipt\": null,\n \"refund_policy\": null,\n \"refund_policy_disclosure\": null,\n \"refund_refusal_explanation\": null,\n \"service_date\": null,\n \"service_documentation\": null,\n \"shipping_address\": null,\n \"shipping_carrier\": null,\n \"shipping_date\": null,\n \"shipping_documentation\": null,\n \"shipping_tracking_number\": null,\n \"uncategorized_file\": null,\n \"uncategorized_text\": null\n },\n \"evidence_details\": {\n \"due_by\": 1661212799,\n \"has_evidence\": false,\n \"past_due\": false,\n \"submission_count\": 0\n },\n \"is_charge_refundable\": true,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"payment_intent\": null,\n \"reason\": \"general\",\n \"status\": \"warning_needs_response\"\n}'''"},{"nl":"Close a disputeClosing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.\nThe status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.ParametersNo parameters.ReturnsReturns the dispute object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Dispute.close(\n \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n)\n'''Response {\n \"id\": \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n \"object\": \"dispute\",\n \"amount\": 1000,\n \"balance_transactions\": [],\n \"charge\": \"ch_1AZtxr2eZvKYlo2CJDX8whov\",\n \"created\": 1659518876,\n \"currency\": \"usd\",\n \"evidence\": {\n \"access_activity_log\": null,\n \"billing_address\": null,\n \"cancellation_policy\": null,\n \"cancellation_policy_disclosure\": null,\n \"cancellation_rebuttal\": null,\n \"customer_communication\": null,\n \"customer_email_address\": null,\n \"customer_name\": null,\n \"customer_purchase_ip\": null,\n \"customer_signature\": null,\n \"duplicate_charge_documentation\": null,\n \"duplicate_charge_explanation\": null,\n \"duplicate_charge_id\": null,\n \"product_description\": null,\n \"receipt\": null,\n \"refund_policy\": null,\n \"refund_policy_disclosure\": null,\n \"refund_refusal_explanation\": null,\n \"service_date\": null,\n \"service_documentation\": null,\n \"shipping_address\": null,\n \"shipping_carrier\": null,\n \"shipping_date\": null,\n \"shipping_documentation\": null,\n \"shipping_tracking_number\": null,\n \"uncategorized_file\": null,\n \"uncategorized_text\": null\n },\n \"evidence_details\": {\n \"due_by\": 1661212799,\n \"has_evidence\": false,\n \"past_due\": false,\n \"submission_count\": 0\n },\n \"is_charge_refundable\": true,\n \"livemode\": false,\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": \"general\",\n \"status\": \"lost\"\n}'''"},{"nl":"List all disputesReturns a list of your disputes.Parameters charge optional Only return disputes associated to the charge specified by this charge ID. payment_intent optional Only return disputes associated to the PaymentIntent specified by this PaymentIntent 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 disputes, starting after dispute starting_after. Each entry in the array is a separate dispute object. If no more disputes are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Dispute.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/disputes\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"dp_1LSdrs2eZvKYlo2C7GrtVJtt\",\n \"object\": \"dispute\",\n \"amount\": 1000,\n \"balance_transactions\": [],\n \"charge\": \"ch_1AZtxr2eZvKYlo2CJDX8whov\",\n \"created\": 1659518876,\n \"currency\": \"usd\",\n \"evidence\": {\n \"access_activity_log\": null,\n \"billing_address\": null,\n \"cancellation_policy\": null,\n \"cancellation_policy_disclosure\": null,\n \"cancellation_rebuttal\": null,\n \"customer_communication\": null,\n \"customer_email_address\": null,\n \"customer_name\": null,\n \"customer_purchase_ip\": null,\n \"customer_signature\": null,\n \"duplicate_charge_documentation\": null,\n \"duplicate_charge_explanation\": null,\n \"duplicate_charge_id\": null,\n \"product_description\": null,\n \"receipt\": null,\n \"refund_policy\": null,\n \"refund_policy_disclosure\": null,\n \"refund_refusal_explanation\": null,\n \"service_date\": null,\n \"service_documentation\": null,\n \"shipping_address\": null,\n \"shipping_carrier\": null,\n \"shipping_date\": null,\n \"shipping_documentation\": null,\n \"shipping_tracking_number\": null,\n \"uncategorized_file\": null,\n \"uncategorized_text\": null\n },\n \"evidence_details\": {\n \"due_by\": 1661212799,\n \"has_evidence\": false,\n \"past_due\": false,\n \"submission_count\": 0\n },\n \"is_charge_refundable\": true,\n \"livemode\": false,\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": \"general\",\n \"status\": \"warning_needs_response\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"EventsEvents are our way of letting you know when something interesting happens in\nyour account. When an interesting event occurs, we create a new Event\nobject. For example, when a charge succeeds, we create a charge.succeeded\nevent; and when an invoice payment attempt fails, we create an\ninvoice.payment_failed event. Note that many API requests may cause multiple\nevents to be created. For example, if you create a new subscription for a\ncustomer, you will receive both a customer.subscription.created event and a\ncharge.succeeded event.Events occur when the state of another API resource changes. The state of that\nresource at the time of the change is embedded in the event's data field. For\nexample, a charge.succeeded event will contain a charge, and an\ninvoice.payment_failed event will contain an invoice.As with other API resources, you can use endpoints to retrieve an\nindividual event or a list of events\nfrom the API. We also have a separate\nwebhooks system for sending the\nEvent objects directly to an endpoint on your server. Webhooks are managed\nin your\naccount settings,\nand our Using Webhooks guide will help you get set up.When using Connect, you can also receive notifications of\nevents that occur in connected accounts. For these events, there will be an\nadditional account attribute in the received Event object.NOTE: Right now, access to events through the Retrieve Event API is\nguaranteed only for 30 days","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/events\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/events\n'''"},{"nl":"The event objectAttributes id string Unique identifier for the object. api_version string The Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014. data hash Object containing data associated with the event.Show child attributes request hash Information on the API request that instigated the event.Show child attributes type string Description of the event (e.g., invoice.created or charge.refunded).More attributesExpand all object string, value is \"event\" account string Connect only created timestamp livemode boolean pending_webhooks positive integer or zero","code":"'''The event object {\n \"id\": \"evt_1CiPtv2eZvKYlo2CcUZsDcO6\",\n \"object\": \"event\",\n \"api_version\": \"2018-05-21\",\n \"created\": 1530291411,\n \"data\": {\n \"object\": {\n \"id\": \"src_1CiPsl2eZvKYlo2CVVyt3LKy\",\n \"object\": \"source\",\n \"amount\": 1000,\n \"client_secret\": \"src_client_secret_D8hHhtdrGWQyK8bLM4M3uFQ6\",\n \"created\": 1530291339,\n \"currency\": \"eur\",\n \"flow\": \"redirect\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": null,\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": \"Jenny Rosen\",\n \"verified_phone\": null\n },\n \"redirect\": {\n \"failure_reason\": null,\n \"return_url\": \"https:\/\/minkpolice.com\",\n \"status\": \"succeeded\",\n \"url\": \"https:\/\/hooks.stripe.com\/redirect\/authenticate\/src_1CiPsl2eZvKYlo2CVVyt3LKy?client_secret=src_client_secret_D8hHhtdrGWQyK8bLM4M3uFQ6\"\n },\n \"sofort\": {\n \"country\": \"DE\",\n \"bank_code\": \"DEUT\",\n \"bank_name\": \"Deutsche Bank\",\n \"bic\": \"DEUTDE2H\",\n \"iban_last4\": \"3000\",\n \"statement_descriptor\": null,\n \"preferred_language\": null\n },\n \"statement_descriptor\": null,\n \"status\": \"chargeable\",\n \"type\": \"sofort\",\n \"usage\": \"single_use\"\n }\n },\n \"livemode\": false,\n \"pending_webhooks\": 0,\n \"request\": {\n \"id\": null,\n \"idempotency_key\": null\n },\n \"type\": \"source.chargeable\"\n}\n'''"},{"nl":"Retrieve an eventRetrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.ParametersNo parameters.ReturnsReturns an event object if a valid identifier was provided. All events share a common structure, detailed to the right. The only property that will differ is the data property.\nIn each case, the data dictionary will have an attribute called object and its value will be the same as retrieving the same object directly from the API. For example, a customer.created event will have the same information as retrieving the relevant customer would.\nIn cases where the attributes of an object have changed, data will also contain a dictionary containing the changes","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Event.retrieve(\n \"evt_1CiPtv2eZvKYlo2CcUZsDcO6\",\n)\n'''Response {\n \"id\": \"evt_1CiPtv2eZvKYlo2CcUZsDcO6\",\n \"object\": \"event\",\n \"api_version\": \"2018-05-21\",\n \"created\": 1530291411,\n \"data\": {\n \"object\": {\n \"id\": \"src_1CiPsl2eZvKYlo2CVVyt3LKy\",\n \"object\": \"source\",\n \"amount\": 1000,\n \"client_secret\": \"src_client_secret_D8hHhtdrGWQyK8bLM4M3uFQ6\",\n \"created\": 1530291339,\n \"currency\": \"eur\",\n \"flow\": \"redirect\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": null,\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": \"Jenny Rosen\",\n \"verified_phone\": null\n },\n \"redirect\": {\n \"failure_reason\": null,\n \"return_url\": \"https:\/\/minkpolice.com\",\n \"status\": \"succeeded\",\n \"url\": \"https:\/\/hooks.stripe.com\/redirect\/authenticate\/src_1CiPsl2eZvKYlo2CVVyt3LKy?client_secret=src_client_secret_D8hHhtdrGWQyK8bLM4M3uFQ6\"\n },\n \"sofort\": {\n \"country\": \"DE\",\n \"bank_code\": \"DEUT\",\n \"bank_name\": \"Deutsche Bank\",\n \"bic\": \"DEUTDE2H\",\n \"iban_last4\": \"3000\",\n \"statement_descriptor\": null,\n \"preferred_language\": null\n },\n \"statement_descriptor\": null,\n \"status\": \"chargeable\",\n \"type\": \"sofort\",\n \"usage\": \"single_use\"\n }\n },\n \"livemode\": false,\n \"pending_webhooks\": 0,\n \"request\": {\n \"id\": null,\n \"idempotency_key\": null\n },\n \"type\": \"source.chargeable\"\n}'''"},{"nl":"List all eventsList events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).Parameters types optional An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either type or types, but not both.More parametersExpand all created optional dictionary delivery_success optional ending_before optional limit optional starting_after optional type optional ReturnsA dictionary with a data property that contains an array of up to limit events, starting after event starting_after. Each entry in the array is a separate event object. If no more events are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Event.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/events\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"evt_1CiPtv2eZvKYlo2CcUZsDcO6\",\n \"object\": \"event\",\n \"api_version\": \"2018-05-21\",\n \"created\": 1530291411,\n \"data\": {\n \"object\": {\n \"id\": \"src_1CiPsl2eZvKYlo2CVVyt3LKy\",\n \"object\": \"source\",\n \"amount\": 1000,\n \"client_secret\": \"src_client_secret_D8hHhtdrGWQyK8bLM4M3uFQ6\",\n \"created\": 1530291339,\n \"currency\": \"eur\",\n \"flow\": \"redirect\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": null,\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": \"Jenny Rosen\",\n \"verified_phone\": null\n },\n \"redirect\": {\n \"failure_reason\": null,\n \"return_url\": \"https:\/\/minkpolice.com\",\n \"status\": \"succeeded\",\n \"url\": \"https:\/\/hooks.stripe.com\/redirect\/authenticate\/src_1CiPsl2eZvKYlo2CVVyt3LKy?client_secret=src_client_secret_D8hHhtdrGWQyK8bLM4M3uFQ6\"\n },\n \"sofort\": {\n \"country\": \"DE\",\n \"bank_code\": \"DEUT\",\n \"bank_name\": \"Deutsche Bank\",\n \"bic\": \"DEUTDE2H\",\n \"iban_last4\": \"3000\",\n \"statement_descriptor\": null,\n \"preferred_language\": null\n },\n \"statement_descriptor\": null,\n \"status\": \"chargeable\",\n \"type\": \"sofort\",\n \"usage\": \"single_use\"\n }\n },\n \"livemode\": false,\n \"pending_webhooks\": 0,\n \"request\": {\n \"id\": null,\n \"idempotency_key\": null\n },\n \"type\": \"source.chargeable\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"FilesThis is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the create file\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a Sigma scheduled\nquery).","code":"'''Endpoints\u00a0\u00a0POST\u00a0https:\/\/files.stripe.com\/v1\/files\u00a0\u00a0\u00a0GET\u00a0\/v1\/files\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/files\n'''"},{"nl":"The file objectAttributes id string Unique identifier for the object. purpose enum The purpose of the uploaded file.Possible enum valuesaccount_requirement Additional documentation requirements that can be requested for an account.additional_verification Additional verification for custom accounts.business_icon A business icon.business_logo A business logo.customer_signature Customer signature image.dispute_evidence Evidence to submit with a dispute response.document_provider_identity_document Show 7 more type string The type of the file returned (e.g., csv, pdf, jpg, or png).More attributesExpand all object string, value is \"file\" created timestamp expires_at timestamp filename string links list size integer title string url string","code":"'''The file object {\n \"id\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"object\": \"file\",\n \"created\": 1631235788,\n \"expires_at\": null,\n \"filename\": \"dd.jpeg\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"link_1LSe2N2eZvKYlo2CHLmSYQJz\",\n \"object\": \"file_link\",\n \"created\": 1659519527,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfNHU3YmpneDlIUFBQMTlSS3lmWDQxQlRW00nKWaZzGr\"\n },\n {\n \"id\": \"link_1LSe2I2eZvKYlo2C2jFw0Gzq\",\n \"object\": \"file_link\",\n \"created\": 1659519522,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRVA2UDR5S1ZyVmRMbFF4WExHWlNOa1Ax004VazMKbc\"\n },\n {\n \"id\": \"link_1LSe2D2eZvKYlo2CslI29SvC\",\n \"object\": \"file_link\",\n \"created\": 1659519517,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMVB4OFBvdmMyY2FidnpTQ1VYZ0dDYkJ100MClkyr0o\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2C00aTaqRQ\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfREVTazB5blMxZkFQRlIyS3hkeDZHcXMy00iB0i12NG\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2CZTvXtwWS\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfU0owQ3dwT0dPOVdRaXFSZ3FYSndBcVNh00lmt1vuwG\"\n },\n {\n \"id\": \"link_1LSe292eZvKYlo2ChsRxIlRc\",\n \"object\": \"file_link\",\n \"created\": 1659519513,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaDdEVllBdTJ4UmpUMnRsTDhtaDlTeGJm00OOXT4IRf\"\n },\n {\n \"id\": \"link_1LSe252eZvKYlo2CopSZDvuE\",\n \"object\": \"file_link\",\n \"created\": 1659519509,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRzNtQmhaMkpvN3J3OG1YSVdiOGZiTGhE00SRpVuhS8\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2CAAwj4nge\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMjJ0Wm5weFBDWlVPeEZDaWQ0REpvSUVO00I4gJcWng\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2C1jAhdzY0\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3Rfb1pTQVJiaWg0QTFxS3dxc0NzU2FGZ0NK00Pvbw9x17\"\n },\n {\n \"id\": \"link_1LSe212eZvKYlo2CgiTVrVFi\",\n \"object\": \"file_link\",\n \"created\": 1659519505,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaE5qQ0NJb2FWbEpxS0JtejJHZ2plV0hX00xhjC9hjC\"\n }\n ],\n \"has_more\": true,\n \"url\": \"\/v1\/file_links?file=file_1JXy922eZvKYlo2CV17dW6tI\"\n },\n \"purpose\": \"business_icon\",\n \"size\": 6283,\n \"title\": null,\n \"type\": \"png\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1JXy922eZvKYlo2CV17dW6tI\/contents\"\n}\n'''"},{"nl":"Create a fileTo upload a file to Stripe, you\u2019ll need to send a request of type multipart\/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.\nAll of Stripe\u2019s officially supported Client libraries should have support for sending multipart\/form-data.Parameters file required A file to upload. The file should follow the specifications of RFC 2388 (which defines file transfers for the multipart\/form-data protocol). purpose required The purpose of the uploaded file.Possible enum valuesaccount_requirement Additional documentation requirements that can be requested for an account.additional_verification Additional verification for custom accounts.business_icon A business icon.business_logo A business logo.customer_signature Customer signature image.dispute_evidence Evidence to submit with a dispute response.identity_document A document to verify the identity of an account owner during account provisioning.pci_document A self-assessment PCI questionnaire.tax_document_user_upload A user-uploaded tax document.More parametersExpand all file_link_data optional dictionary ReturnsReturns the file object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nwith open(\"\/path\/to\/a\/file.jpg\", \"rb\") as fp:\n stripe.File.create(\n purpose=\"dispute_evidence\",\n file=fp\n )\n'''Response {\n \"id\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"object\": \"file\",\n \"created\": 1631235788,\n \"expires_at\": null,\n \"filename\": \"dd.jpeg\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"link_1LSe2N2eZvKYlo2CHLmSYQJz\",\n \"object\": \"file_link\",\n \"created\": 1659519527,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfNHU3YmpneDlIUFBQMTlSS3lmWDQxQlRW00nKWaZzGr\"\n },\n {\n \"id\": \"link_1LSe2I2eZvKYlo2C2jFw0Gzq\",\n \"object\": \"file_link\",\n \"created\": 1659519522,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRVA2UDR5S1ZyVmRMbFF4WExHWlNOa1Ax004VazMKbc\"\n },\n {\n \"id\": \"link_1LSe2D2eZvKYlo2CslI29SvC\",\n \"object\": \"file_link\",\n \"created\": 1659519517,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMVB4OFBvdmMyY2FidnpTQ1VYZ0dDYkJ100MClkyr0o\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2C00aTaqRQ\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfREVTazB5blMxZkFQRlIyS3hkeDZHcXMy00iB0i12NG\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2CZTvXtwWS\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfU0owQ3dwT0dPOVdRaXFSZ3FYSndBcVNh00lmt1vuwG\"\n },\n {\n \"id\": \"link_1LSe292eZvKYlo2ChsRxIlRc\",\n \"object\": \"file_link\",\n \"created\": 1659519513,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaDdEVllBdTJ4UmpUMnRsTDhtaDlTeGJm00OOXT4IRf\"\n },\n {\n \"id\": \"link_1LSe252eZvKYlo2CopSZDvuE\",\n \"object\": \"file_link\",\n \"created\": 1659519509,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRzNtQmhaMkpvN3J3OG1YSVdiOGZiTGhE00SRpVuhS8\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2CAAwj4nge\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMjJ0Wm5weFBDWlVPeEZDaWQ0REpvSUVO00I4gJcWng\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2C1jAhdzY0\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3Rfb1pTQVJiaWg0QTFxS3dxc0NzU2FGZ0NK00Pvbw9x17\"\n },\n {\n \"id\": \"link_1LSe212eZvKYlo2CgiTVrVFi\",\n \"object\": \"file_link\",\n \"created\": 1659519505,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaE5qQ0NJb2FWbEpxS0JtejJHZ2plV0hX00xhjC9hjC\"\n }\n ],\n \"has_more\": true,\n \"url\": \"\/v1\/file_links?file=file_1JXy922eZvKYlo2CV17dW6tI\"\n },\n \"purpose\": \"dispute_evidence\",\n \"size\": 6283,\n \"title\": null,\n \"type\": \"png\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1JXy922eZvKYlo2CV17dW6tI\/contents\",\n \"file\": \"{a file descriptor}\"\n}'''"},{"nl":"Retrieve a fileRetrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the File Upload Guide.ParametersNo parameters.ReturnsReturns a file object if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.File.retrieve(\n \"file_1JXy922eZvKYlo2CV17dW6tI\",\n)\n'''Response {\n \"id\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"object\": \"file\",\n \"created\": 1631235788,\n \"expires_at\": null,\n \"filename\": \"dd.jpeg\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"link_1LSe2N2eZvKYlo2CHLmSYQJz\",\n \"object\": \"file_link\",\n \"created\": 1659519527,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfNHU3YmpneDlIUFBQMTlSS3lmWDQxQlRW00nKWaZzGr\"\n },\n {\n \"id\": \"link_1LSe2I2eZvKYlo2C2jFw0Gzq\",\n \"object\": \"file_link\",\n \"created\": 1659519522,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRVA2UDR5S1ZyVmRMbFF4WExHWlNOa1Ax004VazMKbc\"\n },\n {\n \"id\": \"link_1LSe2D2eZvKYlo2CslI29SvC\",\n \"object\": \"file_link\",\n \"created\": 1659519517,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMVB4OFBvdmMyY2FidnpTQ1VYZ0dDYkJ100MClkyr0o\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2C00aTaqRQ\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfREVTazB5blMxZkFQRlIyS3hkeDZHcXMy00iB0i12NG\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2CZTvXtwWS\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfU0owQ3dwT0dPOVdRaXFSZ3FYSndBcVNh00lmt1vuwG\"\n },\n {\n \"id\": \"link_1LSe292eZvKYlo2ChsRxIlRc\",\n \"object\": \"file_link\",\n \"created\": 1659519513,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaDdEVllBdTJ4UmpUMnRsTDhtaDlTeGJm00OOXT4IRf\"\n },\n {\n \"id\": \"link_1LSe252eZvKYlo2CopSZDvuE\",\n \"object\": \"file_link\",\n \"created\": 1659519509,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRzNtQmhaMkpvN3J3OG1YSVdiOGZiTGhE00SRpVuhS8\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2CAAwj4nge\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMjJ0Wm5weFBDWlVPeEZDaWQ0REpvSUVO00I4gJcWng\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2C1jAhdzY0\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3Rfb1pTQVJiaWg0QTFxS3dxc0NzU2FGZ0NK00Pvbw9x17\"\n },\n {\n \"id\": \"link_1LSe212eZvKYlo2CgiTVrVFi\",\n \"object\": \"file_link\",\n \"created\": 1659519505,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaE5qQ0NJb2FWbEpxS0JtejJHZ2plV0hX00xhjC9hjC\"\n }\n ],\n \"has_more\": true,\n \"url\": \"\/v1\/file_links?file=file_1JXy922eZvKYlo2CV17dW6tI\"\n },\n \"purpose\": \"business_icon\",\n \"size\": 6283,\n \"title\": null,\n \"type\": \"png\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1JXy922eZvKYlo2CV17dW6tI\/contents\"\n}'''"},{"nl":"List all filesReturns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.Parameters purpose optional The file purpose to filter queries by. If none is provided, files will not be filtered by purpose.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 files, starting after file starting_after. Each entry in the array is a separate file object. If no more files are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.File.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/files\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"object\": \"file\",\n \"created\": 1631235788,\n \"expires_at\": null,\n \"filename\": \"dd.jpeg\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"link_1LSe2N2eZvKYlo2CHLmSYQJz\",\n \"object\": \"file_link\",\n \"created\": 1659519527,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfNHU3YmpneDlIUFBQMTlSS3lmWDQxQlRW00nKWaZzGr\"\n },\n {\n \"id\": \"link_1LSe2I2eZvKYlo2C2jFw0Gzq\",\n \"object\": \"file_link\",\n \"created\": 1659519522,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRVA2UDR5S1ZyVmRMbFF4WExHWlNOa1Ax004VazMKbc\"\n },\n {\n \"id\": \"link_1LSe2D2eZvKYlo2CslI29SvC\",\n \"object\": \"file_link\",\n \"created\": 1659519517,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMVB4OFBvdmMyY2FidnpTQ1VYZ0dDYkJ100MClkyr0o\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2C00aTaqRQ\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfREVTazB5blMxZkFQRlIyS3hkeDZHcXMy00iB0i12NG\"\n },\n {\n \"id\": \"link_1LSe2B2eZvKYlo2CZTvXtwWS\",\n \"object\": \"file_link\",\n \"created\": 1659519515,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfU0owQ3dwT0dPOVdRaXFSZ3FYSndBcVNh00lmt1vuwG\"\n },\n {\n \"id\": \"link_1LSe292eZvKYlo2ChsRxIlRc\",\n \"object\": \"file_link\",\n \"created\": 1659519513,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaDdEVllBdTJ4UmpUMnRsTDhtaDlTeGJm00OOXT4IRf\"\n },\n {\n \"id\": \"link_1LSe252eZvKYlo2CopSZDvuE\",\n \"object\": \"file_link\",\n \"created\": 1659519509,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfRzNtQmhaMkpvN3J3OG1YSVdiOGZiTGhE00SRpVuhS8\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2CAAwj4nge\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfMjJ0Wm5weFBDWlVPeEZDaWQ0REpvSUVO00I4gJcWng\"\n },\n {\n \"id\": \"link_1LSe232eZvKYlo2C1jAhdzY0\",\n \"object\": \"file_link\",\n \"created\": 1659519507,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3Rfb1pTQVJiaWg0QTFxS3dxc0NzU2FGZ0NK00Pvbw9x17\"\n },\n {\n \"id\": \"link_1LSe212eZvKYlo2CgiTVrVFi\",\n \"object\": \"file_link\",\n \"created\": 1659519505,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfaE5qQ0NJb2FWbEpxS0JtejJHZ2plV0hX00xhjC9hjC\"\n }\n ],\n \"has_more\": true,\n \"url\": \"\/v1\/file_links?file=file_1JXy922eZvKYlo2CV17dW6tI\"\n },\n \"purpose\": \"business_icon\",\n \"size\": 6283,\n \"title\": null,\n \"type\": \"png\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1JXy922eZvKYlo2CV17dW6tI\/contents\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"File LinksTo share the contents of a File object with non-Stripe users, you can\ncreate a FileLink. FileLinks contain a URL that can be used to\nretrieve the contents of the file without authentication","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/file_links\u00a0\u00a0\u00a0GET\u00a0\/v1\/file_links\/:id\u00a0\u00a0POST\u00a0\/v1\/file_links\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/file_links\n'''"},{"nl":"The file link objectAttributes id string Unique identifier for the object. expires_at timestamp Time at which the link expires. file string expandable The file object this link points 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. url string The publicly accessible URL to download the file.More attributesExpand all object string, value is \"file_link\" created timestamp expired boolean livemode boolean","code":"'''The file link object {\n \"id\": \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n \"object\": \"file_link\",\n \"created\": 1659517935,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfSElFUVo0aE9oN3BxUjl3TE1BYWZqZ3lW00WFy5PY6L\"\n}\n'''"},{"nl":"Create a file linkCreates a new file link object.Parameters file required The ID of the file. The file\u2019s purpose must be one of the following: business_icon, business_logo, customer_signature, dispute_evidence, finance_report_run, identity_document_downloadable, pci_document, selfie, sigma_scheduled_query, or tax_document_user_upload. expires_at optional A future timestamp after which the link will no longer be usable. 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 file link object if successful, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.FileLink.create(\n file=\"file_1JXy922eZvKYlo2CV17dW6tI\",\n)\n'''Response {\n \"id\": \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n \"object\": \"file_link\",\n \"created\": 1659517935,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfSElFUVo0aE9oN3BxUjl3TE1BYWZqZ3lW00WFy5PY6L\"\n}'''"},{"nl":"Retrieve a file linkRetrieves the file link with the given ID.ParametersNo parameters.ReturnsReturns a file link object if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.FileLink.retrieve(\n \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n)\n'''Response {\n \"id\": \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n \"object\": \"file_link\",\n \"created\": 1659517935,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfSElFUVo0aE9oN3BxUjl3TE1BYWZqZ3lW00WFy5PY6L\"\n}'''"},{"nl":"Update a file linkUpdates an existing file link object. Expired links can no longer be updated.Parameters expires_at optional A future timestamp after which the link will no longer be usable, or now to expire the link immediately. 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 file link object if successful, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.FileLink.modify(\n \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n \"object\": \"file_link\",\n \"created\": 1659517935,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfSElFUVo0aE9oN3BxUjl3TE1BYWZqZ3lW00WFy5PY6L\"\n}'''"},{"nl":"List all file linksReturns a list of file links.ParametersExpand all created optional dictionary ending_before optional expired optional file optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit file links, starting after file link starting_after. Each entry in the array is a separate file link object. If no more file links are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.FileLink.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/file_links\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"link_1LSdch2eZvKYlo2ChSmmACpZ\",\n \"object\": \"file_link\",\n \"created\": 1659517935,\n \"expired\": false,\n \"expires_at\": null,\n \"file\": \"file_1JXy922eZvKYlo2CV17dW6tI\",\n \"livemode\": false,\n \"metadata\": {},\n \"url\": \"https:\/\/files.stripe.com\/links\/MDB8YWNjdF8xMDMyRDgyZVp2S1lsbzJDfGZsX3Rlc3RfSElFUVo0aE9oN3BxUjl3TE1BYWZqZ3lW00WFy5PY6L\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"MandatesA Mandate is a record of the permission a customer has given you to debit their payment method","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/mandates\/:id\n'''"},{"nl":"The Mandates objectAttributes id string Unique identifier for the object. customer_acceptance hash Details about the customer\u2019s acceptance of the mandate.Show child attributes payment_method string expandable ID of the payment method associated with this mandate. payment_method_details hash Additional mandate information specific to the payment method type.Show child attributes status enum The status of the mandate, which indicates whether it can be used to initiate a payment.Possible enum valuesactive The mandate can be used to initiate a payment.inactive The mandate was rejected, revoked, or previously used, and may not be used to initiate future payments.pending The mandate is newly created and is not yet active or inactive. type enum The type of the mandate.Possible enum valuesmulti_use Represents permission given for multiple payments.single_use Represents a one-time permission given for a single payment.More attributesExpand all object string, value is \"mandate\" livemode boolean multi_use hash single_use hash","code":"'''The Mandates object {\n \"id\": \"mandate_1LSdrY2eZvKYlo2CKPFyEpcJ\",\n \"object\": \"mandate\",\n \"customer_acceptance\": {\n \"accepted_at\": 123456789,\n \"online\": {\n \"ip_address\": \"127.0.0.0\",\n \"user_agent\": \"device\"\n },\n \"type\": \"online\"\n },\n \"livemode\": false,\n \"multi_use\": {},\n \"payment_method\": \"pm_123456789\",\n \"payment_method_details\": {\n \"sepa_debit\": {\n \"reference\": \"123456789\",\n \"url\": \"\"\n },\n \"type\": \"sepa_debit\"\n },\n \"status\": \"active\",\n \"type\": \"multi_use\"\n}\n'''"},{"nl":"Retrieve a MandateRetrieves a Mandate object.ParametersNo parameters.ReturnsReturns a Mandate object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Mandate.retrieve(\n \"mandate_1LSdrY2eZvKYlo2CKPFyEpcJ\",\n)\n'''Response {\n \"id\": \"mandate_1LSdrY2eZvKYlo2CKPFyEpcJ\",\n \"object\": \"mandate\",\n \"customer_acceptance\": {\n \"accepted_at\": 123456789,\n \"online\": {\n \"ip_address\": \"127.0.0.0\",\n \"user_agent\": \"device\"\n },\n \"type\": \"online\"\n },\n \"livemode\": false,\n \"multi_use\": {},\n \"payment_method\": \"pm_123456789\",\n \"payment_method_details\": {\n \"sepa_debit\": {\n \"reference\": \"123456789\",\n \"url\": \"\"\n },\n \"type\": \"sepa_debit\"\n },\n \"status\": \"active\",\n \"type\": \"multi_use\"\n}'''"},{"nl":"PaymentIntentsA PaymentIntent guides you through the process of collecting a payment from your customer.\nWe recommend that you create exactly one PaymentIntent for each order or\ncustomer session in your system. You can reference the PaymentIntent later to\nsee the history of payment attempts for a particular session.A PaymentIntent transitions through\nmultiple statuses\nthroughout its lifetime as it interfaces with Stripe.js to perform\nauthentication flows and ultimately creates at most one successful charge.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/payment_intents\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_intents\/:id\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\/confirm\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\/capture\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_intents\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\/increment_authorization\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_intents\/search\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\/verify_microdeposits\u00a0\u00a0POST\u00a0\/v1\/payment_intents\/:id\/apply_customer_balance\n'''"},{"nl":"The PaymentIntent objectAttributes id string retrievable with publishable key Unique identifier for the object. amount integer retrievable with publishable key Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). automatic_payment_methods hash retrievable with publishable key Settings to configure compatible payment methods from the Stripe DashboardShow child attributes charges list Charges that were created by this PaymentIntent, if any.Show child attributes client_secret string retrievable with publishable key The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\nRefer to our docs to accept a payment and learn about how client_secret should be handled. currency currency retrievable with publishable key Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable ID of the Customer this PaymentIntent belongs to, if one exists.\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\nIf present in combination with setup_future_usage, this PaymentIntent\u2019s payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. description string retrievable with publishable key An arbitrary string attached to the object. Often useful for displaying to users. last_payment_error hash retrievable with publishable key The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.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. For more information, see the documentation. next_action hash retrievable with publishable key If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.Show child attributes payment_method string expandable retrievable with publishable key ID of the payment method used in this PaymentIntent. payment_method_types array containing strings retrievable with publishable key The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. receipt_email string retrievable with publishable key Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings. setup_future_usage enum retrievable with publishable key Indicates that you intend to make future payments with this PaymentIntent\u2019s payment method.\nProviding this parameter will attach the payment method to the PaymentIntent\u2019s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.\nWhen processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.Possible enum valueson_session Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow.off_session Use off_session if your customer may or may not be present in your checkout flow. shipping hash retrievable with publishable key Shipping information for this PaymentIntent.Show child attributes statement_descriptor string For non-card charges, you can use this value as the complete description that appears on your customers\u2019 statements. Must contain at least one letter, maximum 22 characters. statement_descriptor_suffix string Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that\u2019s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. status string retrievable with publishable key Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status.More attributesExpand all object string, value is \"payment_intent\" retrievable with publishable key amount_capturable integer amount_details hash amount_received integer application string expandable \"application\" Connect only application_fee_amount integer Connect only canceled_at timestamp retrievable with publishable key cancellation_reason string retrievable with publishable key capture_method enum retrievable with publishable key confirmation_method enum retrievable with publishable key created timestamp retrievable with publishable key invoice string expandable livemode boolean retrievable with publishable key on_behalf_of string expandable Connect only payment_method_options hash processing hash retrievable with publishable key review string expandable transfer_data hash Connect only transfer_group string Connect only","code":"'''The PaymentIntent object {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}\n'''"},{"nl":"Create a PaymentIntentCreates a PaymentIntent object.\nAfter the PaymentIntent is created, attach a payment method and confirm\nto continue the payment. You can read more about the different payment flows\navailable via the Payment Intents API here.\nWhen confirm=true is used during creation, it is equivalent to creating\nand confirming the PaymentIntent in the same call. You may use any parameters\navailable in the confirm API when confirm=true\nis supplied.Parameters amount required Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. automatic_payment_methods optional dictionary When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent\u2019s other parameters.Show child parameters confirm optional Set to true to attempt to confirm this PaymentIntent immediately. This parameter defaults to false. When creating and confirming a PaymentIntent at the same time, parameters available in the confirm API may also be provided. customer optional ID of the Customer this PaymentIntent belongs to, if one exists.\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\nIf present in combination with setup_future_usage, this PaymentIntent\u2019s payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. 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. off_session optional only when confirm=true Set to true to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and charge them later. This parameter can only be used with confirm=true. payment_method optional ID of the payment method (a PaymentMethod, Card, or compatible Source object) to attach to this PaymentIntent.\nIf this parameter is omitted with confirm=true, customer.default_source will be attached as this PaymentIntent\u2019s payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the payment_method going forward. payment_method_types optional The list of payment method types that this PaymentIntent is allowed to use.\nIf this is not provided, defaults to [\u201ccard\u201d].\nValid payment method types include: acss_debit, affirm, afterpay_clearpay, alipay, au_becs_debit, bacs_debit, bancontact, blik, boleto, card, card_present, eps, fpx, giropay, grabpay, ideal, klarna, konbini, link, oxxo, p24, paynow, promptpay, sepa_debit, sofort, us_bank_account, and wechat_pay. receipt_email optional Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings. setup_future_usage optional enum Indicates that you intend to make future payments with this PaymentIntent\u2019s payment method.\nProviding this parameter will attach the payment method to the PaymentIntent\u2019s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.\nWhen processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.Possible enum valueson_session Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow.off_session Use off_session if your customer may or may not be present in your checkout flow. shipping optional dictionary Shipping information for this PaymentIntent.Show child parameters statement_descriptor optional For non-card charges, you can use this value as the complete description that appears on your customers\u2019 statements. Must contain at least one letter, maximum 22 characters. statement_descriptor_suffix optional Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that\u2019s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.More parametersExpand all application_fee_amount optional Connect only capture_method optional enum confirmation_method optional enum error_on_requires_action optional only when confirm=true mandate optional only when confirm=true mandate_data optional dictionary only when confirm=true on_behalf_of optional Connect only payment_method_data optional dictionary payment_method_options optional dictionary radar_options optional dictionary return_url optional only when confirm=true transfer_data optional dictionary Connect only transfer_group optional Connect only use_stripe_sdk optional ReturnsReturns a PaymentIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.create(\n amount=2000,\n currency=\"usd\",\n payment_method_types=[\"card\"],\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 2000,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Retrieve a PaymentIntentRetrieves the details of a PaymentIntent that has previously been created. \nClient-side retrieval using a publishable key is allowed when the client_secret is provided in the query string. \nWhen retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.Parameters client_secret Required if using publishable key The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source.ReturnsReturns a PaymentIntent if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.retrieve(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Update a PaymentIntentUpdates properties on a PaymentIntent object without confirming.\nDepending on which properties you update, you may need to confirm the\nPaymentIntent again. For example, updating the payment_method will\nalways require you to confirm the PaymentIntent again. If you prefer to\nupdate and confirm at the same time, we recommend updating properties via\nthe confirm API instead.Parameters amount optional Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). currency optional Three-letter ISO currency code, in lowercase. Must be a supported currency. customer optional ID of the Customer this PaymentIntent belongs to, if one exists.\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\nIf present in combination with setup_future_usage, this PaymentIntent\u2019s payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. 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. payment_method optional ID of the payment method (a PaymentMethod, Card, or compatible Source object) to attach to this PaymentIntent. payment_method_types optional The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the Stripe Dashboard. receipt_email optional Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings. setup_future_usage optional enum Indicates that you intend to make future payments with this PaymentIntent\u2019s payment method.\nProviding this parameter will attach the payment method to the PaymentIntent\u2019s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.\nWhen processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.\nIf setup_future_usage is already set and you are performing a request using a publishable key, you may only update the value from on_session to off_session.Possible enum valueson_session Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow.off_session Use off_session if your customer may or may not be present in your checkout flow. shipping optional dictionary Shipping information for this PaymentIntent.Show child parameters statement_descriptor optional For non-card charges, you can use this value as the complete description that appears on your customers\u2019 statements. Must contain at least one letter, maximum 22 characters. statement_descriptor_suffix optional Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that\u2019s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.More parametersExpand all application_fee_amount optional Connect only capture_method optional enum secret key only payment_method_data optional dictionary payment_method_options optional dictionary transfer_data optional dictionary Connect only transfer_group optional Connect only ReturnsReturns a PaymentIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.modify(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Confirm a PaymentIntentConfirm that your customer intends to pay with current or provided\npayment method. Upon confirmation, the PaymentIntent will attempt to initiate\na payment.\nIf the selected payment method requires additional authentication steps, the\nPaymentIntent will transition to the requires_action status and\nsuggest additional actions via next_action. If payment fails,\nthe PaymentIntent will transition to the requires_payment_method status. If\npayment succeeds, the PaymentIntent will transition to the succeeded\nstatus (or requires_capture, if capture_method is set to manual).\nIf the confirmation_method is automatic, payment may be attempted\nusing our client SDKs\nand the PaymentIntent\u2019s client_secret.\nAfter next_actions are handled by the client, no additional\nconfirmation is required to complete the payment.\nIf the confirmation_method is manual, all payment attempts must be\ninitiated using a secret key.\nIf any actions are required for the payment, the PaymentIntent will\nreturn to the requires_confirmation state\nafter those actions are completed. Your server needs to then\nexplicitly re-confirm the PaymentIntent to initiate the next payment\nattempt. Read the expanded documentation\nto learn more about manual confirmation.Parameters payment_method optional ID of the payment method (a PaymentMethod, Card, or compatible Source object) to attach to this PaymentIntent. receipt_email optional Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings. setup_future_usage optional enum Indicates that you intend to make future payments with this PaymentIntent\u2019s payment method.\nProviding this parameter will attach the payment method to the PaymentIntent\u2019s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.\nWhen processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.\nIf setup_future_usage is already set and you are performing a request using a publishable key, you may only update the value from on_session to off_session.Possible enum valueson_session Use on_session if you intend to only reuse the payment method when your customer is present in your checkout flow.off_session Use off_session if your customer may or may not be present in your checkout flow. shipping optional dictionary Shipping information for this PaymentIntent.Show child parametersMore parametersExpand all capture_method optional enum secret key only error_on_requires_action optional mandate optional secret key only mandate_data optional dictionary off_session optional secret key only payment_method_data optional dictionary payment_method_options optional dictionary secret key only payment_method_types optional secret key only radar_options optional dictionary secret key only return_url optional use_stripe_sdk optional ReturnsReturns the resulting PaymentIntent after all possible transitions are applied","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\n# To create a PaymentIntent for confirmation, see our guide at: https:\/\/stripe.com\/docs\/payments\/payment-intents\/creating-payment-intents#creating-for-automatic\nstripe.PaymentIntent.confirm(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n payment_method=\"pm_card_visa\",\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1000,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 1000,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_1EXUPv2eZvKYlo2CStIqOmbY\",\n \"object\": \"charge\",\n \"amount\": 1000,\n \"amount_captured\": 1000,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1EXUPv2eZvKYlo2CNUI18wV8\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"Stripe\",\n \"captured\": true,\n \"created\": 1557239835,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"One blue fish\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": {\n \"network_status\": \"approved_by_network\",\n \"reason\": null,\n \"risk_level\": \"normal\",\n \"risk_score\": 9,\n \"seller_message\": \"Payment complete.\",\n \"type\": \"authorized\"\n },\n \"paid\": true,\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_method\": \"pm_1EXUPv2eZvKYlo2CUkqZASBe\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": null\n },\n \"country\": \"US\",\n \"exp_month\": 5,\n \"exp_year\": 2020,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": \"1230-7299\",\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_1EXUPv2eZvKYlo2CStIqOmbY\/rcpt_F1XUd7YIQjmM5TVGoaOmzEpU0FBogb2\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_1EXUPv2eZvKYlo2CStIqOmbY\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_9J35eTzWlxVmfbbQhmkNbewuL\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1524505326,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"One blue fish\",\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1EXUPv2eZvKYlo2CUkqZASBe\",\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Capture a PaymentIntentCapture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.\nUncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).\nLearn more about separate authorization and capture.Parameters amount_to_capture optional The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full amount_capturable if not provided.More parametersExpand all application_fee_amount optional Connect only statement_descriptor optional statement_descriptor_suffix optional transfer_data optional dictionary Connect only ReturnsReturns a PaymentIntent object with status=\"succeeded\" if the PaymentIntent was capturable. Returns an error if the PaymentIntent was not capturable or an invalid amount to capture was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\n# To create a requires_capture PaymentIntent, see our guide at: https:\/\/stripe.com\/docs\/payments\/capture-later\nstripe.PaymentIntent.capture(\n \"pi_1DrP8j2eZvKYlo2C7iVEN8ko\",\n)\n'''Response {\n \"id\": \"pi_1DrP8j2eZvKYlo2C7iVEN8ko\",\n \"object\": \"payment_intent\",\n \"amount\": 1000,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 1000,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_1EXUPv2eZvKYlo2CStIqOmbY\",\n \"object\": \"charge\",\n \"amount\": 1000,\n \"amount_captured\": 1000,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": \"txn_1EXUPv2eZvKYlo2CNUI18wV8\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"Stripe\",\n \"captured\": true,\n \"created\": 1557239835,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"One blue fish\",\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": {\n \"network_status\": \"approved_by_network\",\n \"reason\": null,\n \"risk_level\": \"normal\",\n \"risk_score\": 9,\n \"seller_message\": \"Payment complete.\",\n \"type\": \"authorized\"\n },\n \"paid\": true,\n \"payment_intent\": \"pi_1DrP8j2eZvKYlo2C7iVEN8ko\",\n \"payment_method\": \"pm_1EXUPv2eZvKYlo2CUkqZASBe\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": null\n },\n \"country\": \"US\",\n \"exp_month\": 5,\n \"exp_year\": 2020,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": \"1230-7299\",\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_1EXUPv2eZvKYlo2CStIqOmbY\/rcpt_F1XUd7YIQjmM5TVGoaOmzEpU0FBogb2\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_1EXUPv2eZvKYlo2CStIqOmbY\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrP8j2eZvKYlo2C7iVEN8ko\"\n },\n \"client_secret\": \"pi_1DrP8j2eZvKYlo2C7iVEN8ko_secret_9J35eTzWlxVmfbbQhmkNbewuL\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1524505326,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"One blue fish\",\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1EXUPv2eZvKYlo2CUkqZASBe\",\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Cancel a PaymentIntentA PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing. \nOnce canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=\u2019requires_capture\u2019, the remaining amount_capturable will automatically be refunded. \nYou cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session insteadParameters cancellation_reason optional Reason for canceling this PaymentIntent. Possible values are duplicate, fraudulent, requested_by_customer, or abandonedReturnsReturns a PaymentIntent object if the cancellation succeeded. Returns an error if the PaymentIntent has already been canceled or is not in a cancelable state","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\n# To create a PaymentIntent, see our guide at: https:\/\/stripe.com\/docs\/payments\/payment-intents\/creating-payment-intents#creating-for-automatic\nstripe.PaymentIntent.cancel(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"canceled\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"List all PaymentIntentsReturns a list of PaymentIntents.Parameters customer optional Only return PaymentIntents for the customer specified by this customer 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 PaymentIntents, starting after PaymentIntent starting_after. Each entry in the array is a separate PaymentIntent object. If no more PaymentIntents are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/payment_intents\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Increment an authorizationTerminal onlyPerform an incremental authorization on an eligible\nPaymentIntent. To be eligible, the\nPaymentIntent\u2019s status must be requires_capture and\nincremental_authorization_supported\nmust be true.\nIncremental authorizations attempt to increase the authorized amount on\nyour customer\u2019s card to the new, higher amount provided. As with the\ninitial authorization, incremental authorizations may be declined. A\nsingle PaymentIntent can call this endpoint multiple times to further\nincrease the authorized amount.\nIf the incremental authorization succeeds, the PaymentIntent object is\nreturned with the updated\namount.\nIf the incremental authorization fails, a\ncard_declined error is returned, and no\nfields on the PaymentIntent or Charge are updated. The PaymentIntent\nobject remains capturable for the previously authorized amount.\nEach PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.\nOnce captured, a PaymentIntent can no longer be incremented.\nLearn more about incremental authorizations.Parameters amount required The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. 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 application_fee_amount optional Connect only transfer_data optional dictionary Connect only ReturnsReturns a PaymentIntent object with the updated amount if the incremental authorization succeeded. Returns an error if the incremental authorization failed or the PaymentIntent isn\u2019t eligible for incremental authorizations","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.increment_authorization(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n amount=2099,\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 2099,\n \"amount_capturable\": 2099,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ch_1LQofM2eZvKYlo2CKgxFvg40\",\n \"object\": \"charge\",\n \"amount\": 2099,\n \"amount_captured\": 0,\n \"amount_refunded\": 0,\n \"application\": null,\n \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\": null,\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"calculated_statement_descriptor\": \"Stripe\",\n \"captured\": false,\n \"created\": 1659083728,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"disputed\": false,\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"fraud_details\": {},\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"outcome\": {\n \"network_status\": \"approved_by_network\",\n \"reason\": null,\n \"risk_level\": \"normal\",\n \"risk_score\": 53,\n \"seller_message\": \"Payment complete.\",\n \"type\": \"authorized\"\n },\n \"paid\": true,\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_method\": \"pm_1LQofM2eZvKYlo2CDKpp5V1E\",\n \"payment_method_details\": {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": null\n },\n \"country\": \"US\",\n \"exp_month\": 7,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"installments\": null,\n \"last4\": \"4242\",\n \"mandate\": null,\n \"moto\": null,\n \"network\": \"visa\",\n \"three_d_secure\": null,\n \"wallet\": null\n },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\": \"1321-6658\",\n \"receipt_url\": \"https:\/\/pay.stripe.com\/receipts\/acct_1032D82eZvKYlo2C\/ch_1LQofM2eZvKYlo2CKgxFvg40\/rcpt_M96tVsYMmZVExwoyyEw51Cln34nlzH6\",\n \"redaction\": null,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges\/ch_1LQofM2eZvKYlo2CKgxFvg40\/refunds\"\n },\n \"review\": null,\n \"shipping\": null,\n \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_zVkO2HUjRQVu1Ga3OTF37eqbA\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547209773,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1LQofM2eZvKYlo2CDKpp5V1E\",\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_capture\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Search PaymentIntentsSearch for PaymentIntents you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for payment intents. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit PaymentIntents. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.search(\n query=\"status:'succeeded' AND metadata['order_id']:'6735'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/payment_intents\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Verify microdeposits on a PaymentIntentVerifies microdeposits on a PaymentIntent object.Parameters client_secret Required if using publishable key The client secret of the PaymentIntent. amounts optional Two positive integers, in cents, equal to the values of the microdeposits sent to the bank account. descriptor_code optional A six-character code starting with SM present in the microdeposit sent to the bank account.ReturnsReturns a PaymentIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.stripe_object.StripeObject().request('post', '\/v1\/payment_intents\/pi_1DrPsv2eZvKYlo2CEDzqXfPH\/verify_microdeposits', {\n \"amounts\": [\n 32,\n 45\n ]\n})\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_HnBm0eaky68W77tawzGPNND4w\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1659519114,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1LSdvh2eZvKYlo2CURiS10vx\",\n \"payment_method_options\": {\n \"acss_debit\": {\n \"mandate_options\": {\n \"interval_description\": \"First day of every month\",\n \"payment_schedule\": \"interval\",\n \"transaction_type\": \"personal\"\n },\n \"verification_method\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"acss_debit\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"Reconcile a customer_balance PaymentIntentManually reconcile the remaining amount for a customer_balance PaymentIntent.Parameters amount optional Amount intended to be applied to this PaymentIntent from the customer\u2019s cash balance.\nA positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency).\nThe maximum amount is the amount of the PaymentIntent.\nWhen omitted, the amount defaults to the remaining amount requested on the PaymentIntent. currency optional Three-letter ISO currency code, in lowercase. Must be a supported currency.ReturnsReturns a PaymentIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentIntent.apply_customer_balance(\n \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n)\n'''Response {\n \"id\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"object\": \"payment_intent\",\n \"amount\": 1099,\n \"amount_capturable\": 0,\n \"amount_details\": {\n \"tip\": {}\n },\n \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\": \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/charges?payment_intent=pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"client_secret\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH_secret_DDAO0OLHB8Q8oN5btYX9rg9j2\",\n \"confirmation_method\": \"automatic\",\n \"created\": 1547212637,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"processing\": null,\n \"receipt_email\": null,\n \"redaction\": null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"status\": \"requires_payment_method\",\n \"transfer_data\": null,\n \"transfer_group\": null\n}'''"},{"nl":"SetupIntentsA SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.\nFor example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment.\nLater, you can use PaymentIntents to drive the payment flow.Create a SetupIntent as soon as you're ready to collect your customer's payment credentials.\nDo not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid.\nThe SetupIntent then transitions through multiple statuses as it guides\nyou through the setup process.Successful SetupIntents result in payment credentials that are optimized for future payments.\nFor example, cardholders in certain regions may need to be run through\nStrong Customer Authentication at the time of payment method collection\nin order to streamline later off-session payments.\nIf the SetupIntent is used with a Customer, upon success,\nit will automatically attach the resulting payment method to that Customer.\nWe recommend using SetupIntents or setup_future_usage on\nPaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.By using SetupIntents, you ensure that your customers experience the minimum set of required friction,\neven as regulations change over time.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/setup_intents\u00a0\u00a0\u00a0GET\u00a0\/v1\/setup_intents\/:id\u00a0\u00a0POST\u00a0\/v1\/setup_intents\/:id\u00a0\u00a0POST\u00a0\/v1\/setup_intents\/:id\/confirm\u00a0\u00a0POST\u00a0\/v1\/setup_intents\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/setup_intents\u00a0\u00a0POST\u00a0\/v1\/setup_intents\/:id\/verify_microdeposits\n'''"},{"nl":"The SetupIntent objectAttributes id string retrievable with publishable key Unique identifier for the object. client_secret string retrievable with publishable key The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.\nThe client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. customer string expandable ID of the Customer this SetupIntent belongs to, if one exists.\nIf present, the SetupIntent\u2019s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. description string retrievable with publishable key An arbitrary string attached to the object. Often useful for displaying to users. last_setup_error hash retrievable with publishable key The error encountered in the previous SetupIntent confirmation.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. next_action hash retrievable with publishable key If present, this property tells you what actions you need to take in order for your customer to continue payment setup.Show child attributes payment_method string expandable retrievable with publishable key ID of the payment method used with this SetupIntent. payment_method_types array containing strings retrievable with publishable key The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. status string retrievable with publishable key Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded. usage string retrievable with publishable key Indicates how the payment method is intended to be used in the future.\nUse on_session if you intend to only reuse the payment method when the customer is in your checkout flow. Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.More attributesExpand all object string, value is \"setup_intent\" retrievable with publishable key application string expandable \"application\" Connect only attach_to_self boolean cancellation_reason string retrievable with publishable key created timestamp retrievable with publishable key flow_directions array latest_attempt string expandable livemode boolean retrievable with publishable key mandate string expandable on_behalf_of string expandable Connect only payment_method_options hash single_use_mandate string expandable ","code":"'''The SetupIntent object {\n \"id\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa\",\n \"created\": 1562687161,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": null,\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"requires_payment_method\",\n \"usage\": \"off_session\"\n}\n'''"},{"nl":"Create a SetupIntentCreates a SetupIntent object.\nAfter the SetupIntent is created, attach a payment method and confirm\nto collect any required permissions to charge the payment method later.Parameters confirm optional Set to true to attempt to confirm this SetupIntent immediately. This parameter defaults to false. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. customer optional ID of the Customer this SetupIntent belongs to, if one exists.\nIf present, the SetupIntent\u2019s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. 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. payment_method optional ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. payment_method_types optional The list of payment method types that this SetupIntent is allowed to set up.\nIf this is not provided, defaults to [\u201ccard\u201d].\nValid payment method types include: acss_debit, au_becs_debit, bacs_debit, bancontact, blik, boleto, card, card_present, ideal, link, sepa_debit, sofort, and us_bank_account. usage optional enum Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to off_session.Possible enum valueson_session Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow.off_session Use off_session if your customer may or may not be in your checkout flow.More parametersExpand all attach_to_self optional flow_directions optional enum mandate_data optional dictionary only when confirm=true on_behalf_of optional Connect only payment_method_data optional dictionary payment_method_options optional dictionary return_url optional only when confirm=true single_use optional dictionary ReturnsReturns a SetupIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupIntent.create(\n payment_method_types=[\"card\"],\n)\n'''Response {\n \"id\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa\",\n \"created\": 1562687161,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": null,\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"requires_payment_method\",\n \"usage\": \"off_session\"\n}'''"},{"nl":"Retrieve a SetupIntentRetrieves the details of a SetupIntent that has previously been created. \nClient-side retrieval using a publishable key is allowed when the client_secret is provided in the query string. \nWhen retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.Parameters client_secret Required if using publishable key The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent.ReturnsReturns a SetupIntent if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupIntent.retrieve(\n \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n)\n'''Response {\n \"id\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa\",\n \"created\": 1562687161,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": null,\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"requires_payment_method\",\n \"usage\": \"off_session\"\n}'''"},{"nl":"Update a SetupIntentUpdates a SetupIntent object.Parameters customer optional ID of the Customer this SetupIntent belongs to, if one exists.\nIf present, the SetupIntent\u2019s payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. 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. payment_method optional ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. payment_method_types optional The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to [\u201ccard\u201d].More parametersExpand all attach_to_self optional flow_directions optional enum payment_method_data optional dictionary payment_method_options optional dictionary ReturnsReturns a SetupIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupIntent.modify(\n \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n metadata={\"user_id\": \"3435453\"},\n)\n'''Response {\n \"id\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa\",\n \"created\": 1562687161,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": null,\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {\n \"user_id\": \"3435453\"\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"requires_payment_method\",\n \"usage\": \"off_session\"\n}'''"},{"nl":"Confirm a SetupIntentConfirm that your customer intends to set up the current or\nprovided payment method. For example, you would confirm a SetupIntent\nwhen a customer hits the \u201cSave\u201d button on a payment method management\npage on your website.\nIf the selected payment method does not require any additional\nsteps from the customer, the SetupIntent will transition to the\nsucceeded status.\nOtherwise, it will transition to the requires_action status and\nsuggest additional actions via next_action. If setup fails,\nthe SetupIntent will transition to the\nrequires_payment_method status.Parameters payment_method optional ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.More parametersExpand all mandate_data optional dictionary payment_method_data optional dictionary payment_method_options optional dictionary secret key only return_url optional ReturnsReturns the resulting SetupIntent after all possible transitions are applied","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupIntent.confirm(\n \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n payment_method=\"pm_card_visa\",\n)\n'''Response {\n \"id\": \"seti_1ErTsG2eZvKYlo2CKaT8MITz\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1ErTsG2eZvKYlo2CKaT8MITz_secret_FMCGzsO6znQcfgrMqJM3sHPDoZlhmZr\",\n \"created\": 1562004308,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": \"setatt_1ErTsH2eZvKYlo2CI7ukcoF7\",\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1ErTsG2eZvKYlo2CH0DNen59\",\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"succeeded\",\n \"usage\": \"off_session\"\n}'''"},{"nl":"Cancel a SetupIntentA SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. \nOnce canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.Parameters cancellation_reason optional Reason for canceling this SetupIntent. Possible values are abandoned, requested_by_customer, or duplicateReturnsReturns a SetupIntent object if the cancellation succeeded. Returns an error if the SetupIntent has already been canceled or is not in a cancelable state","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupIntent.cancel(\n \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n)\n'''Response {\n \"id\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa\",\n \"created\": 1562687161,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": null,\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"canceled\",\n \"usage\": \"off_session\"\n}'''"},{"nl":"List all SetupIntentsReturns a list of SetupIntents.Parameters customer optional Only return SetupIntents for the customer specified by this customer ID. payment_method optional Only return SetupIntents associated with the specified payment method.More parametersExpand all attach_to_self optional 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 SetupIntents, starting after SetupIntent starting_after. Each entry in the array is a separate SetupIntent object. If no more SetupIntents are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupIntent.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/setup_intents\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa\",\n \"created\": 1562687161,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": null,\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": null,\n \"payment_method_options\": {\n \"card\": {\n \"mandate_options\": null,\n \"network\": null,\n \"request_three_d_secure\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"requires_payment_method\",\n \"usage\": \"off_session\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Verify microdeposits on a SetupIntentVerifies microdeposits on a SetupIntent object.Parameters client_secret Required if using publishable key The client secret of the SetupIntent. amounts optional Two positive integers, in cents, equal to the values of the microdeposits sent to the bank account. descriptor_code optional A six-character code starting with SM present in the microdeposit sent to the bank account.ReturnsReturns a SetupIntent object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.stripe_object.StripeObject().request('post', '\/v1\/payment_intents\/seti_1EuLW12eZvKYlo2CSSF0PlLO\/verify_microdeposits', {\n \"amounts\": [\n 32,\n 45\n ]\n})\n'''Response {\n \"id\": \"seti_1LSdsc2eZvKYlo2CDhAxS1vK\",\n \"object\": \"setup_intent\",\n \"application\": null,\n \"cancellation_reason\": null,\n \"client_secret\": \"seti_1LSdsc2eZvKYlo2CDhAxS1vK_secret_MAzsqGwzGMvKlQBhna1AEyLSwbb4rUa\",\n \"created\": 1659518922,\n \"customer\": null,\n \"description\": null,\n \"flow_directions\": null,\n \"last_setup_error\": null,\n \"latest_attempt\": \"setatt_1LSdsc2eZvKYlo2C8056v0dv\",\n \"livemode\": false,\n \"mandate\": null,\n \"metadata\": {},\n \"next_action\": null,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1LSdsc2eZvKYlo2Cc7fsJGOf\",\n \"payment_method_options\": {\n \"acss_debit\": {\n \"currency\": \"cad\",\n \"mandate_options\": {\n \"interval_description\": \"First day of every month\",\n \"payment_schedule\": \"interval\",\n \"transaction_type\": \"personal\"\n },\n \"verification_method\": \"automatic\"\n }\n },\n \"payment_method_types\": [\n \"acss_debit\"\n ],\n \"redaction\": null,\n \"single_use_mandate\": null,\n \"status\": \"succeeded\",\n \"usage\": \"off_session\"\n}'''"},{"nl":"SetupAttemptsA SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/setup_attempts\n'''"},{"nl":"The SetupAttempt objectAttributes id string Unique identifier for the object. object string, value is \"setup_attempt\" String representing the object\u2019s type. Objects of the same type share the same value. application string expandable \"application\" The value of application on the SetupIntent at the time of this confirmation. attach_to_self boolean If present, the SetupIntent\u2019s payment method will be attached to the in-context Stripe Account.\nIt can only be used for this Stripe Account\u2019s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. created timestamp retrievable with publishable key Time at which the object was created. Measured in seconds since the Unix epoch. customer string expandable The value of customer on the SetupIntent at the time of this confirmation. flow_directions array Indicates the directions of money movement for which this payment method is intended to be used.\nInclude inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. livemode boolean retrievable with publishable key Has the value true if the object exists in live mode or the value false if the object exists in test mode. on_behalf_of string expandable The value of on_behalf_of on the SetupIntent at the time of this confirmation. payment_method string expandable retrievable with publishable key ID of the payment method used with this SetupAttempt. payment_method_details hash Details about the payment method at the time of SetupIntent confirmation.Show child attributes setup_error hash The error encountered during this attempt to confirm the SetupIntent, if any.Show child attributes setup_intent string expandable ID of the SetupIntent that this attempt belongs to. status string Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned. usage string The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session","code":"'''The SetupAttempt object {\n \"id\": \"setatt_1ErTsH2eZvKYlo2CI7ukcoF7\",\n \"object\": \"setup_attempt\",\n \"application\": null,\n \"created\": 1562004309,\n \"customer\": null,\n \"flow_directions\": null,\n \"livemode\": false,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1ErTsG2eZvKYlo2CH0DNen59\",\n \"payment_method_details\": {\n \"card\": {\n \"three_d_secure\": null\n },\n \"type\": \"card\"\n },\n \"setup_error\": null,\n \"setup_intent\": \"seti_1ErTsG2eZvKYlo2CKaT8MITz\",\n \"status\": \"succeeded\",\n \"usage\": \"off_session\"\n}\n'''"},{"nl":"List all SetupAttemptsReturns a list of SetupAttempts associated with a provided SetupIntent.Parameters setup_intent required Only return SetupAttempts created by the SetupIntent specified by\nthis ID.More parametersExpand all created optional dictionary ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains\nan array of up to limit SetupAttempts which were created by the\nspecified SetupIntent, starting after SetupAttempts starting_after. Each\nentry in the array is a separate SetupAttempts object. If no more\nSetupAttempts are available, the resulting array will be empty. This\nrequest should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SetupAttempt.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/setup_attempts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"setatt_1ErTsH2eZvKYlo2CI7ukcoF7\",\n \"object\": \"setup_attempt\",\n \"application\": null,\n \"created\": 1562004309,\n \"customer\": null,\n \"flow_directions\": null,\n \"livemode\": false,\n \"on_behalf_of\": null,\n \"payment_method\": \"pm_1ErTsG2eZvKYlo2CH0DNen59\",\n \"payment_method_details\": {\n \"card\": {\n \"three_d_secure\": null\n },\n \"type\": \"card\"\n },\n \"setup_error\": null,\n \"setup_intent\": \"seti_1ErTsG2eZvKYlo2CKaT8MITz\",\n \"status\": \"succeeded\",\n \"usage\": \"off_session\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"PayoutsA Payout object is created when you receive funds from Stripe, or when you\ninitiate a payout to either a bank account or debit card of a connected\nStripe account. You can retrieve individual payouts,\nas well as list all payouts. Payouts are made on varying\nschedules, depending on your country and\nindustry.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/payouts\u00a0\u00a0\u00a0GET\u00a0\/v1\/payouts\/:id\u00a0\u00a0POST\u00a0\/v1\/payouts\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/payouts\u00a0\u00a0POST\u00a0\/v1\/payouts\/:id\/cancel\u00a0\u00a0POST\u00a0\/v1\/payouts\/:id\/reverse\n'''"},{"nl":"The payout objectAttributes id string Unique identifier for the object. amount integer Amount (in cents) to be transferred to your bank account or debit card. arrival_date timestamp Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. 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. 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. statement_descriptor string Extra information about a payout to be displayed on the user\u2019s bank statement. status string Current status of the payout: paid, pending, in_transit, canceled or failed. A payout is pending until it is submitted to the bank, when it becomes in_transit. The status then changes to paid if the transaction goes through, or to failed or canceled (within 5 business days). Some failed payouts may initially show as paid but then change to failed.More attributesExpand all object string, value is \"payout\" automatic boolean balance_transaction string expandable created timestamp destination string expandable card or bank account failure_balance_transaction string expandable failure_code string failure_message string livemode boolean method string original_payout string expandable reversed_by string expandable source_type string type enum","code":"'''The payout object {\n \"id\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": true,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"method\": \"standard\",\n \"original_payout\": null,\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"in_transit\",\n \"type\": \"bank_account\"\n}\n'''"},{"nl":"Create a payoutTo send funds to your own bank account, you create a new payout object. Your Stripe balance must be able to cover the payout amount, or you\u2019ll receive an \u201cInsufficient Funds\u201d error.\nIf your API key is in test mode, money won\u2019t actually be sent, though everything else will occur as if in live mode.\nIf you are creating a manual payout on a Stripe account that uses multiple payment source types, you\u2019ll need to specify the source type balance that the payout should draw from. The balance object details available and pending amounts by source type.Parameters amount required A positive integer in cents representing how much to payout. 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. statement_descriptor optional A string to be displayed on the recipient\u2019s bank or card statement. This may be at most 22 characters. Attempting to use a statement_descriptor longer than 22 characters will return an error. Note: Most banks will truncate this information and\/or display it inconsistently. Some may not display it at all.More parametersExpand all destination optional method optional source_type optional ReturnsReturns a payout object if there were no initial errors with the payout creation (invalid routing number, insufficient funds, etc). The status of the payout object will be initially marked as pending","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Payout.create(amount=1100, currency=\"usd\")\n'''Response {\n \"id\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": true,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"method\": \"standard\",\n \"original_payout\": null,\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"in_transit\",\n \"type\": \"bank_account\"\n}'''"},{"nl":"Retrieve a payoutRetrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.ParametersNo parameters.ReturnsReturns a payout object if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Payout.retrieve(\n \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n)\n'''Response {\n \"id\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": true,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"method\": \"standard\",\n \"original_payout\": null,\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"in_transit\",\n \"type\": \"bank_account\"\n}'''"},{"nl":"Update a payoutUpdates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata 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 payout object if the update succeeded. This call raises an error if update parameters are invalid","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Payout.modify(\n \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": true,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"method\": \"standard\",\n \"original_payout\": null,\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"in_transit\",\n \"type\": \"bank_account\"\n}'''"},{"nl":"List all payoutsReturns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.Parameters status optional Only return payouts that have the given status: pending, paid, failed, or canceled.More parametersExpand all arrival_date optional dictionary created optional dictionary destination optional ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit payouts, starting after payout starting_after. Each entry in the array is a separate payout object. If no more payouts are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Payout.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/payouts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": true,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"method\": \"standard\",\n \"original_payout\": null,\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"in_transit\",\n \"type\": \"bank_account\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Cancel a payoutA previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.ParametersNo parameters.ReturnsReturns the payout object if the cancellation succeeded. Returns an error if the payout has already been canceled or cannot be canceled","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Payout.cancel(\n \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n)\n'''Response {\n \"id\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": false,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"method\": \"standard\",\n \"original_payout\": null,\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"canceled\",\n \"type\": \"bank_account\"\n}'''"},{"nl":"Reverse a payoutReverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, \/v1\/payouts\/:id\/cancel should be used instead.\nBy requesting a reversal via \/v1\/payouts\/:id\/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.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 reversing payout object if the reversal was successful. Returns an error if the payout has already been reversed or cannot be reversed","code":"POST\u00a0\/v1\/payouts\/:id\/reversePythoncURLStripe CLIRubyPythonPHPJavaNode.jsGo.NET12curl -X POST https:\/\/api.stripe.com\/v1\/payouts\/po_1LSdsc2eZvKYlo2Cxk99gPFS\/reverse \\\n -u sk_test_your_key:This method is currently unsupported in the Python client. If you'd like to see it included in the library, let us know about your use case.\n'''Response {\n \"id\": \"po_1HC83hJstFhLAqIHdyKEHGf6\",\n \"object\": \"payout\",\n \"amount\": 1100,\n \"arrival_date\": 1659484800,\n \"automatic\": false,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518922,\n \"currency\": \"usd\",\n \"description\": \"STRIPE PAYOUT\",\n \"destination\": \"ba_1LSdsc2eZvKYlo2CddH6YN3m\",\n \"failure_balance_transaction\": null,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"method\": \"standard\",\n \"original_payout\": \"po_1LSdsc2eZvKYlo2Cxk99gPFS\",\n \"reversed_by\": null,\n \"source_type\": \"card\",\n \"statement_descriptor\": null,\n \"status\": \"paid\",\n \"type\": \"bank_account\"\n}'''"},{"nl":"RefundsRefund objects allow you to refund a charge that has previously been created\nbut not yet refunded. Funds will be refunded to the credit or debit card that\nwas originally charged.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/refunds\u00a0\u00a0\u00a0GET\u00a0\/v1\/refunds\/:id\u00a0\u00a0POST\u00a0\/v1\/refunds\/:id\u00a0\u00a0POST\u00a0\/v1\/refunds\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/refunds\n'''"},{"nl":"The refund objectAttributes id string Unique identifier for the object. amount integer Amount, in cents. charge string expandable ID of the charge that was refunded. 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. (Available on non-card refunds only) 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. payment_intent string expandable ID of the PaymentIntent that was refunded. reason enum Reason for the refund, either user-provided (duplicate, fraudulent, or requested_by_customer) or generated by Stripe internally (expired_uncaptured_charge).Possible enum valuesduplicate fraudulent requested_by_customer expired_uncaptured_charge status string Status of the refund. For credit card refunds, this can be pending, succeeded, or failed. For other types of refunds, it can be pending, requires_action, succeeded, failed, or canceled. Refer to our refunds documentation for more details.More attributesExpand all object string, value is \"refund\" balance_transaction string expandable created timestamp failure_balance_transaction string expandable failure_reason string instructions_email string next_action hash receipt_number string source_transfer_reversal string expandable Connect only transfer_reversal string expandable Connect only","code":"'''The refund object {\n \"id\": \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n \"object\": \"refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"charge\": \"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n \"created\": 1659516119,\n \"currency\": \"usd\",\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\": null,\n \"status\": \"succeeded\",\n \"transfer_reversal\": null\n}\n'''"},{"nl":"Create a refundWhen you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.\nCreating a new refund will refund a charge that has previously been created but not yet refunded.\nFunds will be refunded to the credit or debit card that was originally charged.\nYou can optionally refund only part of a charge.\nYou can do so multiple times, until the entire charge has been refunded.\nOnce entirely refunded, a charge can\u2019t be refunded again.\nThis method will raise an error when called on an already-refunded charge,\nor when trying to refund more money than is left on a charge.Parameters charge optional The identifier of the charge to refund. amount optional, default is entire charge A positive integer in cents representing how much of this charge to refund. Can refund only up to the remaining, unrefunded amount of the charge. metadata optional dictionary, default is { } A set of key-value pairs that you can attach to a Refund object. This can be useful for storing additional information about the refund in a structured format. You can unset individual keys if you POST an empty value for that key. You can clear all keys if you POST an empty value for metadata payment_intent optional ID of the PaymentIntent to refund. reason optional, default is null String indicating the reason for the refund. If set, possible values are duplicate, fraudulent, and requested_by_customer. If you believe the charge to be fraudulent, specifying fraudulent as the reason will add the associated card and email to your block lists, and will also help us improve our fraud detection algorithms. refund_application_fee optional, default is false Connect only Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded.An application fee can be refunded only by the application that created the charge. reverse_transfer optional, default is false Connect only Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).A transfer can be reversed only by the application that created the charge.ReturnsReturns the Refund object if the refund succeeded. Raises an error if the Charge\/PaymentIntent has already been refunded, or if an invalid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Refund.create(\n charge=\"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n)\n'''Response {\n \"id\": \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n \"object\": \"refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"charge\": \"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n \"created\": 1659516119,\n \"currency\": \"usd\",\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\": null,\n \"status\": \"succeeded\",\n \"transfer_reversal\": null\n}'''"},{"nl":"Retrieve a refundRetrieves the details of an existing refund.ParametersNo parameters.ReturnsReturns a refund if a valid ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Refund.retrieve(\n \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n)\n'''Response {\n \"id\": \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n \"object\": \"refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"charge\": \"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n \"created\": 1659516119,\n \"currency\": \"usd\",\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\": null,\n \"status\": \"succeeded\",\n \"transfer_reversal\": null\n}'''"},{"nl":"Update a refundUpdates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.\nThis 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 refund object if the update succeeded. This call will raise an error if update parameters are invalid","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Refund.modify(\n \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n \"object\": \"refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"charge\": \"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n \"created\": 1659516119,\n \"currency\": \"usd\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"payment_intent\": null,\n \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\": null,\n \"status\": \"succeeded\",\n \"transfer_reversal\": null\n}'''"},{"nl":"Cancel a refundCancels a refund with a status of requires_action.\nRefunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.ParametersNo parameters.ReturnsReturns the refund object if the cancelation succeeded. This call will raise an error if the refund is unable to be canceled","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Refund.cancel(\n \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n)\n'''Response {\n \"id\": \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n \"object\": \"refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"charge\": \"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n \"created\": 1659516119,\n \"currency\": \"usd\",\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\": null,\n \"status\": \"succeeded\",\n \"transfer_reversal\": null\n}'''"},{"nl":"List all refundsReturns a list of all refunds you\u2019ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.Parameters charge optional Only return refunds for the charge specified by this charge ID. payment_intent optional Only return refunds for the PaymentIntent specified by this 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 refunds, starting after refund starting_after. Each entry in the array is a separate refund object. If no more refunds are available, the resulting array will be empty. If you provide a non-existent charge ID, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Refund.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/refunds\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"re_3LSd9N2eZvKYlo2C1xXmZeJl\",\n \"object\": \"refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"charge\": \"ch_3LSd9N2eZvKYlo2C1na6w0E5\",\n \"created\": 1659516119,\n \"currency\": \"usd\",\n \"metadata\": {},\n \"payment_intent\": null,\n \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\": null,\n \"status\": \"succeeded\",\n \"transfer_reversal\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"TokensTokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. You should use our\nrecommended payments integrations to perform this process\nclient-side. This ensures that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.If you cannot use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. Keep in mind that if\nyour integration uses this method, you are responsible for any PCI compliance\nthat may be required, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information is not sent directly to\nStripe, so we cannot determine how it is handled or stored.Tokens cannot be stored or used more than once. To store card or bank account\ninformation for later use, you can create Customer\nobjects or Custom accounts. Note that\nRadar, our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/tokens\u00a0\u00a0POST\u00a0\/v1\/tokens\u00a0\u00a0POST\u00a0\/v1\/tokens\u00a0\u00a0POST\u00a0\/v1\/tokens\u00a0\u00a0POST\u00a0\/v1\/tokens\u00a0\u00a0POST\u00a0\/v1\/tokens\u00a0\u00a0\u00a0GET\u00a0\/v1\/tokens\/:id\n'''"},{"nl":"The token objectAttributes id string Unique identifier for the object.More attributesExpand all object string, value is \"token\" bank_account hash card hash client_ip string created timestamp livemode boolean type string used boolean","code":"'''The token object {\n \"id\": \"tok_1LSdru2eZvKYlo2C20SinvF6\",\n \"object\": \"token\",\n \"card\": {\n \"id\": \"card_1LSdru2eZvKYlo2CdGVYqYZs\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n },\n \"client_ip\": null,\n \"created\": 1659518878,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"card\",\n \"used\": false\n}\n'''"},{"nl":"Create a card tokenCreates a single-use token that represents a credit card\u2019s details.\nThis token can be used in place of a credit card dictionary with any API method.\nThese tokens can be used only once:\nby creating a new Charge object,\nor by attaching them to a Customer object.\nIn most cases, you should use our recommended\npayments integrations instead of using the API.Parameters card optional dictionary The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.Show child parametersMore parametersExpand all customer optional Connect only ReturnsReturns the created card token if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.create(\n card={\n \"number\": \"4242424242424242\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"cvc\": \"314\",\n },\n)\n'''Response {\n \"id\": \"tok_1LSdru2eZvKYlo2C20SinvF6\",\n \"object\": \"token\",\n \"card\": {\n \"id\": \"card_1LSdru2eZvKYlo2CdGVYqYZs\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n },\n \"client_ip\": null,\n \"created\": 1659518878,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"card\",\n \"used\": false\n}'''"},{"nl":"Create a bank account tokenCreates a single-use token that represents a bank account\u2019s details.\nThis token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.Parameters bank_account optional The bank account this token will represent.Show child parametersMore parametersExpand all customer optional Connect only ReturnsReturns the created bank account token if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.create(\n bank_account={\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"account_holder_name\": \"Jenny Rosen\",\n \"account_holder_type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"account_number\": \"000123456789\",\n },\n)\n'''Response {\n \"id\": \"btok_1LSdru2eZvKYlo2CxKotkHqd\",\n \"object\": \"token\",\n \"bank_account\": {\n \"id\": \"ba_1LSdru2eZvKYlo2C1eZb0Ys3\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"individual\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtz\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n },\n \"client_ip\": null,\n \"created\": 1659518878,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"bank_account\",\n \"used\": false\n}'''"},{"nl":"Create a PII tokenCreates a single-use token that represents the details of personally identifiable information (PII).\nThis token can be used in place of an id_number or id_number_secondary in Account or Person Update API methods.\nA PII token can be used only once.Parameters pii required The PII this token will represent.Show child parametersReturnsReturns the created PII token if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.create(\n pii={\"id_number\": \"000000000\"},\n)\n'''Response {\n \"id\": \"pii_19yVPm2eZvKYlo2Ch3ixYQCk\",\n \"object\": \"token\",\n \"client_ip\": \"104.198.56.199\",\n \"created\": 1489796846,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"pii\",\n \"used\": false\n}'''"},{"nl":"Create an account tokenCreates a single-use token that wraps a user\u2019s legal entity information.\nUse this when creating or updating a Connect account.\nSee the account tokens documentation to learn more.\nIn live mode, account tokens can only be created with your application\u2019s publishable key.\nIn test mode, account tokens can be created with your secret key or publishable key.Parameters account required Information for the account this token will represent.Show child parametersReturnsReturns the created account token if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.create(\n account={\n \"individual\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n },\n \"tos_shown_and_accepted\": True,\n },\n)\n'''Response {\n \"id\": \"ct_1BZ6j62eZvKYlo2CKbM4U8aw\",\n \"object\": \"token\",\n \"client_ip\": \"8.21.168.104\",\n \"created\": 1513296416,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"account\",\n \"used\": false\n}'''"},{"nl":"Create a person tokenCreates a single-use token that represents the details for a person.\nUse this when creating or updating persons associated with a Connect account.\nSee the documentation to learn more.\nPerson tokens may be created only in live mode, with your application\u2019s publishable key.\nYour application\u2019s secret key may be used to create person tokens only in test mode.Parameters person required Information for the person this token will represent.Show child parametersReturnsReturns the created person token if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.create(\n person={\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"relationship\": {\"owner\": True},\n },\n)\n'''Response {\n \"id\": \"cpt_1EDww82eZvKYlo2CsdelTHFu\",\n \"object\": \"token\",\n \"client_ip\": \"8.21.168.117\",\n \"created\": 1552582904,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"person\",\n \"used\": false\n}'''"},{"nl":"Create a CVC update tokenCreates a single-use token that represents an updated CVC value to be used for CVC re-collection.\nThis token can be used when confirming a card payment\nusing a saved card on a PaymentIntent with confirmation_method: manual.\nFor most cases, use our JavaScript library\ninstead of using the API. For a PaymentIntent with confirmation_method: automatic, use our recommended\npayments integration without tokenizing the CVC value.Parameters cvc_update required The updated CVC value this token will represent.Show child parametersReturnsReturns the created CVC update token if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.create(cvc_update={\"cvc\": \"123\"})\n'''Response {\n \"id\": \"cvctok_1LSdru2eZvKYlo2CXdZXzhJB\",\n \"object\": \"token\",\n \"client_ip\": null,\n \"created\": 1659518878,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"cvc_update\",\n \"used\": false\n}'''"},{"nl":"Retrieve a tokenRetrieves the token with the given ID.ParametersNo parameters.ReturnsReturns a token if a valid ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Token.retrieve(\n \"tok_1LSdru2eZvKYlo2C20SinvF6\",\n)\n'''Response {\n \"id\": \"tok_1LSdru2eZvKYlo2C20SinvF6\",\n \"object\": \"token\",\n \"card\": {\n \"id\": \"card_1LSdru2eZvKYlo2CdGVYqYZs\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n },\n \"client_ip\": null,\n \"created\": 1659518878,\n \"livemode\": false,\n \"redaction\": null,\n \"type\": \"card\",\n \"used\": false\n}'''"},{"nl":"PaymentMethodsPaymentMethod objects represent your customer's payment instruments.\nYou can use them with PaymentIntents to collect payments or save them to\nCustomer objects to store instrument details for future payments.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/payment_methods\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_methods\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:customer\/payment_methods\/:payment_method\u00a0\u00a0POST\u00a0\/v1\/payment_methods\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_methods\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:customer\/payment_methods\u00a0\u00a0POST\u00a0\/v1\/payment_methods\/:id\/attach\u00a0\u00a0POST\u00a0\/v1\/payment_methods\/:id\/detach\n'''"},{"nl":"The PaymentMethod objectAttributes id string Unique identifier for the object. billing_details hash Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.Show child attributes customer string expandable The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. 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. type enum The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.Possible enum valuesacss_debit Pre-authorized debit payments are used to debit Canadian bank accounts through the Automated Clearing Settlement System (ACSS).affirm Affirm is a buy now, pay later payment method in the US.afterpay_clearpay Afterpay \/ Clearpay is a buy now, pay later payment method used in Australia, Canada, France, New Zealand, Spain, the UK, and the US.alipay Alipay is a digital wallet payment method used in China.au_becs_debit BECS Direct Debit is used to debit Australian bank accounts through the Bulk Electronic Clearing System (BECS).bacs_debit Bacs Direct Debit is used to debit UK bank accounts.bancontact Bancontact is a bank redirect payment method used in Belgium.Show 22 moreMore attributesExpand all object string, value is \"payment_method\" acss_debit hash affirm hash afterpay_clearpay hash alipay hash au_becs_debit hash bacs_debit hash bancontact hash blik hash boleto hash card hash card_present hash created timestamp customer_balance hash preview feature eps hash fpx hash giropay hash grabpay hash ideal hash interac_present hash preview feature klarna hash konbini hash link hash livemode boolean oxxo hash p24 hash paynow hash promptpay hash radar_options hash sepa_debit hash sofort hash us_bank_account hash wechat_pay hash","code":"'''The PaymentMethod object {\n \"id\": \"pm_1LSdci2eZvKYlo2CH68OnHFJ\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": \"BE\",\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": \"jenny@example.com\",\n \"name\": null,\n \"phone\": \"+15555555555\"\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"pass\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 123456789,\n \"customer\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"123456789\"\n },\n \"redaction\": null,\n \"type\": \"card\"\n}\n'''"},{"nl":"Create a PaymentMethodCreates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.\nInstead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.Parameters type required The type of the PaymentMethod.\nAn additional hash is included on the PaymentMethod with a name matching this value.\nIt contains additional information specific to the PaymentMethod type.\nRequired unless payment_method is specified (see the Cloning PaymentMethods guide).Possible enum valuesacss_debit Pre-authorized debit payments are used to debit Canadian bank accounts through the Automated Clearing Settlement System (ACSS).affirm Affirm is a buy now, pay later payment method in the US.afterpay_clearpay Afterpay \/ Clearpay is a buy now, pay later payment method used in Australia, Canada, France, New Zealand, Spain, the UK, and the US.alipay Alipay is a digital wallet payment method used in China.au_becs_debit BECS Direct Debit is used to debit Australian bank accounts through the Bulk Electronic Clearing System (BECS).bacs_debit Bacs Direct Debit is used to debit UK bank accounts.bancontact Bancontact is a bank redirect payment method used in Belgium.Show 20 more billing_details optional dictionary Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.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 acss_debit optional dictionary affirm optional dictionary afterpay_clearpay optional dictionary alipay optional dictionary au_becs_debit optional dictionary bacs_debit optional dictionary bancontact optional dictionary blik optional dictionary boleto optional dictionary card optional dictionary customer_balance optional dictionary preview feature eps optional dictionary fpx optional dictionary giropay optional dictionary grabpay optional dictionary ideal optional dictionary interac_present optional dictionary preview feature klarna optional dictionary konbini optional dictionary link optional dictionary oxxo optional dictionary p24 optional dictionary paynow optional dictionary promptpay optional dictionary radar_options optional dictionary sepa_debit optional dictionary sofort optional dictionary us_bank_account optional dictionary wechat_pay optional dictionary ReturnsReturns a PaymentMethod object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentMethod.create(\n type=\"card\",\n card={\n \"number\": \"4242424242424242\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"cvc\": \"314\",\n },\n)\n'''Response {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n}'''"},{"nl":"Retrieve a PaymentMethodRetrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer\u2019s PaymentMethodsParametersNo parameters.ReturnsReturns a PaymentMethod object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentMethod.retrieve(\n \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n)\n'''Response {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n}'''"},{"nl":"Retrieve a Customer's PaymentMethodRetrieves a PaymentMethod object for a given Customer.ParametersNo parameters.ReturnsReturns a PaymentMethod object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_payment_methods(\n \"cus_8TEMHVY5moxIPI\",\n type=\"card\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/payment_methods\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Update a PaymentMethodUpdates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.Parameters billing_details optional dictionary Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.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 card optional dictionary link optional dictionary us_bank_account optional dictionary ReturnsReturns a PaymentMethod object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentMethod.modify(\n \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"redaction\": null,\n \"type\": \"card\"\n}'''"},{"nl":"List PaymentMethodsReturns a list of PaymentMethods attached to the StripeAccount. For listing a customer\u2019s payment methods, you should use List a Customer\u2019s PaymentMethodsParameters type required A required filter on the list, based on the object type field.Possible enum valuesacss_debit affirm afterpay_clearpay alipay au_becs_debit bacs_debit bancontact Show 20 moreMore parametersExpand all customer optional ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit PaymentMethods of type type, starting after PaymentMethods starting_after. Each entry in the array is a separate PaymentMethod object. If no more PaymentMethods are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentMethod.list(\n customer=\"cus_8TEMHVY5moxIPI\",\n type=\"card\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/payment_methods\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"List a Customer's PaymentMethodsReturns a list of PaymentMethods for a given CustomerParameters type required A required filter on the list, based on the object type field.Possible enum valuesacss_debit affirm afterpay_clearpay alipay au_becs_debit bacs_debit bancontact Show 20 moreMore parametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit PaymentMethods of type type, starting after PaymentMethods starting_after. Each entry in the array is a separate PaymentMethod object. If no more PaymentMethods are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_payment_methods(\n \"cus_8TEMHVY5moxIPI\",\n type=\"card\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/payment_methods\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Attach a PaymentMethod to a CustomerAttaches a PaymentMethod object to a Customer.\nTo attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent\nor a PaymentIntent with setup_future_usage.\nThese approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the \/v1\/payment_methods\/:id\/attach\nendpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for\nfuture use, which makes later declines and payment friction more likely.\nSee Optimizing cards for future payments for more information about setting up\nfuture payments.\nTo use this PaymentMethod as the default for invoice or subscription payments,\nset invoice_settings.default_payment_method,\non the Customer to the PaymentMethod\u2019s ID.Parameters customer required The ID of the customer to which to attach the PaymentMethod.ReturnsReturns a PaymentMethod object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentMethod.attach(\n \"pm_1LSdci2eZvKYlo2CH68OnHFJ\",\n customer=\"cus_8TEMHVY5moxIPI\",\n)\n'''Response {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n}'''"},{"nl":"Detach a PaymentMethod from a CustomerDetaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.ParametersNo parameters.ReturnsReturns a PaymentMethod object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentMethod.detach(\n \"pm_1LSdci2eZvKYlo2CH68OnHFJ\",\n)\n'''Response {\n \"id\": \"pm_1LSYy32eZvKYlo2CoClVP3wb\",\n \"object\": \"payment_method\",\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n },\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\": null,\n \"cvc_check\": \"unchecked\"\n },\n \"country\": \"US\",\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"generated_from\": null,\n \"last4\": \"4242\",\n \"networks\": {\n \"available\": [\n \"visa\"\n ],\n \"preferred\": null\n },\n \"three_d_secure_usage\": {\n \"supported\": true\n },\n \"wallet\": null\n },\n \"created\": 1659500040,\n \"customer\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"type\": \"card\"\n}'''"},{"nl":"Bank AccountsThese bank accounts are payment methods on Customer objects.On the other hand External Accounts are transfer\ndestinations on Account objects for Custom accounts.\nThey can be bank accounts or debit cards as well, and are documented in the links above.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/sources\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/sources\/:id\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/sources\/:id\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/sources\/:id\/verifyDELETE\u00a0\/v1\/customers\/:id\/sources\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/sources?object=bank_account\n'''"},{"nl":"The bank account objectAttributes id string Unique identifier for the object. account_holder_name string The name of the person or business that owns the bank account. account_holder_type string The type of entity that holds the account. This can be either individual or company. 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. customer string expandable The ID of the customer that the bank account is associated with. fingerprint string Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. 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.More attributesExpand all object string, value is \"bank_account\" account string expandable account_type string available_payout_methods array status string","code":"'''The bank account object {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": null,\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n}\n'''"},{"nl":"Create a bank accountWhen you create a new bank account, you must specify a Customer object on which to create it.Parameters source required Either a token, like the ones returned by Stripe.js, or a dictionary containing a user\u2019s 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.ReturnsReturns the bank account object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.create_source(\n \"cus_8TEMHVY5moxIPI\",\n source=\"btok_1LSdvL2eZvKYlo2CdRk2u2Dc\",\n)\n'''Response {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n}'''"},{"nl":"Retrieve a bank accountBy default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.ParametersNo parameters.ReturnsReturns the bank account object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve_source(\n \"cus_8TEMHVY5moxIPI\",\n \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n)\n'''Response {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n}'''"},{"nl":"Update a bank accountUpdates the account_holder_name, account_holder_type, and metadata of a bank account belonging to a customer. Other bank account details are not editable, by design.Parameters account_holder_name optional The name of the person or business that owns the bank account. account_holder_type optional The type of entity that holds the account. This can be either individual or company. 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 bank account object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.modify_source(\n \"cus_8TEMHVY5moxIPI\",\n \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n}'''"},{"nl":"Verify a bank accountA customer's bank account must first be verified before it can be charged. Stripe supports instant verification using Plaid for many of the most popular banks. If your customer's bank is not supported or you do not wish to integrate with Plaid, you must manually verify the customer's bank account using the API.Parameters amounts optional Two positive integers, in cents, equal to the values of the microdeposits sent to the bank account.ReturnsReturns the bank account object with a status of verified","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nbank_account = stripe.Customer.retrieve_source(\n 'cus_8TEMHVY5moxIPI',\n 'ba_1LSdvK2eZvKYlo2C8WPIzm4k'\n)\nbank_account.verify(amounts = [32,45])\n'''Response {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\",\n \"name\": \"Jenny Rosen\"\n}'''"},{"nl":"Delete a bank accountYou can delete bank accounts from a Customer.ParametersNo parameters.ReturnsReturns the deleted bank account object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.delete_source(\n \"cus_8TEMHVY5moxIPI\",\n \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n)\n'''Response {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"deleted\": true\n}'''"},{"nl":"List all bank accountsYou can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. 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 customer","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_sources(\n \"cus_8TEMHVY5moxIPI\",\n object=\"bank_account\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/sources\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ba_1LSdvK2eZvKYlo2C8WPIzm4k\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Cash balanceA customer's Cash balance represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/cash_balance\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/cash_balance\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/cash_balance_transactions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/cash_balance_transactions\n'''"},{"nl":"The cash balance objectAttributes object string, value is \"cash_balance\" String representing the object\u2019s type. Objects of the same type share the same value. available hash A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the smallest currency unit. customer string The ID of the customer whose cash balance this object represents. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. settings hash A hash of settings for this cash balance.Show child attribute","code":"'''The cash balance object {\n \"object\": \"cash_balance\",\n \"available\": {\n \"eur\": 10000\n },\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"settings\": {\n \"reconciliation_mode\": \"automatic\"\n }\n}\n'''"},{"nl":"Retrieve a cash balancePreview featureRetrieves a customer\u2019s cash balance.ParametersNo parameters.ReturnsThe Cash Balance object for a given customer","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve_cash_balance(\n \"cus_8TEMHVY5moxIPI\",\n)\n'''Response {\n \"object\": \"cash_balance\",\n \"available\": {\n \"eur\": 10000\n },\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"settings\": {\n \"reconciliation_mode\": \"automatic\"\n }\n}'''"},{"nl":"Update a cash balance's settingsPreview featureChanges the settings on a customer\u2019s cash balance.Parameters settings optional dictionary A hash of settings for this cash balance.Show child parametersReturnsThe customer\u2019s cash balance, with the updated settings","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.modify_cash_balance(\n \"cus_8TEMHVY5moxIPI\",\n settings={\"reconciliation_mode\": \"manual\"},\n)\n'''Response {\n \"object\": \"cash_balance\",\n \"available\": {\n \"eur\": 10000\n },\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"settings\": {\n \"reconciliation_mode\": \"manual\"\n }\n}'''"},{"nl":"The cash balance transaction objectAttributes id string Unique identifier for the object. object string, value is \"customer_cash_balance_transaction\" String representing the object\u2019s type. Objects of the same type share the same value. applied_to_payment hash If this is a type=applied_to_payment transaction, contains information about how funds were applied.Show child attributes created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. currency string Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable The customer whose available cash balance changed as a result of this transaction. ending_balance integer The total available cash balance for the specified currency after this transaction was applied. Represented in the smallest currency unit. funded hash If this is a type=funded transaction, contains information about the funding.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. net_amount integer The amount by which the cash balance changed, represented in the smallest currency unit. A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. refunded_from_payment hash If this is a type=refunded_from_payment transaction, contains information about the source of the refund.Show child attributes type string The type of the cash balance transaction. One of applied_to_payment, unapplied_from_payment, refunded_from_payment, funded, return_initiated, or return_canceled. New types may be added in future. See Customer Balance to learn more about these types. unapplied_from_payment hash If this is a type=unapplied_from_payment transaction, contains information about how funds were unapplied.Show child attribute","code":"'''The cash balance transaction object {\n \"id\": \"ccsbtxn_1LSdvL2eZvKYlo2CmIIb3s9A\",\n \"object\": \"customer_cash_balance_transaction\",\n \"created\": 1659519091,\n \"currency\": \"eur\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"ending_balance\": 10000,\n \"funded\": {\n \"bank_transfer\": {\n \"eu_bank_transfer\": {\n \"bic\": \"BANKDEAAXXX\",\n \"iban_last4\": \"7089\",\n \"sender_name\": \"Sample Business GmbH\"\n },\n \"reference\": \"Payment for Invoice F899D8E-155\",\n \"type\": \"eu_bank_transfer\"\n }\n },\n \"livemode\": false,\n \"net_amount\": 5000,\n \"type\": \"funded\"\n}\n'''"},{"nl":"Retrieve a cash balance transactionPreview featureRetrieves a specific cash balance transaction, which updated the customer\u2019s cash balance.ParametersNo parameters.ReturnsReturns a cash balance transaction object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve_cash_balance_transaction(\n \"cus_8TEMHVY5moxIPI\",\n \"ccsbtxn_1LSdvL2eZvKYlo2CmIIb3s9A\",\n)\n'''Response {\n \"id\": \"ccsbtxn_1LSdvL2eZvKYlo2CmIIb3s9A\",\n \"object\": \"customer_cash_balance_transaction\",\n \"created\": 1659519091,\n \"currency\": \"eur\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"ending_balance\": 10000,\n \"funded\": {\n \"bank_transfer\": {\n \"eu_bank_transfer\": {\n \"bic\": \"BANKDEAAXXX\",\n \"iban_last4\": \"7089\",\n \"sender_name\": \"Sample Business GmbH\"\n },\n \"reference\": \"Payment for Invoice F899D8E-155\",\n \"type\": \"eu_bank_transfer\"\n }\n },\n \"livemode\": false,\n \"net_amount\": 5000,\n \"type\": \"funded\"\n}'''"},{"nl":"List cash balance transactionsPreview featureReturns a list of transactions that modified the customer\u2019s cash balance.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit cash balance transactions, starting after item starting_after. Each entry in the array is a separate cash balance transaction object. If no more items are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_cash_balance_transactions(\n \"cus_8TEMHVY5moxIPI\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/customer_cash_balance_transactions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ccsbtxn_1LSdvL2eZvKYlo2CmIIb3s9A\",\n \"object\": \"customer_cash_balance_transaction\",\n \"created\": 1659519091,\n \"currency\": \"eur\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"ending_balance\": 10000,\n \"funded\": {\n \"bank_transfer\": {\n \"eu_bank_transfer\": {\n \"bic\": \"BANKDEAAXXX\",\n \"iban_last4\": \"7089\",\n \"sender_name\": \"Sample Business GmbH\"\n },\n \"reference\": \"Payment for Invoice F899D8E-155\",\n \"type\": \"eu_bank_transfer\"\n }\n },\n \"livemode\": false,\n \"net_amount\": 5000,\n \"type\": \"funded\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"CardsYou can store multiple cards on a customer in order to charge the customer\nlater. You can also store multiple debit cards on a recipient in order to\ntransfer to those cards later.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/sources\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/sources\/:id\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/sources\/:idDELETE\u00a0\/v1\/customers\/:id\/sources\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/sources?object=card\n'''"},{"nl":"The card objectAttributes id string Unique identifier for the object. 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\u2019ve collected. customer string expandable The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. 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\u2019t 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. exp_month integer Two-digit number representing the card\u2019s expiration month. exp_year integer Four-digit number representing the card\u2019s expiration year. fingerprint string Uniquely identifies this particular card number. You can use this attribute to check whether two customers who\u2019ve 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.\nStarting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card \u2014 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.More attributesExpand all object string, value is \"card\" account string expandable custom Connect only address_line1_check string available_payout_methods array currency currency custom Connect only dynamic_last4 string recipient string expandable tokenization_method string","code":"'''The card object {\n \"id\": \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": null,\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n}\n'''"},{"nl":"Create a cardWhen you create a new credit card, you must specify a customer or recipient on which to create it.\nIf the card\u2019s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source.Parameters source 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.ReturnsReturns the Card object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.create_source(\n \"cus_8TEMHVY5moxIPI\",\n source=\"tok_amex\",\n)\n'''Response {\n \"id\": \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n}'''"},{"nl":"Retrieve a cardYou can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.ParametersNo parameters.ReturnsReturns the Card object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve_source(\n \"cus_8TEMHVY5moxIPI\",\n \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n)\n'''Response {\n \"id\": \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n}'''"},{"nl":"Update a card If 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. Also, Stripe works directly with card networks so that your customers can continue using your service without interruption.\n\n\nWhen you update a card, Stripe typically validates the card automatically. For more details, see Check if a card is valid without a charge.\nParameters address_city optional City\/District\/Suburb\/Town\/Village. address_country optional Billing address country, if provided when creating card. address_line1 optional Address line 1 (Street address\/PO Box\/Company name). address_line2 optional Address line 2 (Apartment\/Suite\/Unit\/Building). address_state optional State\/County\/Province\/Region. address_zip optional ZIP or postal code. exp_month optional Two digit number representing the card\u2019s expiration month. exp_year optional Four digit number representing the card\u2019s expiration year. 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. name optional Cardholder name.ReturnsReturns the Card object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.modify_source(\n \"cus_8TEMHVY5moxIPI\",\n \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n name=\"Jenny Rosen\",\n)\n'''Response {\n \"id\": \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"redaction\": null,\n \"tokenization_method\": null\n}'''"},{"nl":"Delete a card You can delete cards from a customer.\n\n\n If you delete a card that is currently the default source, then the most\n recently added source will become the new default. If you delete a card that is the last\n remaining source on the customer, then the default_source attribute will become null.\n\n\n For recipients: if you delete the default card, then the most recently added card will become the new default. If you delete the last remaining card on a recipient, then the\n default_card attribute will become null.\n\n\n Note that for cards belonging to customers, you might want to prevent customers on paid subscriptions from deleting all cards on file, so that there is at least one default card for the next invoice payment attempt.\nParametersNo parameters.ReturnsReturns the deleted Card object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.delete_source(\n \"cus_8TEMHVY5moxIPI\",\n \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n)\n'''Response {\n \"id\": \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n \"object\": \"card\",\n \"deleted\": true\n}'''"},{"nl":"List all cardsYou can see a list of the cards belonging to a customer.\nNote that the 10 most recent sources are always available on the Customer object.\nIf you need more than those 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 customer","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_sources(\n \"cus_8TEMHVY5moxIPI\",\n object=\"card\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/sources\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"card_1LSdvI2eZvKYlo2CS9wK7l0M\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"SourcesSource objects allow you to accept a variety of payment methods. They\nrepresent a customer's payment instrument, and can be used with the Stripe API\njust like a Card object: once chargeable, they can be charged, or can be\nattached to customers.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/sources\u00a0\u00a0\u00a0GET\u00a0\/v1\/sources\/:id\u00a0\u00a0POST\u00a0\/v1\/sources\/:id\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/sourcesDELETE\u00a0\/v1\/customers\/:id\/sources\/:id\n'''"},{"nl":"The source objectAttributes id string Unique identifier for the object. amount integer A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for \u00a51, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources. currency currency Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources. customer string The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. 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. owner hash Information about the owner of the payment instrument that may be used or required by particular source types.Show child attributes redirect hash Information related to the redirect flow. Present if the source is authenticated by a redirect (flow is redirect).Show child attributes statement_descriptor string Extra information about a source. This will appear on your customer\u2019s statement every time you charge the source. status string The status of the source, one of canceled, chargeable, consumed, failed, or pending. Only chargeable sources can be used to create a charge. type string The type of the source. The type is a payment method, one of ach_credit_transfer, ach_debit, alipay, bancontact, card, card_present, eps, giropay, ideal, multibanco, klarna, p24, sepa_debit, sofort, three_d_secure, or wechat. An additional hash is included on the source with a name matching this value. It contains additional information specific to the payment method used.More attributesExpand all object string, value is \"source\" client_secret string code_verification hash created timestamp flow string livemode boolean receiver hash source_order hash usage string","code":"'''The source object {\n \"id\": \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n \"object\": \"source\",\n \"ach_credit_transfer\": {\n \"account_number\": \"test_52796e3294dc\",\n \"routing_number\": \"110000000\",\n \"fingerprint\": \"ecpwEzmBOSMOqQTL\",\n \"bank_name\": \"TEST BANK\",\n \"swift_code\": \"TSTEZ122\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_6jh1NqD1xGAI0sVLZcI5kKWy\",\n \"created\": 1659518943,\n \"currency\": \"usd\",\n \"flow\": \"receiver\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"receiver\": {\n \"address\": \"121042882-38381234567890123\",\n \"amount_charged\": 0,\n \"amount_received\": 0,\n \"amount_returned\": 0,\n \"refund_attributes_method\": \"email\",\n \"refund_attributes_status\": \"missing\"\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_credit_transfer\",\n \"usage\": \"reusable\"\n}\n'''"},{"nl":"Create a sourceCreates a new source object.Parameters type required The type of the source to create. Required unless customer and original_source are specified (see the Cloning card Sources guide) amount optional Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources. Not supported for receiver type sources, where charge amount may not be specified until funds land. currency optional Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. 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. owner optional dictionary Information about the owner of the payment instrument that may be used or required by particular source types.Show child parameters redirect optional dictionary Parameters required for the redirect flow. Required if the source is authenticated by a redirect (flow is redirect).Show child parameters statement_descriptor optional An arbitrary string to be displayed on your customer\u2019s statement. As an example, if your website is RunClub and the item you\u2019re charging for is a race ticket, you may want to specify a statement_descriptor of RunClub 5K race ticket. While many payment types will display this information, some may not display it at all.More parametersExpand all flow optional mandate optional dictionary receiver optional dictionary source_order optional dictionary token optional usage optional ReturnsReturns a newly created source","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Source.create(\n type='ach_credit_transfer',\n currency='usd',\n owner={\n 'email': 'jenny.rosen@example.com'\n }\n)\n'''Response {\n \"id\": \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n \"object\": \"source\",\n \"ach_credit_transfer\": {\n \"account_number\": \"test_52796e3294dc\",\n \"routing_number\": \"110000000\",\n \"fingerprint\": \"ecpwEzmBOSMOqQTL\",\n \"bank_name\": \"TEST BANK\",\n \"swift_code\": \"TSTEZ122\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_6jh1NqD1xGAI0sVLZcI5kKWy\",\n \"created\": 1659518943,\n \"currency\": \"usd\",\n \"flow\": \"receiver\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"receiver\": {\n \"address\": \"121042882-38381234567890123\",\n \"amount_charged\": 0,\n \"amount_received\": 0,\n \"amount_returned\": 0,\n \"refund_attributes_method\": \"email\",\n \"refund_attributes_status\": \"missing\"\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_credit_transfer\",\n \"usage\": \"reusable\"\n}'''"},{"nl":"Retrieve a sourceRetrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.ParametersExpand all client_secret optional ReturnsReturns a source if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Source.retrieve(\n \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n)\n'''Response {\n \"id\": \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n \"object\": \"source\",\n \"ach_credit_transfer\": {\n \"account_number\": \"test_52796e3294dc\",\n \"routing_number\": \"110000000\",\n \"fingerprint\": \"ecpwEzmBOSMOqQTL\",\n \"bank_name\": \"TEST BANK\",\n \"swift_code\": \"TSTEZ122\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_6jh1NqD1xGAI0sVLZcI5kKWy\",\n \"created\": 1659518943,\n \"currency\": \"usd\",\n \"flow\": \"receiver\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"receiver\": {\n \"address\": \"121042882-38381234567890123\",\n \"amount_charged\": 0,\n \"amount_received\": 0,\n \"amount_returned\": 0,\n \"refund_attributes_method\": \"email\",\n \"refund_attributes_status\": \"missing\"\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_credit_transfer\",\n \"usage\": \"reusable\"\n}'''"},{"nl":"Update a sourceUpdates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.\nThis request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.Parameters amount optional Amount associated with the source. 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. owner optional dictionary Information about the owner of the payment instrument that may be used or required by particular source types.Show child parametersMore parametersExpand all mandate optional dictionary source_order optional dictionary ReturnsReturns the source object if the update succeeded. This call will raise an error if update parameters are invalid","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Source.modify(\n \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n \"object\": \"source\",\n \"ach_credit_transfer\": {\n \"account_number\": \"test_52796e3294dc\",\n \"routing_number\": \"110000000\",\n \"fingerprint\": \"ecpwEzmBOSMOqQTL\",\n \"bank_name\": \"TEST BANK\",\n \"swift_code\": \"TSTEZ122\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_6jh1NqD1xGAI0sVLZcI5kKWy\",\n \"created\": 1659518943,\n \"currency\": \"usd\",\n \"flow\": \"receiver\",\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"receiver\": {\n \"address\": \"121042882-38381234567890123\",\n \"amount_charged\": 0,\n \"amount_received\": 0,\n \"amount_returned\": 0,\n \"refund_attributes_method\": \"email\",\n \"refund_attributes_status\": \"missing\"\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_credit_transfer\",\n \"usage\": \"reusable\"\n}'''"},{"nl":"Attach a sourceAttaches a Source object to a Customer. The source must be in a chargeable or pending state.Parameters source required The identifier of the source to be attached.ReturnsReturns the attached Source object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nsource = stripe.Customer.create_source(\n 'cus_8TEMHVY5moxIPI',\n source='src_1LSdsx2eZvKYlo2CynOAUbXz'\n)\n'''Response {\n \"id\": \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n \"object\": \"source\",\n \"ach_credit_transfer\": {\n \"account_number\": \"test_52796e3294dc\",\n \"routing_number\": \"110000000\",\n \"fingerprint\": \"ecpwEzmBOSMOqQTL\",\n \"bank_name\": \"TEST BANK\",\n \"swift_code\": \"TSTEZ122\"\n },\n \"amount\": 1000,\n \"client_secret\": \"src_client_secret_6jh1NqD1xGAI0sVLZcI5kKWy\",\n \"created\": 1659518943,\n \"currency\": \"usd\",\n \"flow\": \"receiver\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"receiver\": {\n \"address\": \"121042882-38381234567890123\",\n \"amount_received\": 1000,\n \"amount_charged\": 0,\n \"amount_returned\": 0,\n \"refund_attributes_status\": \"missing\",\n \"refund_attributes_method\": \"email\"\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"chargeable\",\n \"type\": \"ach_credit_transfer\",\n \"usage\": \"reusable\",\n \"customer\": \"cus_8TEMHVY5moxIPI\"\n}'''"},{"nl":"Detach a sourceDetaches a Source object from a Customer. The status of a source is changed to consumed when it is detached and it can no longer be used to create a charge.ParametersNo parameters.ReturnsReturns the detached Source object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.delete_source(\n 'cus_8TEMHVY5moxIPI',\n 'src_1LSdsx2eZvKYlo2CynOAUbXz'\n)\n'''Response {\n \"id\": \"src_1LSdsx2eZvKYlo2CynOAUbXz\",\n \"object\": \"source\",\n \"ach_credit_transfer\": {\n \"account_number\": \"test_52796e3294dc\",\n \"routing_number\": \"110000000\",\n \"fingerprint\": \"ecpwEzmBOSMOqQTL\",\n \"bank_name\": \"TEST BANK\",\n \"swift_code\": \"TSTEZ122\"\n },\n \"amount\": 0,\n \"client_secret\": \"src_client_secret_6jh1NqD1xGAI0sVLZcI5kKWy\",\n \"created\": 1659518943,\n \"currency\": \"usd\",\n \"flow\": \"receiver\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": null,\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"receiver\": {\n \"address\": \"121042882-38381234567890123\",\n \"amount_received\": 1000,\n \"amount_charged\": 1000,\n \"amount_returned\": 0,\n \"refund_attributes_status\": \"missing\",\n \"refund_attributes_method\": \"email\"\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"consumed\",\n \"type\": \"ach_credit_transfer\",\n \"usage\": \"reusable\",\n \"customer\": \"cus_8TEMHVY5moxIPI\"\n}'''"},{"nl":"ProductsProducts describe the specific goods or services you offer to your customers.\nFor example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product.\nThey can be used in conjunction with Prices to configure pricing in Payment Links, Checkout, and Subscriptions.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/products\u00a0\u00a0\u00a0GET\u00a0\/v1\/products\/:id\u00a0\u00a0POST\u00a0\/v1\/products\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/productsDELETE\u00a0\/v1\/products\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/products\/search\n'''"},{"nl":"The product objectAttributes id string Unique identifier for the object. active boolean Whether the product is currently available for purchase. default_price string expandable The ID of the Price object that is the default price for this product. description string The product\u2019s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. 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 The product\u2019s name, meant to be displayable to the customer.More attributesExpand all object string, value is \"product\" created timestamp images array containing strings livemode boolean package_dimensions hash shippable boolean statement_descriptor string tax_code string expandable unit_label string updated timestamp url string","code":"'''The product object {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"active\": true,\n \"created\": 1659517907,\n \"default_price\": null,\n \"description\": null,\n \"images\": [],\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Product\",\n \"package_dimensions\": null,\n \"shippable\": null,\n \"statement_descriptor\": null,\n \"tax_code\": null,\n \"unit_label\": null,\n \"updated\": 1659517907,\n \"url\": null\n}\n'''"},{"nl":"Create a productCreates a new product object.Parameters id optional An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. name required The product\u2019s name, meant to be displayable to the customer. active optional Whether the product is currently available for purchase. Defaults to true. description optional The product\u2019s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. 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_price_data optional dictionary images optional package_dimensions optional dictionary shippable optional statement_descriptor optional tax_code optional unit_label optional url optional ReturnsReturns a product object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Product.create(name=\"Gold Special\")\n'''Response {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"active\": true,\n \"created\": 1659517907,\n \"default_price\": null,\n \"description\": null,\n \"images\": [],\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Gold Special\",\n \"package_dimensions\": null,\n \"shippable\": null,\n \"statement_descriptor\": null,\n \"tax_code\": null,\n \"unit_label\": null,\n \"updated\": 1659517907,\n \"url\": null\n}'''"},{"nl":"Retrieve a productRetrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.ParametersNo parameters.ReturnsReturns a product object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Product.retrieve(\"prod_MAzbye5Vk2hgmo\")\n'''Response {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"active\": true,\n \"created\": 1659517907,\n \"default_price\": null,\n \"description\": null,\n \"images\": [],\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Product\",\n \"package_dimensions\": null,\n \"shippable\": null,\n \"statement_descriptor\": null,\n \"tax_code\": null,\n \"unit_label\": null,\n \"updated\": 1659517907,\n \"url\": null\n}'''"},{"nl":"Update a productUpdates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters active optional Whether the product is available for purchase. default_price optional The ID of the Price object that is the default price for this product. description optional The product\u2019s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. 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. name optional The product\u2019s name, meant to be displayable to the customer.More parametersExpand all images optional package_dimensions optional dictionary shippable optional statement_descriptor optional tax_code optional unit_label optional url optional ReturnsReturns the product object if the update succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Product.modify(\n \"prod_MAzbye5Vk2hgmo\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"active\": true,\n \"created\": 1659517907,\n \"default_price\": null,\n \"description\": null,\n \"images\": [],\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"name\": \"Product\",\n \"package_dimensions\": null,\n \"shippable\": null,\n \"statement_descriptor\": null,\n \"tax_code\": null,\n \"unit_label\": null,\n \"updated\": 1659517907,\n \"url\": null\n}'''"},{"nl":"List all productsReturns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.Parameters active optional Only return products that are active or inactive (e.g., pass false to list all inactive products).More parametersExpand all created optional dictionary ending_before optional ids optional limit optional shippable optional starting_after optional url optional ReturnsA dictionary with a data property that contains an array of up to limit products, starting after product starting_after. Each entry in the array is a separate product object. If no more products are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Product.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/products\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"active\": true,\n \"created\": 1659517907,\n \"default_price\": null,\n \"description\": null,\n \"images\": [],\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Product\",\n \"package_dimensions\": null,\n \"shippable\": null,\n \"statement_descriptor\": null,\n \"tax_code\": null,\n \"unit_label\": null,\n \"updated\": 1659517907,\n \"url\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Delete a productDelete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.ParametersNo parameters.ReturnsReturns a deleted object on success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Product.delete(\"prod_MAzbye5Vk2hgmo\")\n'''Response {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"deleted\": true\n}'''"},{"nl":"Search productsSearch for products you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for products. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit products. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Product.search(\n query=\"active:'true' AND metadata['order_id']:'6735'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/products\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"prod_MAzbye5Vk2hgmo\",\n \"object\": \"product\",\n \"active\": true,\n \"created\": 1659517907,\n \"default_price\": null,\n \"description\": null,\n \"images\": [],\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"name\": \"Product\",\n \"package_dimensions\": null,\n \"shippable\": null,\n \"statement_descriptor\": null,\n \"tax_code\": null,\n \"unit_label\": null,\n \"updated\": 1659517907,\n \"url\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"PricesPrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.\nProducts help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.For example, you might have a single \"gold\" product that has prices for $10\/month, $100\/year, and \u20ac9 once.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/prices\u00a0\u00a0\u00a0GET\u00a0\/v1\/prices\/:id\u00a0\u00a0POST\u00a0\/v1\/prices\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/prices\u00a0\u00a0\u00a0GET\u00a0\/v1\/prices\/search\n'''"},{"nl":"The price objectAttributes id string Unique identifier for the object. active boolean Whether the price can be used for new purchases. 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. nickname string A brief description of the price, hidden from customers. product string expandable The ID of the product this price is associated with. recurring hash The recurring components of a price such as interval and usage_type.Show child attributes type string One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. unit_amount integer The unit amount in cents to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.More attributesExpand all object string, value is \"price\" billing_scheme string created timestamp currency_options hash expandable preview feature custom_unit_amount hash livemode boolean lookup_key string tax_behavior string tiers array of hashes expandable tiers_mode string transform_quantity hash unit_amount_decimal decimal string","code":"'''The price object {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n}\n'''"},{"nl":"Create a priceCreates a new price for an existing product. The price can be recurring or one-time.Parameters currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. product required unless product_data is provided The ID of the product that this price will belong to. unit_amount Required conditionally A positive integer in cents (or 0 for a free price) representing how much to charge. One of unit_amount or custom_unit_amount is required, unless billing_scheme=tiered. active optional Whether the price can be used for new purchases. Defaults to true. 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. nickname optional A brief description of the price, hidden from customers. recurring optional dictionary The recurring components of a price such as interval and usage_type.Show child parametersMore parametersExpand all custom_unit_amount Required unless unit_amount is provided product_data required unless product is provided tiers Required if billing_scheme=tiered tiers_mode Required if billing_scheme=tiered billing_scheme optional currency_options optional dictionary preview feature lookup_key optional tax_behavior optional transfer_lookup_key optional transform_quantity optional dictionary unit_amount_decimal optional ReturnsThe newly created Price object is returned upon success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Price.create(\n unit_amount=1200,\n currency=\"usd\",\n recurring={\"interval\": \"month\"},\n product=\"prod_MApBpixJvIPdF1\",\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n}'''"},{"nl":"Retrieve a priceRetrieves the price with the given ID.ParametersNo parameters.ReturnsReturns a price if a valid price or plan ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Price.retrieve(\n \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n}'''"},{"nl":"Update a priceUpdates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.Parameters active optional Whether the price can be used for new purchases. Defaults to true. 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. nickname optional A brief description of the price, hidden from customers.More parametersExpand all currency_options optional dictionary preview feature lookup_key optional tax_behavior optional transfer_lookup_key optional ReturnsThe updated price object is returned upon success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Price.modify(\n \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n}'''"},{"nl":"List all pricesReturns a list of your prices.Parameters active optional Only return prices that are active or inactive (e.g., pass false to list all inactive prices). currency optional Only return prices for the given currency. product optional Only return prices for the given product. type optional Only return prices of type recurring or one_time.More parametersExpand all created optional dictionary ending_before optional limit optional lookup_keys optional recurring optional dictionary starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit prices, starting after prices starting_after. Each entry in the array is a separate price object. If no more prices are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Price.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/prices\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Search pricesSearch for prices you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for prices. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit prices. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Price.search(\n query=\"active:'true' AND metadata['order_id']:'6735'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/prices\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": \"true\",\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"CouponsA coupon contains information about a percent-off or amount-off discount you\nmight want to apply to a customer. Coupons may be applied to subscriptions, invoices,\ncheckout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/coupons\u00a0\u00a0\u00a0GET\u00a0\/v1\/coupons\/:id\u00a0\u00a0POST\u00a0\/v1\/coupons\/:idDELETE\u00a0\/v1\/coupons\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/coupons\n'''"},{"nl":"The coupon objectAttributes id string Unique identifier for the object. amount_off positive integer Amount (in the currency specified) that will be taken off the subtotal of any invoices for this customer. currency currency If amount_off has been set, the three-letter ISO code for the currency of the amount to take off. duration enum One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.Possible enum valuesonce repeating forever duration_in_months positive integer If duration is repeating, the number of months the coupon applies. Null if coupon duration is forever or once. 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 Name of the coupon displayed to customers on for instance invoices or receipts. percent_off decimal Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a \u20ac100 invoice \u20ac50 instead.More attributesExpand all object string, value is \"coupon\" applies_to hash expandable created timestamp currency_options hash expandable preview feature livemode boolean max_redemptions positive integer redeem_by timestamp times_redeemed positive integer or zero valid boolean","code":"'''The coupon object {\n \"id\": \"Z4OV52SU\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1659519093,\n \"currency\": \"usd\",\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {},\n \"name\": \"25.5% off\",\n \"percent_off\": 25.5,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n}\n'''"},{"nl":"Create a couponYou can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.\nA coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice\u2019s subtotal. For example, an invoice with a subtotal of \u20ac100 will have a final total of \u20ac0 if a coupon with an amount_off of 20000 is applied to it and an invoice with a subtotal of \u20ac300 will have a final total of \u20ac100 if a coupon with an amount_off of 20000 is applied to it.Parameters amount_off optional A positive integer representing the amount to subtract from an invoice total (required if percent_off is not passed). currency optional Three-letter ISO code for the currency of the amount_off parameter (required if amount_off is passed). duration optional enum Specifies how long the discount will be in effect if used on a subscription. Can be forever, once, or repeating. Defaults to once.Possible enum valuesonce repeating forever duration_in_months optional Required only if duration is repeating, in which case it must be a positive integer that specifies the number of months the discount will be in effect. 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. name optional Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the id is shown if name is not set. percent_off optional A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if amount_off is not passed).More parametersExpand all id optional applies_to optional dictionary currency_options optional dictionary preview feature max_redemptions optional redeem_by optional ReturnsReturns the coupon object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Coupon.create(\n percent_off=25.5,\n duration=\"repeating\",\n duration_in_months=3,\n)\n'''Response {\n \"id\": \"Z4OV52SU\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1659519093,\n \"currency\": \"usd\",\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {},\n \"name\": \"25.5% off\",\n \"percent_off\": 25.5,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n}'''"},{"nl":"Retrieve a couponRetrieves the coupon with the given ID.ParametersNo parameters.ReturnsReturns a coupon if a valid coupon ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Coupon.retrieve(\"Z4OV52SU\")\n'''Response {\n \"id\": \"Z4OV52SU\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1659519093,\n \"currency\": \"usd\",\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {},\n \"name\": \"25.5% off\",\n \"percent_off\": 25.5,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n}'''"},{"nl":"Update a couponUpdates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.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. name optional Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the id is shown if name is not set.More parametersExpand all currency_options optional dictionary preview feature ReturnsThe newly updated coupon object if the call succeeded. Otherwise, this call raises an error, such as if the coupon has been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Coupon.modify(\n \"Z4OV52SU\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"Z4OV52SU\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1659519093,\n \"currency\": \"usd\",\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"name\": \"25.5% off\",\n \"percent_off\": 25.5,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n}'''"},{"nl":"Delete a couponYou can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can\u2019t redeem the coupon. You can also delete coupons via the API.ParametersNo parameters.ReturnsAn object with the deleted coupon\u2019s ID and a deleted flag upon success. Otherwise, this call raises an error, such as if the coupon has already been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Coupon.delete(\"Z4OV52SU\")\n'''Response {\n \"id\": \"Z4OV52SU\",\n \"object\": \"coupon\",\n \"deleted\": true\n}'''"},{"nl":"List all couponsReturns a list of your coupons.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 coupons, starting after coupon starting_after. Each entry in the array is a separate coupon object. If no more coupons are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Coupon.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/coupons\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"Z4OV52SU\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1659519093,\n \"currency\": \"usd\",\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {},\n \"name\": \"25.5% off\",\n \"percent_off\": 25.5,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Promotion CodeA Promotion Code represents a customer-redeemable code for a coupon. It can be used to\ncreate multiple codes for a single coupon","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/promotion_codes\u00a0\u00a0POST\u00a0\/v1\/promotion_codes\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/promotion_codes\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/promotion_codes\n'''"},{"nl":"The promotion code objectAttributes id string Unique identifier for the object. code string The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. coupon hash, coupon object Hash describing the coupon for this promotion code. 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 \"promotion_code\" active boolean created timestamp customer string expandable expires_at timestamp livemode boolean max_redemptions positive integer restrictions hash times_redeemed positive integer or zero","code":"'''The promotion code object {\n \"id\": \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n \"object\": \"promotion_code\",\n \"active\": true,\n \"code\": \"TS0EQJHH\",\n \"coupon\": {\n \"id\": \"123\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1507799684,\n \"currency\": null,\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": 14,\n \"metadata\": {\n \"teste\": \"test\"\n },\n \"name\": null,\n \"percent_off\": 34.0,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n },\n \"created\": 1599060617,\n \"customer\": null,\n \"expires_at\": null,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {\n \"order_id\": \"1\"\n },\n \"restrictions\": {\n \"first_time_transaction\": false,\n \"minimum_amount\": null,\n \"minimum_amount_currency\": null\n },\n \"times_redeemed\": 0\n}\n'''"},{"nl":"Create a promotion codeA promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.Parameters coupon required The coupon for this promotion code. code optional The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. 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 active optional customer optional expires_at optional max_redemptions optional restrictions optional dictionary ReturnsReturns the promotion code object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PromotionCode.create(coupon=\"Z4OV52SU\")\n'''Response {\n \"id\": \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n \"object\": \"promotion_code\",\n \"active\": true,\n \"code\": \"TS0EQJHH\",\n \"coupon\": \"Z4OV52SU\",\n \"created\": 1599060617,\n \"customer\": null,\n \"expires_at\": null,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {\n \"order_id\": \"1\"\n },\n \"restrictions\": {\n \"first_time_transaction\": false,\n \"minimum_amount\": null,\n \"minimum_amount_currency\": null\n },\n \"times_redeemed\": 0\n}'''"},{"nl":"Update a promotion codeUpdates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.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 active optional restrictions optional dictionary preview feature ReturnsThe updated promotion code object is returned upon success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PromotionCode.modify(\n \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n \"object\": \"promotion_code\",\n \"active\": true,\n \"code\": \"TS0EQJHH\",\n \"coupon\": {\n \"id\": \"123\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1507799684,\n \"currency\": null,\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": 14,\n \"metadata\": {\n \"teste\": \"test\"\n },\n \"name\": null,\n \"percent_off\": 34.0,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n },\n \"created\": 1599060617,\n \"customer\": null,\n \"expires_at\": null,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"restrictions\": {\n \"first_time_transaction\": false,\n \"minimum_amount\": null,\n \"minimum_amount_currency\": null\n },\n \"times_redeemed\": 0\n}'''"},{"nl":"Retrieve a promotion codeRetrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.ParametersNo parameters.ReturnsReturns a promotion code if a valid promotion code ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PromotionCode.retrieve(\n \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n)\n'''Response {\n \"id\": \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n \"object\": \"promotion_code\",\n \"active\": true,\n \"code\": \"TS0EQJHH\",\n \"coupon\": {\n \"id\": \"123\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1507799684,\n \"currency\": null,\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": 14,\n \"metadata\": {\n \"teste\": \"test\"\n },\n \"name\": null,\n \"percent_off\": 34.0,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n },\n \"created\": 1599060617,\n \"customer\": null,\n \"expires_at\": null,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {\n \"order_id\": \"1\"\n },\n \"restrictions\": {\n \"first_time_transaction\": false,\n \"minimum_amount\": null,\n \"minimum_amount_currency\": null\n },\n \"times_redeemed\": 0\n}'''"},{"nl":"List all promotion codesReturns a list of your promotion codes.ParametersExpand all active optional code optional coupon optional created optional dictionary customer optional ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit promotion codes, starting after promotion code starting_after. Each entry in the array is a separate promotion code object. If no more promotion codes are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PromotionCode.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/promotion_codes\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"promo_1HMxuf2eZvKYlo2CmGXSyhRx\",\n \"object\": \"promotion_code\",\n \"active\": true,\n \"code\": \"TS0EQJHH\",\n \"coupon\": {\n \"id\": \"123\",\n \"object\": \"coupon\",\n \"amount_off\": null,\n \"created\": 1507799684,\n \"currency\": null,\n \"duration\": \"repeating\",\n \"duration_in_months\": 3,\n \"livemode\": false,\n \"max_redemptions\": 14,\n \"metadata\": {\n \"teste\": \"test\"\n },\n \"name\": null,\n \"percent_off\": 34.0,\n \"redeem_by\": null,\n \"times_redeemed\": 0,\n \"valid\": true\n },\n \"created\": 1599060617,\n \"customer\": null,\n \"expires_at\": null,\n \"livemode\": false,\n \"max_redemptions\": null,\n \"metadata\": {\n \"order_id\": \"1\"\n },\n \"restrictions\": {\n \"first_time_transaction\": false,\n \"minimum_amount\": null,\n \"minimum_amount_currency\": null\n },\n \"times_redeemed\": 0\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"DiscountsA discount represents the actual application of a coupon or promotion code.\nIt contains information about when the discount began, when it will end, and what it is applied to.","code":"'''EndpointsDELETE\u00a0\/v1\/customers\/:id\/discountDELETE\u00a0\/v1\/subscriptions\/:id\/discount\n'''"},{"nl":"The discount objectAttributes id string The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array. coupon hash, coupon object Hash describing the coupon applied to create this discount. customer string expandable The ID of the customer associated with this discount. end timestamp If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null. start timestamp Date that the coupon was applied. subscription string The subscription that this coupon is applied to, if it is applied to a particular subscription.More attributesExpand all object string, value is \"discount\" checkout_session string invoice string invoice_item string promotion_code string expandable ","code":"'''The discount object {\n \"id\": \"di_17G0M72eZvKYlo2ClYl5y9Fl\",\n \"object\": \"discount\",\n \"checkout_session\": null,\n \"coupon\": {\n \"id\": \"MmtYHtx6\",\n \"object\": \"coupon\",\n \"amount_off\": 99,\n \"created\": 1449638350,\n \"currency\": \"usd\",\n \"duration\": \"once\",\n \"duration_in_months\": null,\n \"livemode\": false,\n \"max_redemptions\": 1,\n \"metadata\": {},\n \"name\": null,\n \"percent_off\": null,\n \"redeem_by\": 1452230350,\n \"times_redeemed\": 1,\n \"valid\": false\n },\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"end\": null,\n \"invoice\": null,\n \"invoice_item\": null,\n \"promotion_code\": null,\n \"start\": 1449638351,\n \"subscription\": null\n}\n'''"},{"nl":"Delete a customer discountRemoves the currently applied discount on a customer.ParametersNo parameters.ReturnsAn object with a deleted flag set to true upon success. This call returns an error otherwise, such as if no discount exists on this customer","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.delete_discount('cus_8TEMHVY5moxIPI')\n'''Response {\n \"object\": \"discount\",\n \"deleted\": true\n}'''"},{"nl":"Delete a subscription discountRemoves the currently applied discount on a subscription.ParametersNo parameters.ReturnsAn object with a deleted flag set to true upon success. This call returns an error otherwise, such as if no discount exists on this subscription","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.delete_discount('sub_1JbiLB2eZvKYlo2CNHnqfMzf')\n'''Response {\n \"object\": \"discount\",\n \"deleted\": true\n}'''"},{"nl":"Tax CodeTax codes classify goods and services for tax purposes","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/tax_codes\u00a0\u00a0\u00a0GET\u00a0\/v1\/tax_codes\/:id\n'''"},{"nl":"The tax code objectAttributes id string Unique identifier for the object. object string, value is \"tax_code\" String representing the object\u2019s type. Objects of the same type share the same value. description string A detailed description of which types of products the tax code represents. name string A short name for the tax code","code":"'''The tax code object {\n \"id\": \"txcd_99999999\",\n \"object\": \"tax_code\",\n \"description\": \"Any tangible or physical good. For jurisdictions that impose a tax, the standard rate is applied.\",\n \"name\": \"General - Tangible Goods\"\n}\n'''"},{"nl":"List all tax codesA list of all tax codes available to add to Products in order to allow specific tax calculations.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit tax codes, starting after tax code starting_after. Each entry in the array is a separate tax code object. If no more tax codes are available, the resulting array will be empty. This request should never return an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.TaxCode.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/tax_codes\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"txcd_99999999\",\n \"object\": \"tax_code\",\n \"description\": \"Any tangible or physical good. For jurisdictions that impose a tax, the standard rate is applied.\",\n \"name\": \"General - Tangible Goods\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a tax codeRetrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.ParametersNo parameters.ReturnsReturns a tax code object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.TaxCode.retrieve(\"txcd_99999999\")\n'''Response {\n \"id\": \"txcd_99999999\",\n \"object\": \"tax_code\",\n \"description\": \"Any tangible or physical good. For jurisdictions that impose a tax, the standard rate is applied.\",\n \"name\": \"General - Tangible Goods\"\n}'''"},{"nl":"Tax RateTax rates can be applied to invoices, subscriptions and Checkout Sessions to collect tax.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/tax_rates\u00a0\u00a0\u00a0GET\u00a0\/v1\/tax_rates\/:id\u00a0\u00a0POST\u00a0\/v1\/tax_rates\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/tax_rates\n'''"},{"nl":"The tax rate objectAttributes id string Unique identifier for the object. active boolean Defaults to true. When set to false, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. country string Two-letter country code (ISO 3166-1 alpha-2). description string An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. display_name string The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. inclusive boolean This specifies if the tax rate is inclusive or exclusive. jurisdiction string The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer\u2019s invoice. 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. percentage decimal This represents the tax rate percent out of 100. state string ISO 3166-2 subdivision code, without country prefix. For example, \u201cNY\u201d for New York, United States.More attributesExpand all object string, value is \"tax_rate\" created timestamp livemode boolean tax_type string","code":"'''The tax rate object {\n \"id\": \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659518871,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n}\n'''"},{"nl":"Create a tax rateCreates a new tax rate.Parameters display_name required The display name of the tax rate, which will be shown to users. inclusive required This specifies if the tax rate is inclusive or exclusive. percentage required This represents the tax rate percent out of 100. active optional Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. country optional Two-letter country code (ISO 3166-1 alpha-2). description optional An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. jurisdiction optional The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer\u2019s invoice. 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. state optional ISO 3166-2 subdivision code, without country prefix. For example, \u201cNY\u201d for New York, United States.More parametersExpand all tax_type optional ReturnsThe created tax rate object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.TaxRate.create(\n display_name=\"VAT\",\n description=\"VAT Germany\",\n jurisdiction=\"DE\",\n percentage=16,\n inclusive=False,\n)\n'''Response {\n \"id\": \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659518871,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 16.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n}'''"},{"nl":"Retrieves a tax rateRetrieves a tax rate with the given IDParametersNo parameters.ReturnsReturns an tax rate if a valid tax rate ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.TaxRate.retrieve(\n \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n)\n'''Response {\n \"id\": \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659518871,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n}'''"},{"nl":"Update a tax rateUpdates an existing tax rate.Parameters active optional Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. country optional Two-letter country code (ISO 3166-1 alpha-2). description optional An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. display_name optional The display name of the tax rate, which will be shown to users. jurisdiction optional The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer\u2019s invoice. 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. state optional ISO 3166-2 subdivision code, without country prefix. For example, \u201cNY\u201d for New York, United States.More parametersExpand all tax_type optional ReturnsThe updated tax rate","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.TaxRate.modify(\n \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n active=False,\n)\n'''Response {\n \"id\": \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n \"object\": \"tax_rate\",\n \"active\": false,\n \"country\": \"DE\",\n \"created\": 1659518871,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n}'''"},{"nl":"List all tax ratesReturns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.Parameters active optional Optional flag to filter by tax rates that are either active or inactive (archived).More parametersExpand all created optional dictionary ending_before optional inclusive optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit tax rates, starting after tax rate starting_after. Each entry in the array is a separate tax rate object. If no more tax rates are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.TaxRate.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/tax_rates\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"txr_1LSdrn2eZvKYlo2Cnyh3Sdyj\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659518871,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Shipping RatesShipping rates describe the price of shipping presented to your customers and can be\napplied to Checkout Sessions\nand Orders to collect shipping costs","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/shipping_rates\u00a0\u00a0\u00a0GET\u00a0\/v1\/shipping_rates\/:id\u00a0\u00a0POST\u00a0\/v1\/shipping_rates\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/shipping_rates\n'''"},{"nl":"The shipping rate objectAttributes id string Unique identifier for the object. active boolean Whether the shipping rate can be used for new purchases. Defaults to true. display_name string The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. fixed_amount hash Describes a fixed amount to charge for shipping. Must be present if type is fixed_amount.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. type enum The type of calculation to use on the shipping rate. Can only be fixed_amount for now.Possible enum valuesfixed_amount More attributesExpand all object string, value is \"shipping_rate\" created timestamp delivery_estimate hash livemode boolean tax_behavior string tax_code string expandable ","code":"'''The shipping rate object {\n \"id\": \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n \"object\": \"shipping_rate\",\n \"active\": true,\n \"created\": 1659518871,\n \"delivery_estimate\": null,\n \"display_name\": \"Ground shipping\",\n \"fixed_amount\": {\n \"amount\": 500,\n \"currency\": \"usd\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"tax_behavior\": \"unspecified\",\n \"tax_code\": null,\n \"type\": \"fixed_amount\"\n}\n'''"},{"nl":"Create a shipping rateCreates a new shipping rate object.Parameters display_name required The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. type required The type of calculation to use on the shipping rate. Can only be fixed_amount for now.Possible enum valuesfixed_amount fixed_amount optional dictionary Describes a fixed amount to charge for shipping. Must be present if type is fixed_amount.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 delivery_estimate optional dictionary tax_behavior optional tax_code optional ReturnsReturns a shipping rate object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ShippingRate.create(\n display_name=\"Ground shipping\",\n type=\"fixed_amount\",\n fixed_amount={\"amount\": 500, \"currency\": \"usd\"},\n)\n'''Response {\n \"id\": \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n \"object\": \"shipping_rate\",\n \"active\": true,\n \"created\": 1659518871,\n \"delivery_estimate\": null,\n \"display_name\": \"Ground shipping\",\n \"fixed_amount\": {\n \"amount\": 500,\n \"currency\": \"usd\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"tax_behavior\": \"unspecified\",\n \"tax_code\": null,\n \"type\": \"fixed_amount\"\n}'''"},{"nl":"Retrieve a shipping rateReturns the shipping rate object with the given ID.ParametersNo parameters.ReturnsReturns a shipping rate object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ShippingRate.retrieve(\n \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n)\n'''Response {\n \"id\": \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n \"object\": \"shipping_rate\",\n \"active\": true,\n \"created\": 1659518871,\n \"delivery_estimate\": null,\n \"display_name\": \"Ground shipping\",\n \"fixed_amount\": {\n \"amount\": 500,\n \"currency\": \"usd\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"tax_behavior\": \"unspecified\",\n \"tax_code\": null,\n \"type\": \"fixed_amount\"\n}'''"},{"nl":"Update a shipping rateUpdates an existing shipping rate object.Parameters active optional Whether the shipping rate can be used for new purchases. Defaults to true. fixed_amount optional dictionary preview feature Describes a fixed amount to charge for shipping. Must be present if type is fixed_amount.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 tax_behavior optional preview feature ReturnsReturns the modified shipping rate object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ShippingRate.modify(\n \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n \"object\": \"shipping_rate\",\n \"active\": true,\n \"created\": 1659518871,\n \"delivery_estimate\": null,\n \"display_name\": \"Ground shipping\",\n \"fixed_amount\": {\n \"amount\": 500,\n \"currency\": \"usd\"\n },\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tax_code\": null,\n \"type\": \"fixed_amount\"\n}'''"},{"nl":"List all shipping ratesReturns a list of your shipping rates.Parameters active optional Only return shipping rates that are active or inactive. created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:Show child parameters currency optional Only return shipping rates for the given currency.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 shipping rates, starting after shipping rate starting_after. Each entry in the array is a separate shipping rate object. If no more shipping rates are available, the resulting array will be empty. This require should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ShippingRate.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/shipping_rates\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"shr_1LSdrn2eZvKYlo2CxRF2J7J9\",\n \"object\": \"shipping_rate\",\n \"active\": true,\n \"created\": 1659518871,\n \"delivery_estimate\": null,\n \"display_name\": \"Ground shipping\",\n \"fixed_amount\": {\n \"amount\": 500,\n \"currency\": \"usd\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"tax_behavior\": \"unspecified\",\n \"tax_code\": null,\n \"type\": \"fixed_amount\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"SessionsA Checkout Session represents your customer's session as they pay for\none-time purchases or subscriptions through Checkout\nor Payment Links. We recommend creating a\nnew Session each time your customer attempts to pay.Once payment is successful, the Checkout Session will contain a reference\nto the Customer, and either the successful\nPaymentIntent or an active\nSubscription.You can create a Checkout Session on your server and pass its ID to the\nclient to begin Checkout.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/checkout\/sessions\u00a0\u00a0POST\u00a0\/v1\/checkout\/sessions\/:id\/expire\u00a0\u00a0\u00a0GET\u00a0\/v1\/checkout\/sessions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/checkout\/sessions\u00a0\u00a0\u00a0GET\u00a0\/v1\/checkout\/sessions\/:id\/line_items\n'''"},{"nl":"The Session objectAttributes id string Unique identifier for the object. Used to pass to redirectToCheckout\nin Stripe.js. cancel_url string The URL the customer will be directed to if they decide to cancel payment and return to your website. client_reference_id string A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nSession with your internal systems. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable The ID of the customer for this Session.\nFor Checkout Sessions in payment or subscription mode, Checkout\nwill create a new customer object based on information provided\nduring the payment flow unless an existing customer was provided when\nthe Session was created. customer_email string If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once the payment flow is\ncomplete, use the customer attribute. line_items list expandable The line items purchased by the customer. This field is not included by default. To include it in the response, expand the line_items field.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. mode enum The mode of the Checkout Session.Possible enum valuespayment Accept one-time payments for cards, iDEAL, and more.setup Save payment details to charge your customers later.subscription Use Stripe Billing to set up fixed-price subscriptions. payment_intent string expandable The ID of the PaymentIntent for Checkout Sessions in payment mode. payment_method_types array containing strings A list of the types of payment methods (e.g. card) this Checkout\nSession is allowed to accept. payment_status enum The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required.\nYou can use this value to decide when to fulfill your customer\u2019s order.Possible enum valuespaid The payment funds are available in your account.unpaid The payment funds are not yet available in your account.no_payment_required The Checkout Session is in setup mode and doesn\u2019t require a payment at this time. success_url string The URL the customer will be directed to after the payment or\nsubscription creation is successful.More attributesExpand all object string, value is \"checkout.session\" after_expiration hash allow_promotion_codes boolean amount_subtotal integer amount_total integer automatic_tax hash billing_address_collection enum consent hash consent_collection hash customer_creation enum customer_details hash expires_at timestamp livemode boolean locale enum payment_link string expandable payment_method_options hash phone_number_collection hash recovered_from string setup_intent string expandable shipping_address_collection hash shipping_cost hash shipping_details hash shipping_options array of hashes status enum submit_type enum subscription string expandable tax_id_collection hash total_details hash url string","code":"'''The Session object {\n \"id\": \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n \"object\": \"checkout.session\",\n \"after_expiration\": null,\n \"allow_promotion_codes\": null,\n \"amount_subtotal\": null,\n \"amount_total\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_address_collection\": null,\n \"cancel_url\": \"https:\/\/example.com\/cancel\",\n \"client_reference_id\": null,\n \"consent\": null,\n \"consent_collection\": null,\n \"currency\": null,\n \"customer\": null,\n \"customer_creation\": null,\n \"customer_details\": null,\n \"customer_email\": null,\n \"expires_at\": 1659518871,\n \"livemode\": false,\n \"locale\": null,\n \"metadata\": {},\n \"mode\": \"payment\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_link\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"payment_status\": \"unpaid\",\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"recovered_from\": null,\n \"redaction\": null,\n \"setup_intent\": null,\n \"shipping_address_collection\": null,\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"shipping_options\": [],\n \"status\": \"expired\",\n \"submit_type\": null,\n \"subscription\": null,\n \"success_url\": \"https:\/\/example.com\/success\",\n \"total_details\": null,\n \"url\": null\n}\n'''"},{"nl":"Create a SessionCreates a Session object.Parameters cancel_url required The URL the customer will be directed to if they decide to cancel payment and return to your website. mode required conditionally The mode of the Checkout Session. Required when using prices or setup mode. Pass subscription if the Checkout Session includes at least one recurring item.Possible enum valuespayment Accept one-time payments for cards, iDEAL, and more.setup Save payment details to charge your customers later.subscription Use Stripe Billing to set up fixed-price subscriptions. success_url required The URL to which Stripe should send customers when payment or setup\nis complete.\nIf you\u2019d like to use information from the successful Checkout Session on your page,\nread the guide on customizing your success page. client_reference_id optional A unique string to reference the Checkout Session. This can be a\ncustomer ID, a cart ID, or similar, and can be used to reconcile the\nsession with your internal systems. currency optional preview feature Three-letter ISO currency code, in lowercase. Must be a supported currency. customer optional ID of an existing Customer, if one exists. In payment mode, the customer\u2019s most recent card\npayment method will be used to prefill the email, name, card details, and billing address\non the Checkout page. In subscription mode, the customer\u2019s default payment method\nwill be used if it\u2019s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer\u2019s card details.\nIf the Customer already has a valid email set, the email will be prefilled and not editable in Checkout.\nIf the Customer does not have a valid email, Checkout will set the email entered during the session on the Customer.\nIf blank for Checkout Sessions in payment or subscription mode, Checkout will create a new Customer object based on information provided during the payment flow.\nYou can set payment_intent_data.setup_future_usage to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. customer_email optional If provided, this value will be used when the Customer object is created.\nIf not provided, customers will be asked to enter their email address.\nUse this parameter to prefill customer data if you already have an email\non file. To access information about the customer once a session is\ncomplete, use the customer field. line_items optional array of hashes A list of items the customer is purchasing. Use this parameter to pass one-time or recurring Prices.\nFor payment mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.\nFor subscription mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only.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. payment_method_types optional enum A list of the types of payment methods (e.g., card) this Checkout Session can accept.\nDo not include this attribute if you prefer to manage your payment methods from the Stripe Dashboard.\nRead more about the supported payment methods and their requirements in our payment\nmethod details guide.\nIf multiple payment methods are passed, Checkout will dynamically reorder them to\nprioritize the most relevant payment methods based on the customer\u2019s location and\nother characteristics.Possible enum valuescard acss_debit affirm afterpay_clearpay alipay au_becs_debit bacs_debit Show 19 moreMore parametersExpand all after_expiration optional dictionary allow_promotion_codes optional automatic_tax optional dictionary billing_address_collection optional enum consent_collection optional dictionary customer_creation optional enum customer_update optional dictionary discounts optional array of hashes expires_at optional locale optional enum payment_intent_data optional dictionary payment_method_options optional dictionary phone_number_collection optional dictionary setup_intent_data optional dictionary shipping_address_collection optional dictionary shipping_options optional array of hashes submit_type optional enum subscription_data optional dictionary tax_id_collection optional dictionary ReturnsReturns a Session object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.checkout.Session.create(\n success_url=\"https:\/\/example.com\/success\",\n cancel_url=\"https:\/\/example.com\/cancel\",\n line_items=[\n {\n \"price\": \"price_H5ggYwtDq4fbrJ\",\n \"quantity\": 2,\n },\n ],\n mode=\"payment\",\n)\n'''Response {\n \"id\": \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n \"object\": \"checkout.session\",\n \"after_expiration\": null,\n \"allow_promotion_codes\": null,\n \"amount_subtotal\": null,\n \"amount_total\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_address_collection\": null,\n \"cancel_url\": \"https:\/\/example.com\/cancel\",\n \"client_reference_id\": null,\n \"consent\": null,\n \"consent_collection\": null,\n \"currency\": null,\n \"customer\": null,\n \"customer_creation\": null,\n \"customer_details\": null,\n \"customer_email\": null,\n \"expires_at\": 1659518871,\n \"livemode\": false,\n \"locale\": null,\n \"metadata\": {},\n \"mode\": \"payment\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_link\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"payment_status\": \"unpaid\",\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"recovered_from\": null,\n \"redaction\": null,\n \"setup_intent\": null,\n \"shipping_address_collection\": null,\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"shipping_options\": [],\n \"status\": \"expired\",\n \"submit_type\": null,\n \"subscription\": null,\n \"success_url\": \"https:\/\/example.com\/success\",\n \"total_details\": null,\n \"url\": \"https:\/\/checkout.stripe.com\/pay\/...\"\n}'''"},{"nl":"Expire a SessionA Session can be expired when it is in one of these statuses: open \nAfter it expires, a customer can\u2019t complete a Session and customers loading the Session see a message saying the Session is expired.ParametersNo parameters.ReturnsReturns a Session object if the expiration succeeded. Returns an error if the Session has already expired or isn\u2019t in an expireable state","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.checkout.Session.expire(\n \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n)\n'''Response {\n \"id\": \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n \"object\": \"checkout.session\",\n \"after_expiration\": null,\n \"allow_promotion_codes\": null,\n \"amount_subtotal\": null,\n \"amount_total\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_address_collection\": null,\n \"cancel_url\": \"https:\/\/example.com\/cancel\",\n \"client_reference_id\": null,\n \"consent\": null,\n \"consent_collection\": null,\n \"currency\": null,\n \"customer\": null,\n \"customer_creation\": null,\n \"customer_details\": null,\n \"customer_email\": null,\n \"expires_at\": 1659518871,\n \"livemode\": false,\n \"locale\": null,\n \"metadata\": {},\n \"mode\": \"payment\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_link\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"payment_status\": \"unpaid\",\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"recovered_from\": null,\n \"redaction\": null,\n \"setup_intent\": null,\n \"shipping_address_collection\": null,\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"shipping_options\": [],\n \"status\": \"expired\",\n \"submit_type\": null,\n \"subscription\": null,\n \"success_url\": \"https:\/\/example.com\/success\",\n \"total_details\": null,\n \"url\": null\n}'''"},{"nl":"Retrieve a SessionRetrieves a Session object.ParametersNo parameters.ReturnsReturns a Session object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.checkout.Session.retrieve(\n \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n)\n'''Response {\n \"id\": \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n \"object\": \"checkout.session\",\n \"after_expiration\": null,\n \"allow_promotion_codes\": null,\n \"amount_subtotal\": null,\n \"amount_total\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_address_collection\": null,\n \"cancel_url\": \"https:\/\/example.com\/cancel\",\n \"client_reference_id\": null,\n \"consent\": null,\n \"consent_collection\": null,\n \"currency\": null,\n \"customer\": null,\n \"customer_creation\": null,\n \"customer_details\": null,\n \"customer_email\": null,\n \"expires_at\": 1659518871,\n \"livemode\": false,\n \"locale\": null,\n \"metadata\": {},\n \"mode\": \"payment\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_link\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"payment_status\": \"unpaid\",\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"recovered_from\": null,\n \"redaction\": null,\n \"setup_intent\": null,\n \"shipping_address_collection\": null,\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"shipping_options\": [],\n \"status\": \"expired\",\n \"submit_type\": null,\n \"subscription\": null,\n \"success_url\": \"https:\/\/example.com\/success\",\n \"total_details\": null,\n \"url\": null\n}'''"},{"nl":"List all Checkout SessionsReturns a list of Checkout Sessions.Parameters payment_intent optional Only return the Checkout Session for the PaymentIntent specified. subscription optional Only return the Checkout Session for the subscription specified.More parametersExpand all customer optional customer_details optional dictionary ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit Checkout Sessions, starting after Checkout Session starting_after. Each entry in the array is a separate Checkout Session object. If no more Checkout Sessions are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.checkout.Session.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/checkout\/sessions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\",\n \"object\": \"checkout.session\",\n \"after_expiration\": null,\n \"allow_promotion_codes\": null,\n \"amount_subtotal\": null,\n \"amount_total\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_address_collection\": null,\n \"cancel_url\": \"https:\/\/example.com\/cancel\",\n \"client_reference_id\": null,\n \"consent\": null,\n \"consent_collection\": null,\n \"currency\": null,\n \"customer\": null,\n \"customer_creation\": null,\n \"customer_details\": null,\n \"customer_email\": null,\n \"expires_at\": 1659518871,\n \"livemode\": false,\n \"locale\": null,\n \"metadata\": {},\n \"mode\": \"payment\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_link\": null,\n \"payment_method_options\": {},\n \"payment_method_types\": [\n \"card\"\n ],\n \"payment_status\": \"unpaid\",\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"recovered_from\": null,\n \"redaction\": null,\n \"setup_intent\": null,\n \"shipping_address_collection\": null,\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"shipping_options\": [],\n \"status\": \"expired\",\n \"submit_type\": null,\n \"subscription\": null,\n \"success_url\": \"https:\/\/example.com\/success\",\n \"total_details\": null,\n \"url\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a Checkout Session's line itemsWhen retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit Checkout Session line items, starting after Line Item starting_after. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nline_items = stripe.checkout.Session.list_line_items('cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I', limit=5)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/checkout\/sessions\/cs_test_a15vFKPu138xjcETgEZfTyxnbkKfnzQK1lY1QsG5fRTht29TiQtRu6BG2I\/line_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"li_1LSdrn2eZvKYlo2C0Ue410Gc\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 0,\n \"amount_tax\": 0,\n \"amount_total\": 0,\n \"currency\": \"usd\",\n \"description\": \"auto topup addtional_viewer\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"quantity\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Payment LinkA payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.When a customer opens a payment link it will open a new checkout session to render the payment page. You can use checkout session events to track payments through payment links.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/payment_links\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_links\/:id\u00a0\u00a0POST\u00a0\/v1\/payment_links\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_links\u00a0\u00a0\u00a0GET\u00a0\/v1\/payment_links\/:id\/line_items\n'''"},{"nl":"The payment link objectAttributes id string Unique identifier for the object. active boolean Whether the payment link\u2019s url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated. line_items list expandable The line items representing what is being sold. This field is not included by default. To include it in the response, expand the line_items field.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. payment_method_types array of enum values The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you\u2019ve enabled in your payment method settings.Possible enum valuescard affirm promptpay bacs_debit bancontact blik boleto Show 17 more url string The public URL that can be shared with customers.More attributesExpand all object string, value is \"payment_link\" after_completion hash allow_promotion_codes boolean application_fee_amount integer Connect only application_fee_percent decimal Connect only automatic_tax hash billing_address_collection enum consent_collection hash currency currency preview feature customer_creation enum livemode boolean on_behalf_of string expandable Connect only payment_intent_data hash phone_number_collection hash shipping_address_collection hash shipping_options array of hashes submit_type enum subscription_data hash tax_id_collection hash transfer_data hash Connect only","code":"'''The payment link object {\n \"id\": \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n \"object\": \"payment_link\",\n \"active\": true,\n \"after_completion\": {\n \"hosted_confirmation\": {\n \"custom_message\": null\n },\n \"type\": \"hosted_confirmation\"\n },\n \"allow_promotion_codes\": false,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_address_collection\": \"auto\",\n \"consent_collection\": null,\n \"currency\": \"usd\",\n \"customer_creation\": \"always\",\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"payment_intent_data\": null,\n \"payment_method_types\": null,\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"shipping_address_collection\": null,\n \"shipping_options\": [],\n \"submit_type\": \"auto\",\n \"subscription_data\": null,\n \"tax_id_collection\": {\n \"enabled\": false\n },\n \"transfer_data\": null,\n \"url\": \"https:\/\/buy.stripe.com\/test_5kAcPyarJaIPaQg4gg\"\n}\n'''"},{"nl":"Create a payment linkCreates a payment link.Parameters line_items required The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.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. Metadata associated with this Payment Link will automatically be copied to checkout sessions created by this payment link. payment_method_types optional enum The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your payment method settings (20+ payment methods supported).Possible enum valuescard affirm promptpay bacs_debit bancontact blik boleto Show 17 moreMore parametersExpand all after_completion optional dictionary allow_promotion_codes optional application_fee_amount optional Connect only application_fee_percent optional Connect only automatic_tax optional dictionary billing_address_collection optional enum consent_collection optional dictionary currency optional preview feature customer_creation optional enum on_behalf_of optional Connect only payment_intent_data optional dictionary phone_number_collection optional dictionary shipping_address_collection optional dictionary shipping_options optional array of hashes submit_type optional enum subscription_data optional dictionary tax_id_collection optional dictionary transfer_data optional dictionary Connect only ReturnsReturns the payment link","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentLink.create(\n line_items=[\n {\n \"price\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"quantity\": 1,\n },\n ],\n)\n'''Response {\n \"id\": \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n \"object\": \"payment_link\",\n \"active\": true,\n \"after_completion\": {\n \"hosted_confirmation\": {\n \"custom_message\": null\n },\n \"type\": \"hosted_confirmation\"\n },\n \"allow_promotion_codes\": false,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_address_collection\": \"auto\",\n \"consent_collection\": null,\n \"currency\": \"usd\",\n \"customer_creation\": \"always\",\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"payment_intent_data\": null,\n \"payment_method_types\": null,\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"shipping_address_collection\": null,\n \"shipping_options\": [],\n \"submit_type\": \"auto\",\n \"subscription_data\": null,\n \"tax_id_collection\": {\n \"enabled\": false\n },\n \"transfer_data\": null,\n \"url\": \"https:\/\/buy.stripe.com\/test_5kAcPyarJaIPaQg4gg\"\n}'''"},{"nl":"Retrieve payment linkRetrieve a payment link.ParametersNo parameters.ReturnsReturns the payment link","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentLink.retrieve(\n \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n)\n'''Response {\n \"id\": \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n \"object\": \"payment_link\",\n \"active\": true,\n \"after_completion\": {\n \"hosted_confirmation\": {\n \"custom_message\": null\n },\n \"type\": \"hosted_confirmation\"\n },\n \"allow_promotion_codes\": false,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_address_collection\": \"auto\",\n \"consent_collection\": null,\n \"currency\": \"usd\",\n \"customer_creation\": \"always\",\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"payment_intent_data\": null,\n \"payment_method_types\": null,\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"shipping_address_collection\": null,\n \"shipping_options\": [],\n \"submit_type\": \"auto\",\n \"subscription_data\": null,\n \"tax_id_collection\": {\n \"enabled\": false\n },\n \"transfer_data\": null,\n \"url\": \"https:\/\/buy.stripe.com\/test_5kAcPyarJaIPaQg4gg\"\n}'''"},{"nl":"Update a payment linkUpdates a payment link.Parameters active optional Whether the payment link\u2019s url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated. line_items optional array of hashes The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.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. Metadata associated with this Payment Link will automatically be copied to checkout sessions created by this payment link. payment_method_types optional enum The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your payment method settings.Possible enum valuescard affirm promptpay bacs_debit bancontact blik boleto Show 17 moreMore parametersExpand all after_completion optional dictionary allow_promotion_codes optional automatic_tax optional dictionary billing_address_collection optional enum customer_creation optional enum shipping_address_collection optional dictionary ReturnsUpdated payment link","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentLink.modify(\n \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n active=False,\n)\n'''Response {\n \"id\": \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n \"object\": \"payment_link\",\n \"active\": false,\n \"after_completion\": {\n \"hosted_confirmation\": {\n \"custom_message\": null\n },\n \"type\": \"hosted_confirmation\"\n },\n \"allow_promotion_codes\": false,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_address_collection\": \"auto\",\n \"consent_collection\": null,\n \"currency\": \"usd\",\n \"customer_creation\": \"always\",\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"payment_intent_data\": null,\n \"payment_method_types\": null,\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"shipping_address_collection\": null,\n \"shipping_options\": [],\n \"submit_type\": \"auto\",\n \"subscription_data\": null,\n \"tax_id_collection\": {\n \"enabled\": false\n },\n \"transfer_data\": null,\n \"url\": \"https:\/\/buy.stripe.com\/test_5kAcPyarJaIPaQg4gg\"\n}'''"},{"nl":"List all payment linksReturns a list of your payment links.Parameters active optional Only return payment links that are active or inactive (e.g., pass false to list all inactive payment links).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 payment links, starting after payment link starting_after. Each entry in the array is a separate payment link object. If no more payment links are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.PaymentLink.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/payment_links\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"plink_1LSdsx2eZvKYlo2CdmenOg9N\",\n \"object\": \"payment_link\",\n \"active\": true,\n \"after_completion\": {\n \"hosted_confirmation\": {\n \"custom_message\": null\n },\n \"type\": \"hosted_confirmation\"\n },\n \"allow_promotion_codes\": false,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_address_collection\": \"auto\",\n \"consent_collection\": null,\n \"currency\": \"usd\",\n \"customer_creation\": \"always\",\n \"livemode\": false,\n \"metadata\": {},\n \"on_behalf_of\": null,\n \"payment_intent_data\": null,\n \"payment_method_types\": null,\n \"phone_number_collection\": {\n \"enabled\": false\n },\n \"shipping_address_collection\": null,\n \"shipping_options\": [],\n \"submit_type\": \"auto\",\n \"subscription_data\": null,\n \"tax_id_collection\": {\n \"enabled\": false\n },\n \"transfer_data\": null,\n \"url\": \"https:\/\/buy.stripe.com\/test_5kAcPyarJaIPaQg4gg\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a payment link's line itemsWhen retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit payment link line items, starting after Line Item starting_after. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nline_items = stripe.PaymentLink.list_line_items('plink_1LSdsx2eZvKYlo2CdmenOg9N', limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/payment_links\/plink_1LSdsx2eZvKYlo2CdmenOg9N\/line_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"li_1LSdsx2eZvKYlo2C8QCXS44I\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 0,\n \"amount_tax\": 0,\n \"amount_total\": 0,\n \"currency\": \"usd\",\n \"description\": \"auto topup addtional_viewer\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"quantity\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Credit NoteIssue a credit note to adjust an invoice's amount after the invoice is finalized.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/credit_notes\/preview\u00a0\u00a0POST\u00a0\/v1\/credit_notes\u00a0\u00a0\u00a0GET\u00a0\/v1\/credit_notes\/:id\u00a0\u00a0POST\u00a0\/v1\/credit_notes\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/credit_notes\/:credit_note\/lines\u00a0\u00a0\u00a0GET\u00a0\/v1\/credit_notes\/preview\/lines\u00a0\u00a0POST\u00a0\/v1\/credit_notes\/:id\/void\u00a0\u00a0\u00a0GET\u00a0\/v1\/credit_notes\n'''"},{"nl":"The credit note objectAttributes id string Unique identifier for the object. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. invoice string expandable ID of the invoice. lines list Line items that make up the credit noteShow child attributes memo string Customer-facing text that appears on the credit note PDF. 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. reason string Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory status string Status of this credit note, one of issued or void. Learn more about voiding credit notes. subtotal integer The integer amount in pence representing the amount of the credit note, excluding exclusive tax and invoice level discounts. total integer The integer amount in pence representing the total amount of the credit note, including tax and all discount.More attributesExpand all object string, value is \"credit_note\" amount integer created timestamp customer string expandable customer_balance_transaction string expandable discount_amount integer Deprecated discount_amounts array of hashes livemode boolean number string out_of_band_amount integer pdf string refund string expandable subtotal_excluding_tax integer tax_amounts array of hashes total_excluding_tax integer type string voided_at timestamp","code":"'''The credit note object {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {},\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"issued\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": null\n}\n'''"},{"nl":"The (Credit Note) line item objectAttributes id string Unique identifier for the object. object string, value is \"credit_note_line_item\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer The integer amount in pence representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. amount_excluding_tax integer The integer amount in pence representing the amount being credited for this line item, excluding all tax and discounts. description string Description of the item being credited. discount_amount integer Deprecated The integer amount in pence representing the discount being credited for this line item. discount_amounts array of hashes The amount of discount calculated per discount for this line itemShow child attributes invoice_line_item string ID of the invoice line item being credited livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. quantity integer The number of units of product being credited. tax_amounts array of hashes The amount of tax calculated per tax rate for this line itemShow child attributes tax_rates array of hashes The tax rates which apply to the line item.Show child attributes type string The type of the credit note line item, one of invoice_line_item or custom_line_item. When the type is invoice_line_item there is an additional invoice_line_item property on the resource the value of which is the id of the credited line item on the invoice. unit_amount integer The cost of each unit of product being credited. unit_amount_decimal decimal string Same as unit_amount, but contains a decimal value with at most 12 decimal places. unit_amount_excluding_tax decimal string The amount in pence representing the unit amount being credited for this line item, excluding all tax and discounts","code":"'''The (Credit Note) line item object {\n \"id\": \"cnli_1LSdbA2eZvKYlo2CIWP5viuG\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2CH1Ktfo7J\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"300\"\n}\n'''"},{"nl":"Preview a credit noteGet a preview of a credit note without creating it.Parameters invoice required ID of the invoice. lines optional array of hashes Line items that make up the credit note.Show child parameters memo optional The credit note\u2019s memo appears on the credit note PDF. 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. reason optional Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactoryMore parametersExpand all amount optional credit_amount optional out_of_band_amount optional refund optional refund_amount optional ReturnsReturns a credit note object","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.preview(\n invoice=\"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n lines=[\n {\n \"type\": \"invoice_line_item\",\n \"invoice_line_item\":\n \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"quantity\": 1,\n },\n ],\n)\n'''Response {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {},\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"issued\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": null\n}'''"},{"nl":"Create a credit noteIssue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces\nits amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result\nin any combination of the following:\n\nRefund: create a new refund (using refund_amount) or link an existing refund (using refund).\nCustomer balance credit: credit the customer\u2019s balance (using credit_amount) which will be automatically applied to their next invoice when it\u2019s finalized.\nOutside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).\n\nFor post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.\nYou may issue multiple credit notes for an invoice. Each credit note will increment the invoice\u2019s pre_payment_credit_notes_amount\nor post_payment_credit_notes_amount depending on its status at the time of credit note creation.Parameters invoice required ID of the invoice. lines optional array of hashes Line items that make up the credit note.Show child parameters memo optional The credit note\u2019s memo appears on the credit note PDF. 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. reason optional Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactoryMore parametersExpand all amount optional credit_amount optional out_of_band_amount optional refund optional refund_amount optional ReturnsReturns a credit note object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.create(\n invoice=\"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n lines=[\n {\n \"type\": \"invoice_line_item\",\n \"invoice_line_item\":\n \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"quantity\": 1,\n },\n ],\n)\n'''Response {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {},\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"issued\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": null\n}'''"},{"nl":"Retrieve a credit noteRetrieves the credit note object with the given identifier.ParametersNo parameters.ReturnsReturns a credit note object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.retrieve(\n \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n)\n'''Response {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {},\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"issued\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": null\n}'''"},{"nl":"Update a credit noteUpdates an existing credit note.Parameters memo optional Credit note memo. 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 updated credit note object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.modify(\n \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"issued\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": null\n}'''"},{"nl":"Retrieve a credit note's line itemsWhen retrieving a credit note, you\u2019ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns a list of line_item objects","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\ncredit_note = stripe.CreditNote.retrieve('cn_1LSdb92eZvKYlo2C0JdIQVHd')\nlines = credit_note.lines.list(limit=5)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cnli_1LSdbA2eZvKYlo2CIWP5viuG\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2CH1Ktfo7J\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"300\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a credit note preview's line itemsWhen retrieving a credit note preview, you\u2019ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.Parameters invoice required ID of the invoice. lines optional array of hashes Line items that make up the credit note.Show child parameters memo optional The credit note\u2019s memo appears on the credit note PDF. 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. reason optional Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactoryMore parametersExpand all amount optional credit_amount optional ending_before optional limit optional out_of_band_amount optional refund optional refund_amount optional starting_after optional ReturnsReturns a list of line_item objects","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.preview(\n invoice=\"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n lines=[\n {\n \"type\": \"invoice_line_item\",\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"quantity\": 1,\n },\n ],\n)\ncredit_note = stripe.CreditNote.retrieve('cn_1LSdb92eZvKYlo2C0JdIQVHd')\nlines = credit_note.lines.list(limit=5)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/credit_notes\/preview\/lines\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cnli_1LSdbA2eZvKYlo2CIWP5viuG\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2CH1Ktfo7J\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"300\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Void a credit noteMarks a credit note as void. Learn more about voiding credit notes.ParametersNo parameters.ReturnsReturns the voided credit note object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.void_credit_note(\n \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n)\n'''Response {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {},\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"void\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": 1659517840\n}'''"},{"nl":"List all credit notesReturns a list of credit notes.Parameters invoice optional Only return credit notes for the invoice specified by this invoice ID.More parametersExpand all customer optional ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit credit notes, starting after credit note starting_after. Each entry in the array is a separate credit note object. If no more credit notes are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.CreditNote.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/credit_notes\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cn_1LSdb92eZvKYlo2C0JdIQVHd\",\n \"object\": \"credit_note\",\n \"amount\": 857,\n \"created\": 1659517839,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_balance_transaction\": null,\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice\": \"in_1LSdb92eZvKYlo2CJvl4iJuW\",\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2Cu4lDIS7X\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 357,\n \"amount_excluding_tax\": 357,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"invoice_line_item\": \"il_1LSdb92eZvKYlo2Cg5Kr2nEp\",\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"tax_rates\": [\n {\n \"id\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\",\n \"object\": \"tax_rate\",\n \"active\": true,\n \"country\": \"DE\",\n \"created\": 1659517839,\n \"description\": \"VAT Germany\",\n \"display_name\": \"VAT\",\n \"inclusive\": false,\n \"jurisdiction\": \"DE\",\n \"livemode\": false,\n \"metadata\": {},\n \"percentage\": 19.0,\n \"state\": null,\n \"tax_type\": \"vat\"\n }\n ],\n \"type\": \"invoice_line_item\",\n \"unit_amount\": null,\n \"unit_amount_decimal\": null,\n \"unit_amount_excluding_tax\": \"357\"\n },\n {\n \"id\": \"cnli_1LSdb92eZvKYlo2C9yhKwMbp\",\n \"object\": \"credit_note_line_item\",\n \"amount\": 500,\n \"amount_excluding_tax\": 500,\n \"description\": \"Service credit\",\n \"discount_amount\": 0,\n \"discount_amounts\": [],\n \"livemode\": false,\n \"quantity\": 1,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"custom_line_item\",\n \"unit_amount\": 500,\n \"unit_amount_decimal\": \"500\",\n \"unit_amount_excluding_tax\": \"500\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/credit_notes\/cn_1LSdb92eZvKYlo2C0JdIQVHd\/lines\"\n },\n \"livemode\": false,\n \"memo\": null,\n \"metadata\": {},\n \"number\": \"ABCD-1234-CN-01\",\n \"out_of_band_amount\": null,\n \"pdf\": \"https:\/\/pay.stripe.com\/credit_notes\/acct_1032D82eZvKYlo2C\/cnst_123456789\/pdf?s=ap\",\n \"reason\": null,\n \"refund\": null,\n \"status\": \"issued\",\n \"subtotal\": 857,\n \"subtotal_excluding_tax\": 857,\n \"tax_amounts\": [\n {\n \"amount\": 57,\n \"inclusive\": false,\n \"tax_rate\": \"txr_1LSdb92eZvKYlo2CboQRs5G6\"\n }\n ],\n \"total\": 857,\n \"total_excluding_tax\": null,\n \"type\": \"pre_payment\",\n \"voided_at\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Customer Balance TransactionEach customer has a balance value,\nwhich denotes a debit or credit that's automatically applied to their next invoice upon finalization.\nYou may modify the value directly by using the update customer API,\nor by creating a Customer Balance Transaction, which increments or decrements the customer's balance by the specified amount.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/balance_transactions\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/balance_transactions\/:id\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/balance_transactions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/balance_transactions\n'''"},{"nl":"The customer balance transaction objectAttributes id string Unique identifier for the object. amount integer The amount of the transaction. A negative value is a credit for the customer\u2019s balance, and a positive value is a debit to the customer\u2019s balance. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable The ID of the customer the transaction belongs to. description string An arbitrary string attached to the object. Often useful for displaying to users. ending_balance integer The customer\u2019s balance after the transaction was applied. A negative value decreases the amount due on the customer\u2019s next invoice. A positive value increases the amount due on the customer\u2019s next invoice. 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. type string Transaction type: adjustment, applied_to_invoice, credit_note, initial, invoice_too_large, invoice_too_small, unspent_receiver_credit, or unapplied_from_invoice. See the Customer Balance page to learn more about transaction types.More attributesExpand all object string, value is \"customer_balance_transaction\" created timestamp credit_note string expandable invoice string expandable livemode boolean","code":"'''The customer balance transaction object {\n \"id\": \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n \"object\": \"customer_balance_transaction\",\n \"amount\": -500,\n \"created\": 1659519645,\n \"credit_note\": null,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"description\": null,\n \"ending_balance\": -500,\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": null,\n \"type\": \"adjustment\"\n}\n'''"},{"nl":"Create a customer balance transactionCreates an immutable transaction that updates the customer\u2019s credit balance.Parameters amount required The integer amount in cents to apply to the customer\u2019s credit balance. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. If the customer\u2019s currency is set, this value must match it. If the customer\u2019s currency is not set, it will be updated to this value. 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 a customer balance transaction object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.create_balance_transaction(\n \"cus_8TEMHVY5moxIPI\",\n amount=-500,\n currency=\"usd\",\n)\n'''Response {\n \"id\": \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n \"object\": \"customer_balance_transaction\",\n \"amount\": -500,\n \"created\": 1659519645,\n \"credit_note\": null,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"description\": null,\n \"ending_balance\": -500,\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": null,\n \"type\": \"adjustment\"\n}'''"},{"nl":"Retrieve a customer balance transactionRetrieves a specific customer balance transaction that updated the customer\u2019s balances.ParametersNo parameters.ReturnsReturns a customer balance transaction object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve_balance_transaction(\n \"cus_8TEMHVY5moxIPI\",\n \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n)\n'''Response {\n \"id\": \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n \"object\": \"customer_balance_transaction\",\n \"amount\": -500,\n \"created\": 1659519645,\n \"credit_note\": null,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"description\": null,\n \"ending_balance\": -500,\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": null,\n \"type\": \"adjustment\"\n}'''"},{"nl":"Update a customer credit balance transactionMost credit balance transaction fields are immutable, but you may update its description and metadata.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 a customer balance transaction object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.modify_balance_transaction(\n \"cus_8TEMHVY5moxIPI\",\n \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n \"object\": \"customer_balance_transaction\",\n \"amount\": -500,\n \"created\": 1659519645,\n \"credit_note\": null,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"description\": null,\n \"ending_balance\": -500,\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"type\": \"adjustment\"\n}'''"},{"nl":"List customer balance transactionsReturns a list of transactions that updated the customer\u2019s balances.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit customer balance transactions, starting after item starting_after. Each entry in the array is a separate customer balance transaction object. If no more items are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_balance_transactions(\n \"cus_8TEMHVY5moxIPI\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/customer_balance_transactions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"cbtxn_1LSe4H2eZvKYlo2CfH2vNRxz\",\n \"object\": \"customer_balance_transaction\",\n \"amount\": -500,\n \"created\": 1659519645,\n \"credit_note\": null,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"description\": null,\n \"ending_balance\": -500,\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": null,\n \"type\": \"adjustment\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Customer PortalThe Billing customer portal is a Stripe-hosted UI for subscription and\nbilling management.A portal configuration describes the functionality and features that you\nwant to provide to your customers through the portal.A portal session describes the instantiation of the customer portal for\na particular customer. By visiting the session's URL, the customer\ncan manage their subscriptions and billing details. For security reasons,\nsessions are short-lived and will expire if the customer does not visit the URL.\nCreate sessions on-demand when customers intend to manage their subscriptions\nand billing details.Learn more in the integration guide","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/billing_portal\/sessions\u00a0\u00a0POST\u00a0\/v1\/billing_portal\/configurations\u00a0\u00a0POST\u00a0\/v1\/billing_portal\/configurations\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/billing_portal\/configurations\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/billing_portal\/configurations\n'''"},{"nl":"The portal session objectAttributes id string Unique identifier for the object. object string, value is \"billing_portal.session\" String representing the object\u2019s type. Objects of the same type share the same value. configuration string expandable The configuration used by this session, describing the features available. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. customer string The ID of the customer for this session. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. locale enum The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer\u2019s preferred_locales or browser\u2019s locale is used.Possible enum valuesauto bg cs da de el en Show 40 more on_behalf_of string Connect only The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account\u2019s branding settings, which the portal displays. return_url string The URL to redirect customers to when they click on the portal\u2019s link to return to your website. url string The short-lived URL of the session that gives customers access to the customer portal","code":"'''The portal session object {\n \"id\": \"bps_1LSdxb2eZvKYlo2Cugji56Uy\",\n \"object\": \"billing_portal.session\",\n \"configuration\": \"bpc_1LSdxb2eZvKYlo2CdKPl5uH4\",\n \"created\": 1659519231,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": true,\n \"locale\": null,\n \"on_behalf_of\": null,\n \"return_url\": \"https:\/\/example.com\/account\",\n \"url\": \"https:\/\/billing.stripe.com\/session\/{SESSION_SECRET}\"\n}\n'''"},{"nl":"The portal configuration objectAttributes id string Unique identifier for the object. object string, value is \"billing_portal.configuration\" String representing the object\u2019s type. Objects of the same type share the same value. active boolean Whether the configuration is active and can be used to create portal sessions. application string expandable \"application\" Connect only ID of the Connect Application that created the configuration. business_profile hash The business information shown to customers in the portal.Show child attributes created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. default_return_url string The default URL to redirect customers to when they click on the portal\u2019s link to return to your website. This can be overriden when creating the session. features hash Information about the features available in the portal.Show child attributes is_default boolean Whether the configuration is the default. If true, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. updated timestamp Time at which the object was last updated. Measured in seconds since the Unix epoch","code":"'''The portal configuration object {\n \"id\": \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n \"object\": \"billing_portal.configuration\",\n \"active\": true,\n \"application\": null,\n \"business_profile\": {\n \"headline\": null,\n \"privacy_policy_url\": \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\": \"https:\/\/example.com\/terms\"\n },\n \"created\": 1659519231,\n \"default_return_url\": null,\n \"features\": {\n \"customer_update\": {\n \"allowed_updates\": [\n \"email\",\n \"tax_id\"\n ],\n \"enabled\": true\n },\n \"invoice_history\": {\n \"enabled\": true\n },\n \"payment_method_update\": {\n \"enabled\": false\n },\n \"subscription_cancel\": {\n \"cancellation_reason\": {\n \"enabled\": false,\n \"options\": []\n },\n \"enabled\": false,\n \"mode\": \"at_period_end\",\n \"proration_behavior\": \"none\"\n },\n \"subscription_pause\": {\n \"enabled\": false\n },\n \"subscription_update\": {\n \"default_allowed_updates\": [],\n \"enabled\": false,\n \"proration_behavior\": \"none\"\n }\n },\n \"is_default\": true,\n \"livemode\": true,\n \"metadata\": null,\n \"updated\": 1659519231\n}\n'''"},{"nl":"Create a portal sessionCreates a session of the customer portal.Parameters customer required The ID of an existing customer. configuration optional The ID of an existing configuration to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. locale optional enum The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer\u2019s preferred_locales or browser\u2019s locale is used.Possible enum valuesauto bg cs da de el en Show 40 more on_behalf_of optional Connect only The on_behalf_of account to use for this session. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account\u2019s branding settings, which the portal displays. return_url optional The default URL to redirect customers to when they click on the portal\u2019s link to return to your website.ReturnsReturns a portal session object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.billing_portal.Session.create(\n customer=\"cus_8TEMHVY5moxIPI\",\n return_url=\"https:\/\/example.com\/account\",\n)\n'''Response {\n \"id\": \"bps_1LSdxb2eZvKYlo2Cugji56Uy\",\n \"object\": \"billing_portal.session\",\n \"configuration\": \"bpc_1LSdxb2eZvKYlo2CdKPl5uH4\",\n \"created\": 1659519231,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": true,\n \"locale\": null,\n \"on_behalf_of\": null,\n \"return_url\": \"https:\/\/example.com\/account\",\n \"url\": \"https:\/\/billing.stripe.com\/session\/{SESSION_SECRET}\"\n}'''"},{"nl":"Create a portal configurationCreates a configuration that describes the functionality and behavior of a PortalSessionParameters business_profile required The business information shown to customers in the portal.Show child parameters features required Information about the features available in the portal.Show child parameters default_return_url optional The default URL to redirect customers to when they click on the portal\u2019s link to return to your website. This can be overriden when creating the session. 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 a portal configuration object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.billing_portal.Configuration.create(\n features={\n \"customer_update\": {\n \"allowed_updates\": [\"email\", \"tax_id\"],\n \"enabled\": True,\n },\n \"invoice_history\": {\"enabled\": True},\n },\n business_profile={\n \"privacy_policy_url\":\n \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\":\n \"https:\/\/example.com\/terms\",\n },\n)\n'''Response {\n \"id\": \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n \"object\": \"billing_portal.configuration\",\n \"active\": true,\n \"application\": null,\n \"business_profile\": {\n \"headline\": null,\n \"privacy_policy_url\": \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\": \"https:\/\/example.com\/terms\"\n },\n \"created\": 1659519231,\n \"default_return_url\": null,\n \"features\": {\n \"customer_update\": {\n \"allowed_updates\": [\n \"email\",\n \"tax_id\"\n ],\n \"enabled\": true\n },\n \"invoice_history\": {\n \"enabled\": true\n },\n \"payment_method_update\": {\n \"enabled\": false\n },\n \"subscription_cancel\": {\n \"cancellation_reason\": {\n \"enabled\": false,\n \"options\": []\n },\n \"enabled\": false,\n \"mode\": \"at_period_end\",\n \"proration_behavior\": \"none\"\n },\n \"subscription_pause\": {\n \"enabled\": false\n },\n \"subscription_update\": {\n \"default_allowed_updates\": [],\n \"enabled\": false,\n \"proration_behavior\": \"none\"\n }\n },\n \"is_default\": true,\n \"livemode\": true,\n \"metadata\": null,\n \"updated\": 1659519231,\n \"customer\": \"cus_8TEMHVY5moxIPI\"\n}'''"},{"nl":"Update a portal configurationUpdates a configuration that describes the functionality of the customer portal.Parameters active optional Whether the configuration is active and can be used to create portal sessions. business_profile optional dictionary The business information shown to customers in the portal.Show child parameters default_return_url optional The default URL to redirect customers to when they click on the portal\u2019s link to return to your website. This can be overriden when creating the session. features optional dictionary Information about the features available in the portal.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.ReturnsReturns a portal configuration object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.billing_portal.Configuration.modify(\n \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n business_profile={\n \"privacy_policy_url\":\n \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\":\n \"https:\/\/example.com\/terms\",\n },\n)\n'''Response {\n \"id\": \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n \"object\": \"billing_portal.configuration\",\n \"active\": true,\n \"application\": null,\n \"business_profile\": {\n \"headline\": null,\n \"privacy_policy_url\": \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\": \"https:\/\/example.com\/terms\"\n },\n \"created\": 1659519231,\n \"default_return_url\": null,\n \"features\": {\n \"customer_update\": {\n \"allowed_updates\": [\n \"email\",\n \"tax_id\"\n ],\n \"enabled\": true\n },\n \"invoice_history\": {\n \"enabled\": true\n },\n \"payment_method_update\": {\n \"enabled\": false\n },\n \"subscription_cancel\": {\n \"cancellation_reason\": {\n \"enabled\": false,\n \"options\": []\n },\n \"enabled\": false,\n \"mode\": \"at_period_end\",\n \"proration_behavior\": \"none\"\n },\n \"subscription_pause\": {\n \"enabled\": false\n },\n \"subscription_update\": {\n \"default_allowed_updates\": [],\n \"enabled\": false,\n \"proration_behavior\": \"none\"\n }\n },\n \"is_default\": true,\n \"livemode\": true,\n \"metadata\": null,\n \"updated\": 1659519231,\n \"customer\": \"cus_8TEMHVY5moxIPI\"\n}'''"},{"nl":"Retrieve a portal configurationRetrieves a configuration that describes the functionality of the customer portal.ParametersNo parameters.ReturnsReturns a portal configuration object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.billing_portal.Configuration.retrieve(\n \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n)\n'''Response {\n \"id\": \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n \"object\": \"billing_portal.configuration\",\n \"active\": true,\n \"application\": null,\n \"business_profile\": {\n \"headline\": null,\n \"privacy_policy_url\": \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\": \"https:\/\/example.com\/terms\"\n },\n \"created\": 1659519231,\n \"default_return_url\": null,\n \"features\": {\n \"customer_update\": {\n \"allowed_updates\": [\n \"email\",\n \"tax_id\"\n ],\n \"enabled\": true\n },\n \"invoice_history\": {\n \"enabled\": true\n },\n \"payment_method_update\": {\n \"enabled\": false\n },\n \"subscription_cancel\": {\n \"cancellation_reason\": {\n \"enabled\": false,\n \"options\": []\n },\n \"enabled\": false,\n \"mode\": \"at_period_end\",\n \"proration_behavior\": \"none\"\n },\n \"subscription_pause\": {\n \"enabled\": false\n },\n \"subscription_update\": {\n \"default_allowed_updates\": [],\n \"enabled\": false,\n \"proration_behavior\": \"none\"\n }\n },\n \"is_default\": true,\n \"livemode\": true,\n \"metadata\": null,\n \"updated\": 1659519231\n}'''"},{"nl":"List portal configurationsReturns a list of configurations that describe the functionality of the customer portal.Parameters active optional Only return configurations that are active or inactive (e.g., pass true to only list active configurations). is_default optional Only return the default or non-default configurations (e.g., pass true to only list the default configuration).More parametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns a list of portal configuration objects","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.billing_portal.Configuration.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/billing_portal\/configurations\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"bpc_1LSdxb2eZvKYlo2CcDwiZ8Hp\",\n \"object\": \"billing_portal.configuration\",\n \"active\": true,\n \"application\": null,\n \"business_profile\": {\n \"headline\": null,\n \"privacy_policy_url\": \"https:\/\/example.com\/privacy\",\n \"terms_of_service_url\": \"https:\/\/example.com\/terms\"\n },\n \"created\": 1659519231,\n \"default_return_url\": null,\n \"features\": {\n \"customer_update\": {\n \"allowed_updates\": [\n \"email\",\n \"tax_id\"\n ],\n \"enabled\": true\n },\n \"invoice_history\": {\n \"enabled\": true\n },\n \"payment_method_update\": {\n \"enabled\": false\n },\n \"subscription_cancel\": {\n \"cancellation_reason\": {\n \"enabled\": false,\n \"options\": []\n },\n \"enabled\": false,\n \"mode\": \"at_period_end\",\n \"proration_behavior\": \"none\"\n },\n \"subscription_pause\": {\n \"enabled\": false\n },\n \"subscription_update\": {\n \"default_allowed_updates\": [],\n \"enabled\": false,\n \"proration_behavior\": \"none\"\n }\n },\n \"is_default\": true,\n \"livemode\": true,\n \"metadata\": null,\n \"updated\": 1659519231\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Customer Tax IDsYou can add one or multiple tax IDs to a customer.\nA customer's tax IDs are displayed on invoices and credit notes issued for the customer.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/customers\/:id\/tax_ids\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/tax_ids\/:idDELETE\u00a0\/v1\/customers\/:id\/tax_ids\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/customers\/:id\/tax_ids\n'''"},{"nl":"The tax ID objectAttributes id string Unique identifier for the object. country string Two-letter ISO code representing the country of the tax ID. customer string expandable ID of the customer. type string Type of the tax ID, one of ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tw_vat, ua_vat, us_ein, or za_vat. Note that some legacy tax IDs have type unknown value string Value of the tax ID.More attributesExpand all object string, value is \"tax_id\" created timestamp livemode boolean verification hash","code":"'''The tax ID object {\n \"id\": \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n \"object\": \"tax_id\",\n \"country\": \"DE\",\n \"created\": 123456789,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"type\": \"eu_vat\",\n \"value\": \"DE123456789\",\n \"verification\": {\n \"status\": \"pending\",\n \"verified_address\": null,\n \"verified_name\": null\n }\n}\n'''"},{"nl":"Create a tax IDCreates a new TaxID object for a customer.Parameters type required Type of the tax ID, one of ae_trn, au_abn, au_arn, bg_uic, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, ch_vat, cl_tin, es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, hk_br, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, th_vat, tw_vat, ua_vat, us_ein, or za_vat value required Value of the tax ID.ReturnsThe created TaxID object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.create_tax_id(\n \"cus_8TEMHVY5moxIPI\",\n type=\"eu_vat\",\n value=\"DE123456789\",\n)\n'''Response {\n \"id\": \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n \"object\": \"tax_id\",\n \"country\": \"DE\",\n \"created\": 123456789,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"type\": \"eu_vat\",\n \"value\": \"DE123456789\",\n \"verification\": {\n \"status\": \"pending\",\n \"verified_address\": null,\n \"verified_name\": null\n }\n}'''"},{"nl":"Retrieve a tax IDRetrieves the TaxID object with the given identifier.ParametersNo parameters.ReturnsReturns a TaxID object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.retrieve_tax_id(\n \"cus_8TEMHVY5moxIPI\",\n \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n)\n'''Response {\n \"id\": \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n \"object\": \"tax_id\",\n \"country\": \"DE\",\n \"created\": 123456789,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"type\": \"eu_vat\",\n \"value\": \"DE123456789\",\n \"verification\": {\n \"status\": \"pending\",\n \"verified_address\": null,\n \"verified_name\": null\n }\n}'''"},{"nl":"Delete a tax IDDeletes an existing TaxID object.ParametersNo parameters.ReturnsReturns an object with a deleted parameter on success. If the TaxID object does not exist, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.delete_tax_id(\n \"cus_8TEMHVY5moxIPI\",\n \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n)\n'''Response {\n \"id\": \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n \"object\": \"tax_id\",\n \"deleted\": true\n}'''"},{"nl":"List all tax IDsReturns a list of tax IDs for a customer.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit tax IDs, starting after tax ID starting_after. Each entry in the array is a separate TaxID object. If no more tax IDs are available, the resulting array will be empty. Raises an error if the customer ID is invalid","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Customer.list_tax_ids(\n \"cus_8TEMHVY5moxIPI\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/customers\/cus_8TEMHVY5moxIPI\/tax_ids\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"txi_1LSe4P2eZvKYlo2CBGmuOEro\",\n \"object\": \"tax_id\",\n \"country\": \"DE\",\n \"created\": 123456789,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"livemode\": false,\n \"type\": \"eu_vat\",\n \"value\": \"DE123456789\",\n \"verification\": {\n \"status\": \"pending\",\n \"verified_address\": null,\n \"verified_name\": null\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"InvoicesInvoices are statements of amounts owed by a customer, and are either\ngenerated one-off, or generated periodically from a subscription.They contain invoice items, and proration adjustments\nthat may be caused by subscription upgrades\/downgrades (if necessary).If your invoice is configured to be billed through automatic charges,\nStripe automatically finalizes your invoice and attempts payment. Note\nthat finalizing the invoice,\nwhen automatic, does\nnot happen immediately as the invoice is created. Stripe waits\nuntil one hour after the last webhook was successfully sent (or the last\nwebhook timed out after failing). If you (and the platforms you may have\nconnected to) have no webhooks configured, Stripe waits one hour after\ncreation to finalize the invoice.If your invoice is configured to be billed by sending an email, then based on your\nemail settings,\nStripe will email the invoice to your customer and await payment. These\nemails can contain a link to a hosted page to pay the invoice.Stripe applies any customer credit on the account before determining the\namount due for the invoice (i.e., the amount that will be actually\ncharged). If the amount due for the invoice is less than Stripe's minimum allowed charge\nper currency, the\ninvoice is automatically marked paid, and we add the amount due to the\ncustomer's credit balance which is applied to the next invoice.More details on the customer's credit balance are\nhere.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/invoices\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoices\/:id\u00a0\u00a0POST\u00a0\/v1\/invoices\/:idDELETE\u00a0\/v1\/invoices\/:id\u00a0\u00a0POST\u00a0\/v1\/invoices\/:id\/finalize\u00a0\u00a0POST\u00a0\/v1\/invoices\/:id\/pay\u00a0\u00a0POST\u00a0\/v1\/invoices\/:id\/send\u00a0\u00a0POST\u00a0\/v1\/invoices\/:id\/void\u00a0\u00a0POST\u00a0\/v1\/invoices\/:id\/mark_uncollectible\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoices\/:id\/lines\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoices\/upcoming\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoices\/upcoming\/lines\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoices\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoices\/search\n'''"},{"nl":"The Invoice objectAttributes id string Unique identifier for the object. auto_advance boolean Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice\u2019s state will not automatically advance without an explicit action. charge string expandable ID of the latest charge generated for this invoice, if any. collection_method string Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable The ID of the customer who will be billed. description string An arbitrary string attached to the object. Often useful for displaying to users. Referenced as \u2018memo\u2019 in the Dashboard. hosted_invoice_url string The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. lines list The individual line items that make up the invoice. lines is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.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. payment_intent string expandable The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. period_end timestamp End of the usage period during which invoice items were added to this invoice. period_start timestamp Start of the usage period during which invoice items were added to this invoice. status string The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more subscription string expandable The subscription that this invoice was prepared for, if any. total integer Total after discounts and taxes.More attributesExpand all object string, value is \"invoice\" account_country string account_name string account_tax_ids array containing strings expandable amount_due integer amount_paid integer amount_remaining integer application string expandable \"application\" Connect only application_fee_amount integer Connect only attempt_count positive integer or zero attempted boolean automatic_tax hash billing_reason string created timestamp custom_fields array of hashes customer_address hash customer_email string customer_name string customer_phone string customer_shipping hash customer_tax_exempt string customer_tax_ids array of hashes default_payment_method string expandable default_source string expandable bank account, card, or source (e.g., card) default_tax_rates array of hashes discount hash, discount object Deprecated discounts array containing strings expandable due_date timestamp ending_balance integer footer string invoice_pdf string last_finalization_error hash livemode boolean next_payment_attempt timestamp number string on_behalf_of string expandable Connect only paid boolean paid_out_of_band boolean payment_settings hash post_payment_credit_notes_amount integer pre_payment_credit_notes_amount integer quote string expandable receipt_number string rendering_options hash starting_balance integer statement_descriptor string status_transitions hash subscription_proration_date integer subtotal integer subtotal_excluding_tax integer tax integer test_clock string expandable threshold_reason hash total_discount_amounts array of hashes total_excluding_tax integer total_tax_amounts array of hashes transfer_data hash Connect only webhooks_delivered_at timestamp","code":"'''The Invoice object {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n}\n'''"},{"nl":"The (Invoice) Line Item objectAttributes id string Unique identifier for the object. amount integer The amount, in cents. 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. 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. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created. period hash The period this line_item covers. For subscription line items, this is the subscription period. For prorations, this starts when the proration was calculated, and ends at the period end of the subscription. For invoice items, this is the time at which the invoice item was created or the period of the item.Show child attributes price hash The price of the line item.Show child attributes proration boolean Whether this is a proration. quantity integer The quantity of the subscription, if the line item is a subscription or a proration. type string A string identifying the type of the source of this line item, either an invoiceitem or a subscription.More attributesExpand all object string, value is \"line_item\" amount_excluding_tax integer discount_amounts array of hashes discountable boolean discounts array containing strings expandable invoice_item string livemode boolean proration_details hash subscription string subscription_item string tax_amounts array of hashes tax_rates array of hashes unit_amount_excluding_tax decimal string","code":"'''The (Invoice) Line Item object {\n \"id\": \"il_tmp_1LSdra2eZvKYlo2COW02i0Bc\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdra2eZvKYlo2COW02i0Bc\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518858,\n \"start\": 1659518858\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n}\n'''"},{"nl":"Create an invoiceThis endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.Parameters auto_advance optional Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice\u2019s state will not automatically advance without an explicit action. collection_method optional Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to charge_automatically. customer optional The ID of the customer who will be billed. description optional An arbitrary string attached to the object. Often useful for displaying to users. Referenced as \u2018memo\u2019 in the Dashboard. 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. subscription optional The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if pending_invoice_items_behavior is include. The subscription\u2019s billing cycle and regular subscription events won\u2019t be affected.More parametersExpand all account_tax_ids optional application_fee_amount optional Connect only automatic_tax optional dictionary currency optional custom_fields optional array of hashes days_until_due optional default_payment_method optional default_source optional default_tax_rates optional discounts optional array of hashes due_date optional footer optional on_behalf_of optional Connect only payment_settings optional dictionary pending_invoice_items_behavior optional rendering_options optional dictionary statement_descriptor optional transfer_data optional dictionary Connect only ReturnsReturns the invoice object if there are pending invoice items to invoice.\nRaises an error if there are no pending invoice items or if the customer ID provided is invalid","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.create(\n customer=\"cus_8TEMHVY5moxIPI\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": false,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n}'''"},{"nl":"Retrieve an invoiceRetrieves the invoice with the given ID.ParametersNo parameters.ReturnsReturns an invoice object if a valid invoice ID was provided. Raises an error otherwise.\nThe invoice object contains a lines hash that contains information about the subscriptions and invoice items that have been applied to the invoice, as well as any prorations that Stripe has automatically calculated. Each line on the invoice has an amount attribute that represents the amount actually contributed to the invoice\u2019s total. For invoice items and prorations, the amount attribute is the same as for the invoice item or proration respectively. For subscriptions, the amount may be different from the plan\u2019s regular price depending on whether the invoice covers a trial period or the invoice period differs from the plan\u2019s usual interval.\nThe invoice object has both a subtotal and a total. The subtotal represents the total before any discounts, while the total is the final amount to be charged to the customer after all coupons have been applied.\nThe invoice also has a next_payment_attempt attribute that tells you the next time (as a Unix timestamp) payment for the invoice will be automatically attempted. For invoices with manual payment collection, that have been closed, or that have reached the maximum number of retries (specified in your subscriptions settings), the next_payment_attempt will be None","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.retrieve(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n}'''"},{"nl":"Update an invoiceDraft invoices are fully editable. Once an invoice is finalized,\nmonetary values, as well as collection_method, become uneditable.\nIf you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,\nsending reminders for, or automatically reconciling invoices, pass\nauto_advance=false.Parameters auto_advance optional Controls whether Stripe will perform automatic collection of the invoice. collection_method optional Either charge_automatically or send_invoice. This field can be updated only on draft invoices. description optional An arbitrary string attached to the object. Often useful for displaying to users. Referenced as \u2018memo\u2019 in the Dashboard. 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_tax_ids optional application_fee_amount optional Connect only automatic_tax optional dictionary custom_fields optional array of hashes days_until_due optional default_payment_method optional default_source optional default_tax_rates optional discounts optional array of hashes due_date optional footer optional on_behalf_of optional Connect only payment_settings optional dictionary rendering_options optional dictionary statement_descriptor optional transfer_data optional dictionary Connect only ReturnsReturns the invoice object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.modify(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n}'''"},{"nl":"Delete a draft invoicePermanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.ParametersNo parameters.ReturnsA successfully deleted invoice. Otherwise, this call raises an error, such as if the invoice has already been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.delete(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"deleted\": true\n}'''"},{"nl":"Finalize an invoiceStripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you\u2019d like to finalize a draft invoice manually, you can do so using this method.Parameters auto_advance optional Controls whether Stripe will perform automatic collection of the invoice. When false, the invoice\u2019s state will not automatically advance without an explicit action.ReturnsReturns an invoice object with status=open","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.finalize_invoice(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"open\",\n \"status_transitions\": {\n \"finalized_at\": 1659518858,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": 1659518858,\n \"closed\": false,\n \"issued_at\": 1659518858\n}'''"},{"nl":"Pay an invoiceStripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you\u2019d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.ParametersExpand all forgive optional mandate optional off_session optional paid_out_of_band optional payment_method optional source optional ReturnsReturns the invoice object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.pay(\"in_1LSdrX2eZvKYlo2Cy1kxMopu\")\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": true,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": \"ch_3LSdrX2eZvKYlo2C0Gaq4Obr\",\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": true,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"paid\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null,\n \"last_payment_attempt\": null\n}'''"},{"nl":"Send an invoice for manual paymentStripe will automatically send invoices to customers according to your subscriptions settings. However, if you\u2019d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.\nRequests made in test-mode result in no emails being sent, despite sending an invoice.sent event.ParametersNo parameters.ReturnsReturns the invoice object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.send_invoice(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"send_invoice\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"open\",\n \"status_transitions\": {\n \"finalized_at\": 1659518858.39303,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n}'''"},{"nl":"Void an invoiceMark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.ParametersNo parameters.ReturnsReturns the voided invoice object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.void_invoice(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": false,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"void\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null,\n \"closed\": true,\n \"forgiven\": false\n}'''"},{"nl":"Mark an invoice as uncollectibleMarking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.ParametersNo parameters.ReturnsReturns the invoice object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.mark_uncollectible(\n \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n)\n'''Response {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": false,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"uncollectible\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null,\n \"closed\": true,\n \"forgiven\": true\n}'''"},{"nl":"Retrieve an invoice's line itemsWhen retrieving an invoice, you\u2019ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns a list of line_item objects","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\ninvoice = stripe.Invoice.retrieve('in_1LSdrX2eZvKYlo2Cy1kxMopu')\nlines = invoice.lines.list(limit=5)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"il_tmp_1LSdra2eZvKYlo2COW02i0Bc\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdra2eZvKYlo2COW02i0Bc\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518858,\n \"start\": 1659518858\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve an upcoming invoiceAt any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.\nNote that when you are viewing an upcoming invoice, you are simply viewing a preview \u2013 the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer\u2019s discount.\nYou can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.Parameters customer Required if subscription unset The identifier of the customer whose upcoming invoice you\u2019d like to retrieve. subscription optional The identifier of the subscription for which you\u2019d like to retrieve the upcoming invoice. If not provided, but a subscription_items is provided, you will preview creating a subscription with those items. If neither subscription nor subscription_items is provided, you will retrieve the next upcoming invoice from among the customer\u2019s subscriptions.More parametersExpand all customer_details Required if subscription and customer unset automatic_tax optional dictionary coupon optional currency optional discounts optional array of hashes invoice_items optional array of hashes schedule optional subscription_billing_cycle_anchor optional subscription_cancel_at optional subscription_cancel_at_period_end optional subscription_cancel_now optional subscription_default_tax_rates optional subscription_items optional array of hashes subscription_proration_behavior optional subscription_proration_date optional subscription_start_date optional subscription_trial_end optional subscription_trial_from_plan optional ReturnsReturns an invoice if valid customer information is provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.upcoming(\n customer='cus_8TEMHVY5moxIPI',\n)\n'''Response {\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/upcoming\/lines?customer=cu_18CHts2eZvKYlo2CbmAAQORe\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": null,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n}'''"},{"nl":"Retrieve an upcoming invoice's line itemsWhen retrieving an upcoming invoice, you\u2019ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.Parameters customer Required if subscription unset The identifier of the customer whose upcoming invoice you\u2019d like to retrieve. subscription optional The identifier of the subscription for which you\u2019d like to retrieve the upcoming invoice. If not provided, but a subscription_items is provided, you will preview creating a subscription with those items. If neither subscription nor subscription_items is provided, you will retrieve the next upcoming invoice from among the customer\u2019s subscriptions.More parametersExpand all customer_details Required if subscription and customer unset automatic_tax optional dictionary coupon optional currency optional discounts optional array of hashes ending_before optional invoice_items optional array of hashes limit optional schedule optional starting_after optional subscription_billing_cycle_anchor optional subscription_cancel_at optional subscription_cancel_at_period_end optional subscription_cancel_now optional subscription_default_tax_rates optional subscription_items optional array of hashes subscription_proration_behavior optional subscription_proration_date optional subscription_start_date optional subscription_trial_end optional subscription_trial_from_plan optional ReturnsReturns a list of line_item objects","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\ninvoice = stripe.Invoice.upcoming(\n customer='cus_8TEMHVY5moxIPI',\n)\ninvoice.lines.list(limit=5)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/invoices\/upcoming\/lines\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"il_tmp_1LSdra2eZvKYlo2COW02i0Bc\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdra2eZvKYlo2COW02i0Bc\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518858,\n \"start\": 1659518858\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"List all invoicesYou can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.Parameters customer optional Only return invoices for the customer specified by this customer ID. status optional The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more subscription optional Only return invoices for the subscription specified by this subscription ID.More parametersExpand all collection_method optional created optional dictionary due_date optional dictionary ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array invoice attachments,","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/invoices\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 300,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Search invoicesSearch for invoices you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for invoices. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit invoices. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Invoice.search(\n query=\"total>999 AND metadata['order_id']:'6735'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/invoices\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"in_1LSdrX2eZvKYlo2Cy1kxMopu\",\n \"object\": \"invoice\",\n \"account_country\": \"US\",\n \"account_name\": \"Stripe.com\",\n \"account_tax_ids\": null,\n \"amount_due\": 300,\n \"amount_paid\": 0,\n \"amount_remaining\": 300,\n \"application\": null,\n \"application_fee_amount\": null,\n \"attempt_count\": 0,\n \"attempted\": false,\n \"auto_advance\": true,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_reason\": \"manual\",\n \"charge\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1659518855,\n \"currency\": \"usd\",\n \"custom_fields\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"customer_address\": null,\n \"customer_email\": \"ava.anderson.22@example.com\",\n \"customer_name\": null,\n \"customer_phone\": null,\n \"customer_shipping\": null,\n \"customer_tax_exempt\": \"none\",\n \"customer_tax_ids\": [],\n \"default_payment_method\": null,\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"discounts\": [],\n \"due_date\": null,\n \"ending_balance\": null,\n \"footer\": null,\n \"hosted_invoice_url\": null,\n \"invoice_pdf\": null,\n \"last_finalization_error\": null,\n \"lines\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"il_1LSdrX2eZvKYlo2CwVfODzHa\",\n \"object\": \"line_item\",\n \"amount\": 300,\n \"amount_excluding_tax\": 300,\n \"currency\": \"usd\",\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discount_amounts\": [],\n \"discountable\": true,\n \"discounts\": [],\n \"invoice_item\": \"ii_1LSdrX2eZvKYlo2Crz8rasOM\",\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659518855,\n \"start\": 1659518855\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"proration_details\": {\n \"credited_items\": null\n },\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_amounts\": [],\n \"tax_rates\": [],\n \"type\": \"invoiceitem\",\n \"unit_amount_excluding_tax\": \"300\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/invoices\/in_1LSdrX2eZvKYlo2Cy1kxMopu\/lines\"\n },\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_payment_attempt\": 1659522455,\n \"number\": null,\n \"on_behalf_of\": null,\n \"paid\": false,\n \"paid_out_of_band\": false,\n \"payment_intent\": null,\n \"payment_settings\": {\n \"default_mandate\": null,\n \"payment_method_options\": null,\n \"payment_method_types\": null\n },\n \"period_end\": 1659518855,\n \"period_start\": 1659518855,\n \"post_payment_credit_notes_amount\": 0,\n \"pre_payment_credit_notes_amount\": 0,\n \"quote\": null,\n \"receipt_number\": null,\n \"redaction\": null,\n \"rendering_options\": null,\n \"starting_balance\": 0,\n \"statement_descriptor\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"finalized_at\": null,\n \"marked_uncollectible_at\": null,\n \"paid_at\": null,\n \"voided_at\": null\n },\n \"subscription\": null,\n \"subtotal\": 300,\n \"subtotal_excluding_tax\": 300,\n \"tax\": null,\n \"test_clock\": null,\n \"total\": 1000,\n \"total_discount_amounts\": [],\n \"total_excluding_tax\": 300,\n \"total_tax_amounts\": [],\n \"transfer_data\": null,\n \"webhooks_delivered_at\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Invoice ItemsSometimes you want to add a charge or credit to a customer, but actually\ncharge or credit the customer's card only at the end of a regular billing\ncycle. This is useful for combining several charges (to minimize\nper-transaction fees), or for having Stripe tabulate your usage-based billing\ntotals.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/invoiceitems\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoiceitems\/:id\u00a0\u00a0POST\u00a0\/v1\/invoiceitems\/:idDELETE\u00a0\/v1\/invoiceitems\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/invoiceitems\n'''"},{"nl":"The invoiceitem objectAttributes id string Unique identifier for the object. amount integer Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable The ID of the customer who will be billed when this invoice item is billed. 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. period hash The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.Show child attributes price hash The price of the invoice item.Show child attributes proration boolean Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.More attributesExpand all object string, value is \"invoiceitem\" date timestamp discountable boolean discounts array containing strings expandable invoice string expandable livemode boolean quantity integer subscription string expandable subscription_item string tax_rates array of hashes test_clock string expandable unit_amount integer unit_amount_decimal decimal string","code":"'''The invoiceitem object {\n \"id\": \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n \"object\": \"invoiceitem\",\n \"amount\": 300,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"date\": 1659519654,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discountable\": true,\n \"discounts\": [],\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659519654,\n \"start\": 1659519654\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_rates\": [],\n \"test_clock\": null,\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n}\n'''"},{"nl":"Create an invoice itemCreates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.Parameters customer required The ID of the customer who will be billed when this invoice item is billed. amount optional The integer amount in cents of the charge to be applied to the upcoming invoice. Passing in a negative amount will reduce the amount_due on the invoice. currency optional Three-letter ISO currency code, in lowercase. Must be a supported currency. description optional An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. 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. period optional dictionary The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.Show child parameters price optional The ID of the price object.More parametersExpand all discountable optional discounts optional array of hashes invoice optional price_data optional dictionary quantity optional subscription optional tax_rates optional unit_amount optional unit_amount_decimal optional ReturnsThe created invoice item object is returned if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.InvoiceItem.create(\n customer=\"cus_8TEMHVY5moxIPI\",\n price=\"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n)\n'''Response {\n \"id\": \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n \"object\": \"invoiceitem\",\n \"amount\": 300,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"date\": 1659519654,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discountable\": true,\n \"discounts\": [],\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659519654,\n \"start\": 1659519654\n },\n \"price\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"proration\": false,\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_rates\": [],\n \"test_clock\": null,\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n}'''"},{"nl":"Retrieve an invoice itemRetrieves the invoice item with the given ID.ParametersNo parameters.ReturnsReturns an invoice item if a valid invoice item ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.InvoiceItem.retrieve(\n \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n)\n'''Response {\n \"id\": \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n \"object\": \"invoiceitem\",\n \"amount\": 300,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"date\": 1659519654,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discountable\": true,\n \"discounts\": [],\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659519654,\n \"start\": 1659519654\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_rates\": [],\n \"test_clock\": null,\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n}'''"},{"nl":"Update an invoice itemUpdates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it\u2019s attached to is closed.Parameters amount optional The integer amount in cents of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer\u2019s account, pass a negative amount. description optional An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. 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. period optional dictionary The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.Show child parameters price optional The ID of the price object.More parametersExpand all discountable optional discounts optional array of hashes price_data optional dictionary quantity optional tax_rates optional unit_amount optional unit_amount_decimal optional ReturnsThe updated invoice item object is returned upon success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.InvoiceItem.modify(\n \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n \"object\": \"invoiceitem\",\n \"amount\": 300,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"date\": 1659519654,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discountable\": true,\n \"discounts\": [],\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"period\": {\n \"end\": 1659519654,\n \"start\": 1659519654\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_rates\": [],\n \"test_clock\": null,\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n}'''"},{"nl":"Delete an invoice itemDeletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they\u2019re not attached to invoices, or if it\u2019s attached to a draft invoice.ParametersNo parameters.ReturnsAn object with the deleted invoice item\u2019s ID and a deleted flag upon success. Otherwise, this call raises an error, such as if the invoice item has already been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.InvoiceItem.delete(\n \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n)\n'''Response {\n \"id\": \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n \"object\": \"invoiceitem\",\n \"deleted\": true\n}'''"},{"nl":"List all invoice itemsReturns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.Parameters customer optional The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.More parametersExpand all created optional dictionary ending_before optional invoice optional limit optional pending optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit invoice items, starting after invoice item starting_after. Each entry in the array is a separate invoice item object. If no more invoice items are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.InvoiceItem.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/invoiceitems\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ii_1LSe4Q2eZvKYlo2CYN9PE9sv\",\n \"object\": \"invoiceitem\",\n \"amount\": 300,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"date\": 1659519654,\n \"description\": \"My First Invoice Item (created for API docs)\",\n \"discountable\": true,\n \"discounts\": [],\n \"invoice\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"period\": {\n \"end\": 1659519654,\n \"start\": 1659519654\n },\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"proration\": false,\n \"quantity\": 1,\n \"subscription\": null,\n \"tax_rates\": [],\n \"test_clock\": null,\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"PlansYou can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.Plans define the base price, currency, and billing cycle for recurring purchases of products.\nProducts help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.For example, you might have a single \"gold\" product that has plans for $10\/month, $100\/year, \u20ac9\/month, and \u20ac90\/year.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/plans\u00a0\u00a0\u00a0GET\u00a0\/v1\/plans\/:id\u00a0\u00a0POST\u00a0\/v1\/plans\/:idDELETE\u00a0\/v1\/plans\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/plans\n'''"},{"nl":"The plan objectAttributes id string Unique identifier for the object. active boolean Whether the plan can be used for new purchases. amount positive integer or zero The unit amount in cents to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. interval enum The frequency at which a subscription is billed. One of day, week, month or year.Possible enum valuesmonth year week day 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. nickname string A brief description of the plan, hidden from customers. product string expandable The product whose pricing this plan determines.More attributesExpand all object string, value is \"plan\" aggregate_usage string amount_decimal decimal string billing_scheme string created timestamp interval_count positive integer livemode boolean tiers array of hashes expandable tiers_mode string transform_usage hash trial_period_days positive integer usage_type enum","code":"'''The plan object {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"plan\",\n \"active\": true,\n \"aggregate_usage\": null,\n \"amount\": 1200,\n \"amount_decimal\": \"1200\",\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"livemode\": false,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"tiers_mode\": null,\n \"transform_usage\": null,\n \"trial_period_days\": null,\n \"usage_type\": \"licensed\"\n}\n'''"},{"nl":"Create a planYou can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.Parameters amount Required unless billing_scheme=tiered A positive integer in cents (or 0 for a free plan) representing how much to charge on a recurring basis. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. interval required Specifies billing frequency. Either day, week, month or year. product required The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a service product.Show child parameters active optional Whether the plan is currently available for new subscriptions. Defaults to true. 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. nickname optional A brief description of the plan, hidden from customers.More parametersExpand all id optional tiers Required if billing_scheme=tiered tiers_mode Required if billing_scheme=tiered aggregate_usage optional amount_decimal optional billing_scheme optional interval_count optional transform_usage optional dictionary trial_period_days optional usage_type optional ReturnsReturns the plan object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Plan.create(\n amount=1200,\n currency=\"usd\",\n interval=\"month\",\n product=\"prod_MApBpixJvIPdF1\",\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"plan\",\n \"active\": true,\n \"aggregate_usage\": null,\n \"amount\": 1200,\n \"amount_decimal\": \"1200\",\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"livemode\": false,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"tiers_mode\": null,\n \"transform_usage\": null,\n \"trial_period_days\": null,\n \"usage_type\": \"licensed\"\n}'''"},{"nl":"Retrieve a planRetrieves the plan with the given ID.ParametersNo parameters.ReturnsReturns a plan if a valid plan ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Plan.retrieve(\n \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"plan\",\n \"active\": true,\n \"aggregate_usage\": null,\n \"amount\": 1200,\n \"amount_decimal\": \"1200\",\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"livemode\": false,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"tiers_mode\": null,\n \"transform_usage\": null,\n \"trial_period_days\": null,\n \"usage_type\": \"licensed\"\n}'''"},{"nl":"Update a planUpdates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan\u2019s ID, amount, currency, or billing cycle.Parameters active optional Whether the plan is currently available for new subscriptions. 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. nickname optional A brief description of the plan, hidden from customers.More parametersExpand all product optional trial_period_days optional ReturnsThe updated plan object is returned upon success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Plan.modify(\n \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"plan\",\n \"active\": true,\n \"aggregate_usage\": null,\n \"amount\": 1200,\n \"amount_decimal\": \"1200\",\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"tiers_mode\": null,\n \"transform_usage\": null,\n \"trial_period_days\": null,\n \"usage_type\": \"licensed\"\n}'''"},{"nl":"Delete a planDeleting plans means new subscribers can\u2019t be added. Existing subscribers aren\u2019t affected.ParametersNo parameters.ReturnsAn object with the deleted plan\u2019s ID and a deleted flag upon success. Otherwise, this call raises an error, such as if the plan has already been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Plan.delete(\n \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n)\n'''Response {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"plan\",\n \"deleted\": true\n}'''"},{"nl":"List all plansReturns a list of your plans.Parameters active optional Only return plans that are active or inactive (e.g., pass false to list all inactive plans). product optional Only return plans for the given product.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 plans, starting after plan starting_after. Each entry in the array is a separate plan object. If no more plans are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Plan.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/plans\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"plan\",\n \"active\": true,\n \"aggregate_usage\": null,\n \"amount\": 1200,\n \"amount_decimal\": \"1200\",\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"livemode\": false,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"tiers_mode\": null,\n \"transform_usage\": null,\n \"trial_period_days\": null,\n \"usage_type\": \"licensed\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"QuoteA Quote is a way to model prices that you'd like to provide to a customer.\nOnce accepted, it will automatically create an invoice, subscription or subscription schedule","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/quotes\u00a0\u00a0\u00a0GET\u00a0\/v1\/quotes\/:id\u00a0\u00a0POST\u00a0\/v1\/quotes\/:id\u00a0\u00a0POST\u00a0\/v1\/quotes\/:id\/finalize\u00a0\u00a0POST\u00a0\/v1\/quotes\/:id\/accept\u00a0\u00a0POST\u00a0\/v1\/quotes\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0https:\/\/files.stripe.com\/v1\/quotes\/:id\/pdf\u00a0\u00a0\u00a0GET\u00a0\/v1\/quotes\u00a0\u00a0\u00a0GET\u00a0\/v1\/quotes\/:id\/line_items\u00a0\u00a0\u00a0GET\u00a0\/v1\/quotes\/:id\/computed_upfront_line_items\n'''"},{"nl":"The quote objectAttributes id string Unique identifier for the object. line_items list expandable A list of items the customer is being quoted for. This field is not included by default. To include it in the response, expand the line_items field.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.More attributesExpand all object string, value is \"quote\" amount_subtotal integer amount_total integer application string expandable \"application\" Connect only application_fee_amount integer Connect only application_fee_percent decimal Connect only automatic_tax hash collection_method string computed hash created timestamp currency string customer string expandable default_tax_rates array containing strings expandable description string discounts array containing strings expandable expires_at timestamp footer string from_quote hash header string invoice string expandable invoice_settings hash livemode boolean number string on_behalf_of string expandable Connect only status enum status_transitions hash subscription string expandable subscription_data hash subscription_schedule string expandable test_clock string expandable total_details hash transfer_data hash Connect only","code":"'''The quote object {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": null,\n \"on_behalf_of\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": null,\n \"finalized_at\": null\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}\n'''"},{"nl":"Create a quoteA quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.Parameters line_items optional array of hashes A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.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 application_fee_amount optional Connect only application_fee_percent optional Connect only automatic_tax optional dictionary collection_method optional customer optional default_tax_rates optional description optional discounts optional array of hashes expires_at optional footer optional from_quote optional dictionary header optional invoice_settings optional dictionary on_behalf_of optional Connect only subscription_data optional dictionary test_clock optional transfer_data optional dictionary Connect only ReturnsReturns the quote object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.create(\n customer=\"cus_8TEMHVY5moxIPI\",\n line_items=[\n {\n \"price\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"quantity\": 2,\n },\n ],\n)\n'''Response {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 2400,\n \"amount_total\": 2400,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 2400,\n \"amount_total\": 2400,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": null,\n \"on_behalf_of\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": null,\n \"finalized_at\": null\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}'''"},{"nl":"Retrieve a quoteRetrieves the quote with the given ID.ParametersNo parameters.ReturnsReturns a quote if a valid quote ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.retrieve(\n \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n)\n'''Response {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": null,\n \"on_behalf_of\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": null,\n \"finalized_at\": null\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}'''"},{"nl":"Update a quoteA quote models prices and services for a customer.Parameters line_items optional array of hashes A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.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 application_fee_amount optional Connect only application_fee_percent optional Connect only automatic_tax optional dictionary collection_method optional customer optional default_tax_rates optional description optional discounts optional array of hashes expires_at optional footer optional header optional invoice_settings optional dictionary on_behalf_of optional Connect only subscription_data optional dictionary transfer_data optional dictionary Connect only ReturnsReturns the updated quote object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.modify(\n \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"number\": null,\n \"on_behalf_of\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": null,\n \"finalized_at\": null\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}'''"},{"nl":"Finalize a quoteFinalizes the quote.ParametersExpand all expires_at optional ReturnsReturns an open quote. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.finalize_quote(\n \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n)\n'''Response {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 1200,\n \"amount_total\": 1200,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 1200,\n \"amount_total\": 1200,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": \"QT-63F854F-0001-01\",\n \"on_behalf_of\": null,\n \"status\": \"open\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": null,\n \"finalized_at\": 1659519107\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}'''"},{"nl":"Accept a quoteAccepts the specified quote.ParametersNo parameters.ReturnsReturns an accepted quote and creates an invoice, subscription or subscription schedule. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.accept(\"qt_1LSdva2eZvKYlo2CKJMWruHa\")\n'''Response {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 1200,\n \"amount_total\": 1200,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 1200,\n \"amount_total\": 1200,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": \"in_1LSdvX2eZvKYlo2CZYmxkhXJ\",\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": \"QT-63F854F-0001-01\",\n \"on_behalf_of\": null,\n \"status\": \"accepted\",\n \"status_transitions\": {\n \"accepted_at\": 1659519107,\n \"canceled_at\": null,\n \"finalized_at\": 1659259907\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}'''"},{"nl":"Cancel a quoteCancels the quote.ParametersNo parameters.ReturnsReturns a canceled quote. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.cancel(\"qt_1LSdva2eZvKYlo2CKJMWruHa\")\n'''Response {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": null,\n \"on_behalf_of\": null,\n \"status\": \"canceled\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": 1659519107,\n \"finalized_at\": null\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n}'''"},{"nl":"Download quote PDFDownload the PDF for a finalized quoteParametersNo parameters.ReturnsThe PDF file for the quote","code":"GET\u00a0https:\/\/files.stripe.com\/v1\/quotes\/:id\/pdfPythoncURLStripe CLIRubyPythonPHPJavaNode.jsGo.NET12345stripe.api_key = \"sk_test_your_key\"\nresp = stripe.Quote.pdf('qt_1LSdva2eZvKYlo2CKJMWruHa')\nfile = open(\"\/tmp\/tmp.pdf\", \"wb\")\nfile.write(resp.io.read())\nfile.close()\n'''Response null'''"},{"nl":"List all quotesReturns a list of your quotes.Parameters customer optional The ID of the customer whose quotes will be retrieved. status optional enum The status of the quote.Possible enum valuesdraft open accepted canceled More parametersExpand all ending_before optional limit optional starting_after optional test_clock optional ReturnsA dictionary with a data property that contains an array of up to limit quotes, starting after quote starting_after. Each entry in the array is a separate quote object. If no more quotes are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Quote.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/quotes\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"qt_1LSdva2eZvKYlo2CKJMWruHa\",\n \"object\": \"quote\",\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"collection_method\": \"charge_automatically\",\n \"computed\": {\n \"recurring\": null,\n \"upfront\": {\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n }\n },\n \"created\": 1659519106,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_tax_rates\": [],\n \"description\": null,\n \"discounts\": [],\n \"expires_at\": 1662111106,\n \"footer\": null,\n \"from_quote\": null,\n \"header\": null,\n \"invoice\": null,\n \"invoice_settings\": {\n \"days_until_due\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"number\": null,\n \"on_behalf_of\": null,\n \"status\": \"draft\",\n \"status_transitions\": {\n \"accepted_at\": null,\n \"canceled_at\": null,\n \"finalized_at\": null\n },\n \"subscription\": null,\n \"subscription_data\": {\n \"effective_date\": null,\n \"trial_period_days\": null\n },\n \"subscription_schedule\": null,\n \"test_clock\": null,\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"transfer_data\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a quote's line itemsWhen retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit quote line items, starting after Line Item starting_after. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nline_items = stripe.Quote.list_line_items('qt_1LSdva2eZvKYlo2CKJMWruHa', limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/quotes\/qt_1LSdva2eZvKYlo2CKJMWruHa\/line_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"li_1LSdva2eZvKYlo2CFMsy4nIF\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 0,\n \"amount_tax\": 0,\n \"amount_total\": 0,\n \"currency\": \"usd\",\n \"description\": \"auto topup addtional_viewer\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"quantity\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a quote's upfront line itemsWhen retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit upfront line items, starting after Line Item starting_after. Each entry in the array is a separate Line Item object. If no more upfront line items are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nline_items = stripe.Quote.list_computed_upfront_line_items('qt_1LSdva2eZvKYlo2CKJMWruHa', limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/quotes\/qt_1LSdva2eZvKYlo2CKJMWruHa\/computed_upfront_line_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"li_1LSdva2eZvKYlo2CFMsy4nIF\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 0,\n \"amount_tax\": 0,\n \"amount_total\": 0,\n \"currency\": \"usd\",\n \"description\": \"auto topup addtional_viewer\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"quantity\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"SubscriptionsSubscriptions allow you to charge a customer on a recurring basis.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/subscriptions\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscriptions\/:id\u00a0\u00a0POST\u00a0\/v1\/subscriptions\/:idDELETE\u00a0\/v1\/subscriptions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscriptions\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscriptions\/search\n'''"},{"nl":"The subscription objectAttributes id string Unique identifier for the object. cancel_at_period_end boolean If the subscription has been canceled with the at_period_end flag set to true, cancel_at_period_end on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period. currency currency preview feature Three-letter ISO currency code, in lowercase. Must be a supported currency. current_period_end timestamp End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. current_period_start timestamp Start of the current period that the subscription has been invoiced for. customer string expandable ID of the customer who owns the subscription. default_payment_method string expandable ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer\u2019s invoice_settings.default_payment_method or default_source. description string The subscription\u2019s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. items list List of subscription items, each with an attached price.Show child attributes latest_invoice string expandable The most recent invoice this subscription has generated. 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. pending_setup_intent string expandable You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription\u2019s payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide. pending_update hash If specified, pending updates that will be applied to the subscription once the latest_invoice has been paid.Show child attributes status enum Possible values are incomplete, incomplete_expired, trialing, active, past_due, canceled, or unpaid. \nFor collection_method=charge_automatically a subscription moves into incomplete if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active state. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, the open invoice will be voided and no further invoices will be generated. \nA subscription that is currently in a trial period is trialing and moves to active when the trial period is over. \nIf subscription collection_method=charge_automatically it becomes past_due when payment to renew it fails and canceled or unpaid (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts. \nIf subscription collection_method=send_invoice it becomes past_due when its invoice is not paid by the due date, and canceled or unpaid if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.Possible enum valuesactive past_due unpaid canceled incomplete incomplete_expired trialing More attributesExpand all object string, value is \"subscription\" application string expandable \"application\" Connect only application_fee_percent decimal Connect only automatic_tax hash billing_cycle_anchor timestamp billing_thresholds hash cancel_at timestamp canceled_at timestamp collection_method string created timestamp days_until_due integer default_source string expandable bank account, card, or source (e.g., card) default_tax_rates array of hashes discount hash, discount object ended_at timestamp livemode boolean next_pending_invoice_item_invoice timestamp pause_collection hash payment_settings hash pending_invoice_item_interval hash schedule string expandable start_date timestamp test_clock string expandable transfer_data hash Connect only trial_end timestamp trial_start timestamp","code":"'''The subscription object {\n \"id\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_KGEouBKGmh7mXW\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {},\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"active\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n}\n'''"},{"nl":"Create a subscriptionCreates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.\nWhen you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.\nThe payment_behavior parameter determines the exact behavior of the initial payment.\nTo start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead.\nSchedules provide the flexibility to model more complex billing configurations that change over time.Parameters customer required The identifier of the customer to subscribe. items required A list of up to 20 subscription items, each with an attached price.Show child parameters cancel_at_period_end optional Boolean indicating whether this subscription should cancel at the end of the current period. currency optional preview feature Three-letter ISO currency code, in lowercase. Must be a supported currency. default_payment_method optional ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer\u2019s invoice_settings.default_payment_method or default_source. description optional The subscription\u2019s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. 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. payment_behavior optional enum Use allow_incomplete to create subscriptions with status=incomplete if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription\u2019s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.\nUse default_incomplete to create Subscriptions with status=incomplete when the first invoice requires payment, otherwise start as active. Subscriptions transition to status=active when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription\u2019s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to status=incomplete_expired, which is a terminal state.\nUse error_if_incomplete if you want Stripe to return an HTTP 402 status code if a subscription\u2019s first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the changelog to learn more.\npending_if_incomplete is only used with updates and cannot be passed when creating a subscription.Possible enum valuesallow_incomplete error_if_incomplete pending_if_incomplete default_incomplete More parametersExpand all add_invoice_items optional array of hashes application_fee_percent optional Connect only automatic_tax optional dictionary backdate_start_date optional billing_cycle_anchor optional billing_thresholds optional dictionary cancel_at optional collection_method optional coupon optional days_until_due optional default_source optional default_tax_rates optional off_session optional payment_settings optional dictionary pending_invoice_item_interval optional dictionary promotion_code optional proration_behavior optional enum transfer_data optional dictionary Connect only trial_end optional trial_from_plan optional trial_period_days optional ReturnsThe newly created Subscription object, if the call succeeded. If the attempted charge fails, the subscription is created in an incomplete status","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.create(\n customer=\"cus_8TEMHVY5moxIPI\",\n items=[\n {\"price\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\"},\n ],\n)\n'''Response {\n \"id\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {},\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"active\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n}'''"},{"nl":"Retrieve a subscriptionRetrieves the subscription with the given ID.ParametersNo parameters.ReturnsReturns the subscription object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.retrieve(\n \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n)\n'''Response {\n \"id\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_KGEouBKGmh7mXW\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {},\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"active\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n}'''"},{"nl":"Update a subscriptionUpdates an existing subscription to match the specified parameters.\nWhen changing prices or quantities, we will optionally prorate the price we charge next month to make up for any price changes.\nTo preview how the proration will be calculated, use the upcoming invoice endpoint.\n\n By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a $100 price, she'll be billed $100 immediately. If on May 15 she switches to a $200 price, then on June 1 she'll be billed $250 ($200 for a renewal of her subscription, plus a $50 prorating adjustment for half of the previous month's $100 difference). Similarly, a downgrade will generate a credit to be applied to the next invoice. We also prorate when you make quantity changes.\n\n\n Switching prices does not normally change the billing date or generate an immediate charge unless:\n\n\n\nThe billing interval is changed (e.g., monthly to yearly).\nThe subscription moves from free to paid, or paid to free.\nA trial starts or ends.\n\n\n\n In these cases, we apply a credit for the time unused on the previous price and the customer is immediately charged using the new price. This also resets the billing date.\n\n\n If you'd like to charge for an upgrade immediately, just pass proration_behavior as create_prorations (the default), and then invoice the customer as soon as you make the subscription change. That will collect the proration adjustments into a new invoice, and Stripe will automatically attempt to collect payment on the invoice.\n\n\n If you don't want to prorate at all, set the proration_behavior option to none and the customer would be billed $100 on May 1 and $200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (monthly to yearly, for example), we won't generate any credits for the old subscription's unused time\u2014although we will still reset the billing date and will bill immediately for the new subscription.\n\n\n Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating metered billing instead.\n\nParameters cancel_at_period_end optional Boolean indicating whether this subscription should cancel at the end of the current period. default_payment_method optional ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source. If neither are set, invoices will use the customer\u2019s invoice_settings.default_payment_method or default_source. description optional The subscription\u2019s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. items optional array of hashes A list of up to 20 subscription items, each with an attached price.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. payment_behavior optional enum Use allow_incomplete to transition the subscription to status=past_due if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription\u2019s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.\nUse default_incomplete to transition the subscription to status=past_due when payment is required and await explicit confirmation of the invoice\u2019s payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription\u2019s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method.\nUse pending_if_incomplete to update the subscription using pending updates. When you use pending_if_incomplete you can only pass the parameters supported by pending updates.\nUse error_if_incomplete if you want Stripe to return an HTTP 402 status code if a subscription\u2019s invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the changelog to learn more.Possible enum valuesallow_incomplete error_if_incomplete pending_if_incomplete default_incomplete proration_behavior optional enum Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item\u2019s quantity changes.Possible enum valuescreate_prorations Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions.none Disable creating prorations in this request.always_invoice Always invoice immediately for prorations.More parametersExpand all add_invoice_items optional array of hashes application_fee_percent optional Connect only automatic_tax optional dictionary billing_cycle_anchor optional billing_thresholds optional dictionary cancel_at optional collection_method optional coupon optional days_until_due optional default_source optional default_tax_rates optional off_session optional pause_collection optional dictionary payment_settings optional dictionary pending_invoice_item_interval optional dictionary promotion_code optional proration_date optional transfer_data optional dictionary Connect only trial_end optional trial_from_plan optional Returns The newly updated Subscription object, if the call succeeded.\n\n\n If payment_behavior is error_if_incomplete and a charge is required for the update and it fails, this call raises an error, and the subscription update does not go into effect.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.modify(\n \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_KGEouBKGmh7mXW\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"active\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n}'''"},{"nl":"Cancel a subscriptionCancels a customer\u2019s subscription immediately. The customer will not be charged again for the subscription.\nNote, however, that any pending invoice items that you\u2019ve created will still be charged for at the end of the period, unless manually deleted. If you\u2019ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.\nBy default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.ParametersExpand all invoice_now optional prorate optional ReturnsThe canceled Subscription object. Its subscription status will be set to canceled","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.delete(\n \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n)\n'''Response {\n \"id\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": 1659519611,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {},\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"canceled\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n}'''"},{"nl":"List subscriptionsBy default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.Parameters customer optional The ID of the customer whose subscriptions will be retrieved. price optional Filter for subscriptions that contain this recurring price ID. status optional enum The status of the subscriptions to retrieve. Passing in a value of canceled will return all canceled subscriptions, including those belonging to deleted customers. Pass ended to find subscriptions that are canceled and subscriptions that are expired due to incomplete payment. Passing in a value of all will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.Possible enum valuesactive past_due unpaid canceled incomplete incomplete_expired trialing all ended More parametersExpand all collection_method optional created optional dictionary current_period_end optional dictionary current_period_start optional dictionary ending_before optional limit optional starting_after optional test_clock optional ReturnsReturns a list of subscriptions","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/subscriptions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"su_1JbiLB2eZvKYlo2CRmgET2WF\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_KGEouBKGmh7mXW\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {},\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"active\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Search subscriptionsSearch for subscriptions you\u2019ve previously created using Stripe\u2019s Search Query Language.\nDon\u2019t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.Parameters query required The search query string. See search query language and the list of supported query fields for subscriptions. limit optional A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. page optional A cursor for pagination across multiple pages of results. Don\u2019t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.ReturnsA dictionary with a data property that contains an array of up to limit subscriptions. If no objects match the\nquery, the resulting array will be empty. See the related guide on expanding properties in lists","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Subscription.search(\n query=\"status:'active' AND metadata['order_id']:'6735'\",\n)\n'''Response {\n \"object\": \"search_result\",\n \"url\": \"\/v1\/subscriptions\/search\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"su_1JbiLB2eZvKYlo2CRmgET2WF\",\n \"object\": \"subscription\",\n \"application\": null,\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": 1633337949,\n \"billing_thresholds\": null,\n \"cancel_at\": null,\n \"cancel_at_period_end\": false,\n \"canceled_at\": null,\n \"collection_method\": \"charge_automatically\",\n \"created\": 1632128349,\n \"currency\": \"usd\",\n \"current_period_end\": 1660553949,\n \"current_period_start\": 1658739549,\n \"customer\": \"cus_KGEouBKGmh7mXW\",\n \"days_until_due\": null,\n \"default_payment_method\": \"pm_1JbiL92eZvKYlo2CuiUB2nL1\",\n \"default_source\": null,\n \"default_tax_rates\": [],\n \"description\": null,\n \"discount\": null,\n \"ended_at\": null,\n \"items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"si_KGEo6oKuLzcuYw\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1632128350,\n \"metadata\": {},\n \"price\": {\n \"id\": \"15\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1386685951,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {\n \"charset\": \"utf-8\",\n \"content\": \"15\"\n },\n \"nickname\": null,\n \"product\": \"prod_BTdpcRLIUTfsFR\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"week\",\n \"interval_count\": 3,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 444,\n \"unit_amount_decimal\": \"444\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/subscription_items?subscription=sub_1JbiLB2eZvKYlo2CNHnqfMzf\"\n },\n \"latest_invoice\": \"in_1LPN8U2eZvKYlo2C2h002pSa\",\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"next_pending_invoice_item_invoice\": null,\n \"pause_collection\": null,\n \"payment_settings\": {\n \"payment_method_options\": null,\n \"payment_method_types\": null,\n \"save_default_payment_method\": null\n },\n \"pending_invoice_item_interval\": null,\n \"pending_setup_intent\": null,\n \"pending_update\": null,\n \"schedule\": null,\n \"start_date\": 1632128349,\n \"status\": \"active\",\n \"test_clock\": null,\n \"transfer_data\": null,\n \"trial_end\": 1633337949,\n \"trial_start\": 1632128349\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Subscription ItemsSubscription items allow you to create customer subscriptions with more than\none plan, making it easy to represent complex billing relationships","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/subscription_items\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscription_items\/:id\u00a0\u00a0POST\u00a0\/v1\/subscription_items\/:idDELETE\u00a0\/v1\/subscription_items\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscription_items\n'''"},{"nl":"The subscription item objectAttributes id string Unique identifier for the object. 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. price hash The price the customer is subscribed to.Show child attributes quantity positive integer or zero The quantity of the plan to which the customer should be subscribed. subscription string The subscription this subscription_item belongs to.More attributesExpand all object string, value is \"subscription_item\" billing_thresholds hash created integer tax_rates array of hashes","code":"'''The subscription item object {\n \"id\": \"si_MAzroazQBGguLd\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1659518859,\n \"metadata\": {},\n \"price\": {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1LSdra2eZvKYlo2CbANuqqoc\",\n \"tax_rates\": []\n}\n'''"},{"nl":"Create a subscription itemAdds a new item to an existing subscription. No existing items will be changed or replaced.Parameters subscription required The identifier of the subscription to modify. 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. payment_behavior optional enum Use allow_incomplete to transition the subscription to status=past_due if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription\u2019s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.\nUse default_incomplete to transition the subscription to status=past_due when payment is required and await explicit confirmation of the invoice\u2019s payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription\u2019s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method.\nUse pending_if_incomplete to update the subscription using pending updates. When you use pending_if_incomplete you can only pass the parameters supported by pending updates.\nUse error_if_incomplete if you want Stripe to return an HTTP 402 status code if a subscription\u2019s invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the changelog to learn more.Possible enum valuesallow_incomplete error_if_incomplete pending_if_incomplete default_incomplete price optional The ID of the price object. proration_behavior optional enum Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item\u2019s quantity changes.Possible enum valuescreate_prorations Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions.none Disable creating prorations in this request.always_invoice Always invoice immediately for prorations. quantity optional The quantity you\u2019d like to apply to the subscription item you\u2019re creating.More parametersExpand all billing_thresholds optional dictionary price_data optional dictionary proration_date optional tax_rates optional ReturnsReturns the created Subscription Item object, if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.create(\n subscription=\"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n price=\"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n quantity=2,\n)\n'''Response {\n \"id\": \"si_MAzroazQBGguLd\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1659518859,\n \"metadata\": {},\n \"price\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"quantity\": 2,\n \"subscription\": \"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n \"tax_rates\": []\n}'''"},{"nl":"Retrieve a subscription itemRetrieves the subscription item with the given ID.ParametersNo parameters.ReturnsReturns a subscription item if a valid subscription item ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.retrieve(\n \"si_MAzroazQBGguLd\",\n)\n'''Response {\n \"id\": \"si_MAzroazQBGguLd\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1659518859,\n \"metadata\": {},\n \"price\": {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1LSdra2eZvKYlo2CbANuqqoc\",\n \"tax_rates\": []\n}'''"},{"nl":"Update a subscription itemUpdates the plan or quantity of an item on a current subscription.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. payment_behavior optional enum Use allow_incomplete to transition the subscription to status=past_due if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription\u2019s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.\nUse default_incomplete to transition the subscription to status=past_due when payment is required and await explicit confirmation of the invoice\u2019s payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription\u2019s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method.\nUse pending_if_incomplete to update the subscription using pending updates. When you use pending_if_incomplete you can only pass the parameters supported by pending updates.\nUse error_if_incomplete if you want Stripe to return an HTTP 402 status code if a subscription\u2019s invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the changelog to learn more.Possible enum valuesallow_incomplete error_if_incomplete pending_if_incomplete default_incomplete price optional The ID of the price object. When changing a subscription item\u2019s price, quantity is set to 1 unless a quantity parameter is provided. proration_behavior optional enum Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item\u2019s quantity changes.Possible enum valuescreate_prorations Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions.none Disable creating prorations in this request.always_invoice Always invoice immediately for prorations. quantity optional The quantity you\u2019d like to apply to the subscription item you\u2019re creating.More parametersExpand all billing_thresholds optional dictionary off_session optional price_data optional dictionary proration_date optional tax_rates optional Return","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.modify(\n \"si_MAzroazQBGguLd\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"si_MAzroazQBGguLd\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1659518859,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"price\": {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1LSdra2eZvKYlo2CbANuqqoc\",\n \"tax_rates\": []\n}'''"},{"nl":"Delete a subscription itemDeletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.Parameters proration_behavior optional enum Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item\u2019s quantity changes.Possible enum valuescreate_prorations Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions.none Disable creating prorations in this request.always_invoice Always invoice immediately for prorations.More parametersExpand all clear_usage optional proration_date optional ReturnsAn subscription item object with a deleted flag upon success. Otherwise, this call raises an error, such as if the subscription item has already been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.delete(\n \"si_MAzroazQBGguLd\",\n)\n'''Response {\n \"id\": \"si_MAzroazQBGguLd\",\n \"object\": \"subscription_item\",\n \"deleted\": true\n}'''"},{"nl":"List all subscription itemsReturns a list of your subscription items for a given subscription.Parameters subscription required The ID of the subscription whose items will be retrieved.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 subscription items, starting after subscription item starting_after. Each entry in the array is a separate subscription item object. If no more subscription items are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.list(\n subscription=\"sub_1JbiLB2eZvKYlo2CNHnqfMzf\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/subscription_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"si_MAzroazQBGguLd\",\n \"object\": \"subscription_item\",\n \"billing_thresholds\": null,\n \"created\": 1659518859,\n \"metadata\": {},\n \"price\": {\n \"id\": \"price_1LSTX02eZvKYlo2CrKMGl6Dy\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659479142,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MApBpixJvIPdF1\",\n \"recurring\": {\n \"aggregate_usage\": null,\n \"interval\": \"month\",\n \"interval_count\": 1,\n \"usage_type\": \"licensed\"\n },\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"recurring\",\n \"unit_amount\": 1200,\n \"unit_amount_decimal\": \"1200\"\n },\n \"quantity\": 1,\n \"subscription\": \"sub_1LSdra2eZvKYlo2CbANuqqoc\",\n \"tax_rates\": []\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Subscription ScheduleA subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/subscription_schedules\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscription_schedules\/:id\u00a0\u00a0POST\u00a0\/v1\/subscription_schedules\/:id\u00a0\u00a0POST\u00a0\/v1\/subscription_schedules\/:id\/cancel\u00a0\u00a0POST\u00a0\/v1\/subscription_schedules\/:id\/release\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscription_schedules\n'''"},{"nl":"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\u2019s 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 ","code":"'''The schedule object {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1637053645,\n \"completed_at\": null,\n \"created\": 1636545743,\n \"current_phase\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1668685170,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1637149170,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n}\n'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionSchedule.create(\n customer=\"cus_8TEMHVY5moxIPI\",\n start_date=1660122035,\n end_behavior=\"release\",\n phases=[\n {\n \"items\": [\n {\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n },\n ],\n \"iterations\": 12,\n },\n ],\n)\n'''Response {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1637053645,\n \"completed_at\": null,\n \"created\": 1659518858,\n \"current_phase\": {\n \"start_date\": 1660122035,\n \"end_date\": 1691658035\n },\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1691658035,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1660122035,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionSchedule.retrieve(\n \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n)\n'''Response {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1637053645,\n \"completed_at\": null,\n \"created\": 1636545743,\n \"current_phase\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1668685170,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1637149170,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n}'''"},{"nl":"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\u2019s next invoice.More parametersExpand all default_settings optional dictionary end_behavior optional ReturnsReturns an updated subscription schedule object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionSchedule.modify(\n \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n end_behavior=\"release\",\n)\n'''Response {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1637053645,\n \"completed_at\": null,\n \"created\": 1636545743,\n \"current_phase\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1668685170,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1637149170,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionSchedule.cancel(\n \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n)\n'''Response {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1659518858,\n \"completed_at\": null,\n \"created\": 1636545743,\n \"current_phase\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1668685170,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1637149170,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n}'''"},{"nl":"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\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionSchedule.release(\n \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n)\n'''Response {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1637053645,\n \"completed_at\": null,\n \"created\": 1636545743,\n \"current_phase\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1668685170,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1637149170,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionSchedule.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/subscription_schedules\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6\",\n \"object\": \"subscription_schedule\",\n \"application\": null,\n \"canceled_at\": 1637053645,\n \"completed_at\": null,\n \"created\": 1636545743,\n \"current_phase\": null,\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"default_settings\": {\n \"application_fee_percent\": null,\n \"automatic_tax\": {\n \"enabled\": false\n },\n \"billing_cycle_anchor\": \"automatic\",\n \"billing_thresholds\": null,\n \"collection_method\": \"charge_automatically\",\n \"default_payment_method\": null,\n \"invoice_settings\": null,\n \"transfer_data\": null\n },\n \"end_behavior\": \"release\",\n \"livemode\": false,\n \"metadata\": {},\n \"phases\": [\n {\n \"add_invoice_items\": [],\n \"application_fee_percent\": null,\n \"billing_cycle_anchor\": null,\n \"billing_thresholds\": null,\n \"collection_method\": null,\n \"coupon\": null,\n \"default_payment_method\": null,\n \"default_tax_rates\": [],\n \"end_date\": 1668685170,\n \"invoice_settings\": null,\n \"items\": [\n {\n \"billing_thresholds\": null,\n \"price\": \"plan_JiX4v6L7JY0Vyt\",\n \"quantity\": 1,\n \"tax_rates\": []\n }\n ],\n \"metadata\": {},\n \"proration_behavior\": \"create_prorations\",\n \"start_date\": 1637149170,\n \"transfer_data\": null,\n \"trial_end\": null\n }\n ],\n \"released_at\": null,\n \"released_subscription\": null,\n \"status\": \"canceled\",\n \"subscription\": null,\n \"test_clock\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Test ClocksA test clock enables deterministic control over objects in testmode. With a test clock, you can create\nobjects 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,\nyou 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","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/test_clocks\u00a0\u00a0\u00a0GET\u00a0\/v1\/test_helpers\/test_clocks\/:idDELETE\u00a0\/v1\/test_helpers\/test_clocks\/:id\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/test_clocks\/:id\/advance\u00a0\u00a0\u00a0GET\u00a0\/v1\/test_helpers\/test_clocks\n'''"},{"nl":"The test clock objectAttributes id string Unique identifier for the object. object string, value is \"test_helpers.test_clock\" String representing the object\u2019s 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","code":"'''The test clock object {\n \"id\": \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n \"object\": \"test_helpers.test_clock\",\n \"created\": 1659518858,\n \"deletes_after\": 1660123658,\n \"frozen_time\": 1577836800,\n \"livemode\": false,\n \"name\": null,\n \"status\": \"ready\"\n}\n'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.test_helpers.TestClock.create(\n frozen_time=1577836800,\n)\n'''Response {\n \"id\": \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n \"object\": \"test_helpers.test_clock\",\n \"created\": 1659518858,\n \"deletes_after\": 1660123658,\n \"frozen_time\": 1577836800,\n \"livemode\": false,\n \"name\": null,\n \"status\": \"ready\"\n}'''"},{"nl":"Retrieve a test clockRetrieves a test clock.ParametersNo parameters.ReturnsReturns the TestClock object. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.test_helpers.TestClock.retrieve(\n \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n)\n'''Response {\n \"id\": \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n \"object\": \"test_helpers.test_clock\",\n \"created\": 1659518858,\n \"deletes_after\": 1660123658,\n \"frozen_time\": 1577836800,\n \"livemode\": false,\n \"name\": null,\n \"status\": \"ready\"\n}'''"},{"nl":"Delete a test clockDeletes a test clock.ParametersNo parameters.ReturnsThe deleted TestClock object is returned upon success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.test_helpers.TestClock.delete(\n \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n)\n'''Response {\n \"id\": \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n \"object\": \"test_helpers.test_clock\",\n \"deleted\": true\n}'''"},{"nl":"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\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.test_helpers.TestClock.advance(\n \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n frozen_time=1659605258,\n)\n'''Response {\n \"id\": \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n \"object\": \"test_helpers.test_clock\",\n \"created\": 1659518858,\n \"deletes_after\": 1660123658,\n \"frozen_time\": 1659518858,\n \"livemode\": false,\n \"name\": null,\n \"status\": \"advancing\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.test_helpers.TestClock.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/test_helpers\/test_clocks\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"clock_1LSdra2eZvKYlo2CQeY0nYT7\",\n \"object\": \"test_helpers.test_clock\",\n \"created\": 1659518858,\n \"deletes_after\": 1660123658,\n \"frozen_time\": 1577836800,\n \"livemode\": false,\n \"name\": null,\n \"status\": \"ready\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Usage RecordsUsage records allow you to report customer usage and metrics to Stripe for\nmetered billing of subscription prices.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/subscription_items\/:id\/usage_records\u00a0\u00a0\u00a0GET\u00a0\/v1\/subscription_items\/:id\/usage_record_summaries\n'''"},{"nl":"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","code":"'''The usage record object {\n \"id\": \"mbur_1CkclQ2eZvKYlo2CMSx3PSos\",\n \"object\": \"usage_record\",\n \"livemode\": false,\n \"quantity\": 100,\n \"subscription_item\": \"si_DAyhPiOTjrdfTv\",\n \"timestamp\": 1530817484\n}\n'''"},{"nl":"Create a usage recordCreates a usage record for a specified subscription item and date, and fills it with a quantity.\nUsage 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.\nThe 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\u2019s 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.\nThe 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.create_usage_record(\n \"si_DAyhPiOTjrdfTv\",\n quantity=100,\n timestamp=1571252444,\n)\n'''Response {\n \"id\": \"mbur_1CkclQ2eZvKYlo2CMSx3PSos\",\n \"object\": \"usage_record\",\n \"livemode\": false,\n \"quantity\": 100,\n \"subscription_item\": \"si_DAyhPiOTjrdfTv\",\n \"timestamp\": 1571252444\n}'''"},{"nl":"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\u2019s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).\nThe list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn\u2019t ended yet. Since new usage records can still be added, the returned summary information for the subscription item\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.SubscriptionItem.list_usage_record_summaries(\n \"si_DAyhPiOTjrdfTv\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/subscription_items\/si_DAyhPiOTjrdfTv\/usage_record_summaries\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"sis_1DkWqo2eZvKYlo2Cs4NSCMMw\",\n \"object\": \"usage_record_summary\",\n \"invoice\": \"in_1DkWqo2eZvKYlo2Cghtks5xk\",\n \"livemode\": false,\n \"period\": {\n \"end\": null,\n \"start\": null\n },\n \"subscription_item\": \"si_18PMl42eZvKYlo2CGduFchWC\",\n \"total_usage\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"AccountsThis is an object representing a Stripe account. You can retrieve it to see\nproperties on the account like its current e-mail address or if the account is\nenabled yet to make live charges.Some properties, marked below, are available only to platforms that want to\ncreate and manage Express or Custom accounts","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/accounts\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\u00a0\u00a0POST\u00a0\/v1\/accounts\/:idDELETE\u00a0\/v1\/accounts\/:id\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/reject\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/login_links\n'''"},{"nl":"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\u2019s 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","code":"\n'''Response (Standard){\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"controller\": {\n \"type\": \"application\",\n \"is_controller\": true\n },\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"requirements.past_due\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"standard\"\n}Response (Express){\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"requirements.past_due\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"express\"\n}Response (Custom){\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"business_type\": null,\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"requirements.past_due\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"custom\"\n}'''"},{"nl":"Create an accountWith Connect, you can create Stripe accounts for your users.\nTo do this, you\u2019ll 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\u2019re creating an account is legally represented in Canada, you would use CA as the country for the account being created. Available countries include Stripe\u2019s 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\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.create(\n type=\"custom\",\n country=\"US\",\n email=\"jenny.rosen@example.com\",\n capabilities={\n \"card_payments\": {\"requested\": True},\n \"transfers\": {\"requested\": True},\n },\n)\n'''Response {\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"business_type\": null,\n \"capabilities\": {\n \"card_payments\": {\n \"requested\": true\n },\n \"transfers\": {\n \"requested\": true\n }\n },\n \"charges_enabled\": false,\n \"controller\": {\n \"type\": \"account\"\n },\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"jenny.rosen@example.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"requirements.past_due\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"custom\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.retrieve(\"acct_1032D82eZvKYlo2C\")\n'''Response {\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"business_type\": null,\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"controller\": {\n \"type\": \"account\"\n },\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"requirements.past_due\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"custom\"\n}'''"},{"nl":"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.\nTo 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\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.modify(\n \"acct_1032D82eZvKYlo2C\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"business_type\": null,\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"controller\": {\n \"type\": \"account\"\n },\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"requirements.past_due\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"standard\"\n}'''"},{"nl":"Delete an accountWith Connect, you can delete accounts you manage.\nAccounts 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.\nIf 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.delete(\"acct_1032D82eZvKYlo2C\")\n'''Response {\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"deleted\": true\n}'''"},{"nl":"Reject an accountWith Connect, you may flag accounts as suspicious.\nTest-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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.reject(\n \"acct_1032D82eZvKYlo2C\",\n reason=\"fraud\",\n)\n'''Response {\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"business_type\": null,\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"controller\": {\n \"type\": \"account\"\n },\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"rejected.fraud\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"custom\"\n}'''"},{"nl":"List all connected accountsReturns a list of accounts connected to your platform via Connect. If you\u2019re 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/accounts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"acct_1032D82eZvKYlo2C\",\n \"object\": \"account\",\n \"business_profile\": {\n \"mcc\": null,\n \"name\": \"Stripe.com\",\n \"product_description\": null,\n \"support_address\": null,\n \"support_email\": null,\n \"support_phone\": null,\n \"support_url\": null,\n \"url\": null\n },\n \"business_type\": null,\n \"capabilities\": {\n \"card_payments\": \"active\",\n \"transfers\": \"active\"\n },\n \"charges_enabled\": false,\n \"controller\": {\n \"type\": \"account\"\n },\n \"country\": \"US\",\n \"created\": 1385798567,\n \"default_currency\": \"usd\",\n \"details_submitted\": false,\n \"email\": \"site@stripe.com\",\n \"external_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\"\n },\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"metadata\": {},\n \"payouts_enabled\": false,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"disabled_reason\": \"rejected.fraud\",\n \"errors\": [],\n \"eventually_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"past_due\": [\n \"business_profile.mcc\",\n \"business_profile.product_description\",\n \"business_profile.support_phone\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"person_8UayFKIMRJklog.first_name\",\n \"person_8UayFKIMRJklog.last_name\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ],\n \"pending_verification\": []\n },\n \"settings\": {\n \"bacs_debit_payments\": {},\n \"branding\": {\n \"icon\": null,\n \"logo\": null,\n \"primary_color\": null,\n \"secondary_color\": null\n },\n \"card_issuing\": {\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null\n }\n },\n \"card_payments\": {\n \"decline_on\": {\n \"avs_failure\": true,\n \"cvc_failure\": false\n },\n \"statement_descriptor_prefix\": null,\n \"statement_descriptor_prefix_kanji\": null,\n \"statement_descriptor_prefix_kana\": null\n },\n \"dashboard\": {\n \"display_name\": \"Stripe.com\",\n \"timezone\": \"US\/Pacific\"\n },\n \"payments\": {\n \"statement_descriptor\": null,\n \"statement_descriptor_kana\": null,\n \"statement_descriptor_kanji\": null\n },\n \"payouts\": {\n \"debit_negative_balances\": true,\n \"schedule\": {\n \"delay_days\": 7,\n \"interval\": \"daily\"\n },\n \"statement_descriptor\": null\n },\n \"sepa_debit_payments\": {}\n },\n \"tos_acceptance\": {\n \"date\": null,\n \"ip\": null,\n \"user_agent\": null\n },\n \"type\": \"custom\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"The login link objectAttributes url string The URL for the login link.More attributesExpand all object string, value is \"login_link\" created timestamp","code":"'''The login link object {\n \"object\": \"login_link\",\n \"created\": 1659519654,\n \"url\": \"https:\/\/connect.stripe.com\/express\/X09dNBBXgfnV\"\n}\n'''"},{"nl":"Create a login linkCreates a single-use login link for an Express account to access their Stripe dashboard.\nYou may only create login links for Express accounts connected to your platform.ParametersNo parameters.ReturnsReturns a login link object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.create_login_link(\n \"acct_1032D82eZvKYlo2C\",\n)\n'''Response {\n \"object\": \"login_link\",\n \"created\": 1659519654,\n \"url\": \"https:\/\/connect.stripe.com\/express\/X09dNBBXgfnV\",\n \"id\": \"lael_MB04tZyQfNL5ik\"\n}'''"},{"nl":"Account LinksAccount Links are the means by which a Connect platform grants a connected account permission to access\nStripe-hosted applications, such as Connect Onboarding.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/account_links\n'''"},{"nl":"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","code":"'''The account link object {\n \"object\": \"account_link\",\n \"created\": 1659518871,\n \"expires_at\": 1659519171,\n \"url\": \"https:\/\/connect.stripe.com\/setup\/s\/acct_1032D82eZvKYlo2C\/NTrNjTttIi9Y\"\n}\n'''"},{"nl":"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\u2019s 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 \u201cedit my profile\u201d or \u201cupdate my verification information\u201d.More parametersExpand all collect optional Custom & Express only ReturnsReturns an account link object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.AccountLink.create(\n account=\"acct_1032D82eZvKYlo2C\",\n refresh_url=\"https:\/\/example.com\/reauth\",\n return_url=\"https:\/\/example.com\/return\",\n type=\"account_onboarding\",\n)\n'''Response {\n \"object\": \"account_link\",\n \"created\": 1659518871,\n \"expires_at\": 1659519171,\n \"url\": \"https:\/\/connect.stripe.com\/setup\/s\/acct_1032D82eZvKYlo2C\/NTrNjTttIi9Y\"\n}'''"},{"nl":"Application FeesWhen you collect a transaction fee on top of a charge made for your user\n(using Connect), an Application Fee object is created in\nyour account. You can list, retrieve, and refund application fees.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/application_fees\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/application_fees\n'''"},{"nl":"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","code":"'''The application fee object {\n \"id\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"object\": \"application_fee\",\n \"account\": \"acct_164wxjKbnvuxQXGu\",\n \"amount\": 105,\n \"amount_refunded\": 105,\n \"application\": \"ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7\",\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"charge\": \"ch_1B73DOKbnvuxQXGurbwPqzsu\",\n \"created\": 1506609734,\n \"currency\": \"gbp\",\n \"livemode\": false,\n \"originating_transaction\": null,\n \"refunded\": true,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"fr_1JAu9EKbnvuxQXGuRdZYkxVW\",\n \"object\": \"fee_refund\",\n \"amount\": 0,\n \"balance_transaction\": null,\n \"created\": 1625738880,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\n },\n {\n \"id\": \"fr_1HZK0UKbnvuxQXGuS428gH0W\",\n \"object\": \"fee_refund\",\n \"amount\": 0,\n \"balance_transaction\": null,\n \"created\": 1602005482,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n },\n {\n \"id\": \"fr_D0s7fGBKB40Twy\",\n \"object\": \"fee_refund\",\n \"amount\": 138,\n \"balance_transaction\": \"txn_1CaqNg2eZvKYlo2C75cA3Euk\",\n \"created\": 1528486576,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/application_fees\/fee_1B73DOKbnvuxQXGuhY8Aw0TN\/refunds\"\n }\n}\n'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ApplicationFee.retrieve(\n \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n)\n'''Response {\n \"id\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"object\": \"application_fee\",\n \"account\": \"acct_164wxjKbnvuxQXGu\",\n \"amount\": 105,\n \"amount_refunded\": 105,\n \"application\": \"ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7\",\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"charge\": \"ch_1B73DOKbnvuxQXGurbwPqzsu\",\n \"created\": 1506609734,\n \"currency\": \"gbp\",\n \"livemode\": false,\n \"originating_transaction\": null,\n \"refunded\": true,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"fr_1JAu9EKbnvuxQXGuRdZYkxVW\",\n \"object\": \"fee_refund\",\n \"amount\": 0,\n \"balance_transaction\": null,\n \"created\": 1625738880,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\n },\n {\n \"id\": \"fr_1HZK0UKbnvuxQXGuS428gH0W\",\n \"object\": \"fee_refund\",\n \"amount\": 0,\n \"balance_transaction\": null,\n \"created\": 1602005482,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n },\n {\n \"id\": \"fr_D0s7fGBKB40Twy\",\n \"object\": \"fee_refund\",\n \"amount\": 138,\n \"balance_transaction\": \"txn_1CaqNg2eZvKYlo2C75cA3Euk\",\n \"created\": 1528486576,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/application_fees\/fee_1B73DOKbnvuxQXGuhY8Aw0TN\/refunds\"\n }\n}'''"},{"nl":"List all application feesReturns a list of application fees you\u2019ve 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ApplicationFee.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/application_fees\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"object\": \"application_fee\",\n \"account\": \"acct_164wxjKbnvuxQXGu\",\n \"amount\": 105,\n \"amount_refunded\": 105,\n \"application\": \"ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7\",\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"charge\": \"ch_1B73DOKbnvuxQXGurbwPqzsu\",\n \"created\": 1506609734,\n \"currency\": \"gbp\",\n \"livemode\": false,\n \"originating_transaction\": null,\n \"refunded\": true,\n \"refunds\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"fr_1JAu9EKbnvuxQXGuRdZYkxVW\",\n \"object\": \"fee_refund\",\n \"amount\": 0,\n \"balance_transaction\": null,\n \"created\": 1625738880,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\n },\n {\n \"id\": \"fr_1HZK0UKbnvuxQXGuS428gH0W\",\n \"object\": \"fee_refund\",\n \"amount\": 0,\n \"balance_transaction\": null,\n \"created\": 1602005482,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n },\n {\n \"id\": \"fr_D0s7fGBKB40Twy\",\n \"object\": \"fee_refund\",\n \"amount\": 138,\n \"balance_transaction\": \"txn_1CaqNg2eZvKYlo2C75cA3Euk\",\n \"created\": 1528486576,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/application_fees\/fee_1B73DOKbnvuxQXGuhY8Aw0TN\/refunds\"\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Application Fee RefundsApplication Fee Refund objects allow you to refund an application fee that\nhas previously been created but not yet refunded. Funds will be refunded to\nthe Stripe account from which the fee was originally collected.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/application_fees\/:id\/refunds\u00a0\u00a0\u00a0GET\u00a0\/v1\/application_fees\/:id\/refunds\/:id\u00a0\u00a0POST\u00a0\/v1\/application_fees\/:id\/refunds\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/application_fees\/:id\/refunds\n'''"},{"nl":"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","code":"'''The application fee refund object {\n \"id\": \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n \"object\": \"fee_refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"created\": 1659518932,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n}\n'''"},{"nl":"Create an application fee refundRefunds an application fee that has previously been collected but not yet refunded.\nFunds will be refunded to the Stripe account from which the fee was originally collected.\nYou can optionally refund only part of an application fee.\nYou can do so multiple times, until the entire fee has been refunded.\nOnce entirely refunded, an application fee can\u2019t be refunded again.\nThis method will raise an error when called on an already-refunded application fee,\nor 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\nsucceeded. Raises an error\nif the fee has already been refunded,\nor if an invalid fee identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ApplicationFee.create_refund(\n \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n)\n'''Response {\n \"id\": \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n \"object\": \"fee_refund\",\n \"amount\": 100,\n \"balance_transaction\": null,\n \"created\": 1659518932,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ApplicationFee.retrieve_refund(\n \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n)\n'''Response {\n \"id\": \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n \"object\": \"fee_refund\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518932,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n}'''"},{"nl":"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.\nThis 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ApplicationFee.modify_refund(\n \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n \"object\": \"fee_refund\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518932,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {\n \"order_id\": \"6735\"\n }\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.ApplicationFee.list_refunds(\n \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/application_fees\/fee_1B73DOKbnvuxQXGuhY8Aw0TN\/fee_refunds\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"fr_1LSdsmKbnvuxQXGuvj6t3v8t\",\n \"object\": \"fee_refund\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1659518932,\n \"currency\": \"usd\",\n \"fee\": \"fee_1B73DOKbnvuxQXGuhY8Aw0TN\",\n \"metadata\": {}\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"CapabilitiesThis is an object representing a capability for a Stripe account.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/capabilities\/:id\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/capabilities\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/capabilities\n'''"},{"nl":"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","code":"'''The capability object {\n \"id\": \"card_payments\",\n \"object\": \"capability\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"requested\": true,\n \"requested_at\": 1659518932,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"status\": \"inactive\"\n}\n'''"},{"nl":"Retrieve an Account CapabilityRetrieves information about the specified Account Capability.ParametersNo parameters.ReturnsReturns an Account Capability object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.retrieve_capability(\n \"acct_1032D82eZvKYlo2C\",\n \"card_payments\",\n)\n'''Response {\n \"id\": \"card_payments\",\n \"object\": \"capability\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"requested\": true,\n \"requested_at\": 1659518932,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"status\": \"inactive\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.modify_capability(\n \"acct_1032D82eZvKYlo2C\",\n \"card_payments\",\n requested=True,\n)\n'''Response {\n \"id\": \"acap_1LSdsm2eZvKYlo2CW09gVzDk\",\n \"object\": \"capability\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"requested\": true,\n \"requested_at\": 1659518932,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"status\": \"inactive\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.list_capabilities(\n \"acct_1032D82eZvKYlo2C\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/capabilities\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"card_payments\",\n \"object\": \"capability\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"future_requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"requested\": true,\n \"requested_at\": 1659518932,\n \"requirements\": {\n \"alternatives\": [],\n \"current_deadline\": null,\n \"currently_due\": [],\n \"disabled_reason\": null,\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"status\": \"inactive\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Country SpecsStripe needs to collect certain pieces of information about each account\ncreated. These requirements can differ depending on the account's country. The\nCountry Specs API makes these rules available to your integration.You can also view the information from this API call as an online\nguide","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/country_specs\u00a0\u00a0\u00a0GET\u00a0\/v1\/country_specs\/:id\n'''"},{"nl":"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","code":"'''The country spec object {\n \"id\": \"US\",\n \"object\": \"country_spec\",\n \"default_currency\": \"usd\",\n \"supported_bank_account_currencies\": {\n \"usd\": [\n \"US\"\n ]\n },\n \"supported_payment_currencies\": [\n \"usd\",\n \"aed\",\n \"afn\",\n \"...\"\n ],\n \"supported_payment_methods\": [\n \"ach\",\n \"card\",\n \"stripe\"\n ],\n \"supported_transfer_countries\": [\n \"US\",\n \"AE\",\n \"AR\",\n \"AT\",\n \"AU\",\n \"BE\",\n \"BG\",\n \"BO\",\n \"CA\",\n \"CH\",\n \"CI\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"CY\",\n \"CZ\",\n \"DE\",\n \"DK\",\n \"DO\",\n \"EE\",\n \"EG\",\n \"ES\",\n \"FI\",\n \"FR\",\n \"GB\",\n \"GM\",\n \"GR\",\n \"HK\",\n \"HR\",\n \"HU\",\n \"ID\",\n \"IE\",\n \"IL\",\n \"IS\",\n \"IT\",\n \"JP\",\n \"KE\",\n \"KR\",\n \"LI\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"MA\",\n \"MT\",\n \"MX\",\n \"MY\",\n \"NL\",\n \"NO\",\n \"NZ\",\n \"PE\",\n \"PH\",\n \"PL\",\n \"PT\",\n \"PY\",\n \"RO\",\n \"RS\",\n \"SA\",\n \"SE\",\n \"SG\",\n \"SI\",\n \"SK\",\n \"SV\",\n \"TH\",\n \"TN\",\n \"TR\",\n \"TT\",\n \"UY\",\n \"ZA\",\n \"BD\",\n \"BJ\",\n \"JM\",\n \"MC\",\n \"NE\",\n \"SN\",\n \"AG\",\n \"BH\",\n \"GH\",\n \"GT\",\n \"GY\",\n \"KW\",\n \"LC\",\n \"MU\",\n \"NA\",\n \"SM\",\n \"AM\",\n \"BA\",\n \"OM\",\n \"PA\",\n \"AZ\",\n \"BN\",\n \"BT\",\n \"EC\",\n \"MD\",\n \"MK\",\n \"QA\"\n ],\n \"verification_fields\": {\n \"company\": {\n \"additional\": [],\n \"minimum\": [\n \"business_profile.mcc\",\n \"business_profile.url\",\n \"business_type\",\n \"company.address.city\",\n \"company.address.line1\",\n \"company.address.postal_code\",\n \"company.address.state\",\n \"company.name\",\n \"company.owners_provided\",\n \"company.phone\",\n \"company.tax_id\",\n \"external_account\",\n \"owners.address.city\",\n \"owners.address.line1\",\n \"owners.address.postal_code\",\n \"owners.address.state\",\n \"owners.dob.day\",\n \"owners.dob.month\",\n \"owners.dob.year\",\n \"owners.email\",\n \"owners.first_name\",\n \"owners.id_number\",\n \"owners.last_name\",\n \"owners.phone\",\n \"owners.ssn_last_4\",\n \"owners.verification.document\",\n \"representative.address.city\",\n \"representative.address.line1\",\n \"representative.address.postal_code\",\n \"representative.address.state\",\n \"representative.dob.day\",\n \"representative.dob.month\",\n \"representative.dob.year\",\n \"representative.email\",\n \"representative.first_name\",\n \"representative.id_number\",\n \"representative.last_name\",\n \"representative.phone\",\n \"representative.relationship.executive\",\n \"representative.relationship.title\",\n \"representative.ssn_last_4\",\n \"representative.verification.document\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ]\n },\n \"individual\": {\n \"additional\": [],\n \"minimum\": [\n \"business_profile.mcc\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"individual.address.city\",\n \"individual.address.line1\",\n \"individual.address.postal_code\",\n \"individual.address.state\",\n \"individual.dob.day\",\n \"individual.dob.month\",\n \"individual.dob.year\",\n \"individual.email\",\n \"individual.first_name\",\n \"individual.id_number\",\n \"individual.last_name\",\n \"individual.phone\",\n \"individual.ssn_last_4\",\n \"individual.verification.document\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ]\n }\n }\n}\n'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.CountrySpec.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/country_specs\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"US\",\n \"object\": \"country_spec\",\n \"default_currency\": \"usd\",\n \"supported_bank_account_currencies\": {\n \"usd\": [\n \"US\"\n ]\n },\n \"supported_payment_currencies\": [\n \"usd\",\n \"aed\",\n \"afn\",\n \"...\"\n ],\n \"supported_payment_methods\": [\n \"ach\",\n \"card\",\n \"stripe\"\n ],\n \"supported_transfer_countries\": [\n \"US\",\n \"AE\",\n \"AR\",\n \"AT\",\n \"AU\",\n \"BE\",\n \"BG\",\n \"BO\",\n \"CA\",\n \"CH\",\n \"CI\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"CY\",\n \"CZ\",\n \"DE\",\n \"DK\",\n \"DO\",\n \"EE\",\n \"EG\",\n \"ES\",\n \"FI\",\n \"FR\",\n \"GB\",\n \"GM\",\n \"GR\",\n \"HK\",\n \"HR\",\n \"HU\",\n \"ID\",\n \"IE\",\n \"IL\",\n \"IS\",\n \"IT\",\n \"JP\",\n \"KE\",\n \"KR\",\n \"LI\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"MA\",\n \"MT\",\n \"MX\",\n \"MY\",\n \"NL\",\n \"NO\",\n \"NZ\",\n \"PE\",\n \"PH\",\n \"PL\",\n \"PT\",\n \"PY\",\n \"RO\",\n \"RS\",\n \"SA\",\n \"SE\",\n \"SG\",\n \"SI\",\n \"SK\",\n \"SV\",\n \"TH\",\n \"TN\",\n \"TR\",\n \"TT\",\n \"UY\",\n \"ZA\",\n \"BD\",\n \"BJ\",\n \"JM\",\n \"MC\",\n \"NE\",\n \"SN\",\n \"AG\",\n \"BH\",\n \"GH\",\n \"GT\",\n \"GY\",\n \"KW\",\n \"LC\",\n \"MU\",\n \"NA\",\n \"SM\",\n \"AM\",\n \"BA\",\n \"OM\",\n \"PA\",\n \"AZ\",\n \"BN\",\n \"BT\",\n \"EC\",\n \"MD\",\n \"MK\",\n \"QA\"\n ],\n \"verification_fields\": {\n \"company\": {\n \"additional\": [],\n \"minimum\": [\n \"business_profile.mcc\",\n \"business_profile.url\",\n \"business_type\",\n \"company.address.city\",\n \"company.address.line1\",\n \"company.address.postal_code\",\n \"company.address.state\",\n \"company.name\",\n \"company.owners_provided\",\n \"company.phone\",\n \"company.tax_id\",\n \"external_account\",\n \"owners.address.city\",\n \"owners.address.line1\",\n \"owners.address.postal_code\",\n \"owners.address.state\",\n \"owners.dob.day\",\n \"owners.dob.month\",\n \"owners.dob.year\",\n \"owners.email\",\n \"owners.first_name\",\n \"owners.id_number\",\n \"owners.last_name\",\n \"owners.phone\",\n \"owners.ssn_last_4\",\n \"owners.verification.document\",\n \"representative.address.city\",\n \"representative.address.line1\",\n \"representative.address.postal_code\",\n \"representative.address.state\",\n \"representative.dob.day\",\n \"representative.dob.month\",\n \"representative.dob.year\",\n \"representative.email\",\n \"representative.first_name\",\n \"representative.id_number\",\n \"representative.last_name\",\n \"representative.phone\",\n \"representative.relationship.executive\",\n \"representative.relationship.title\",\n \"representative.ssn_last_4\",\n \"representative.verification.document\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ]\n },\n \"individual\": {\n \"additional\": [],\n \"minimum\": [\n \"business_profile.mcc\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"individual.address.city\",\n \"individual.address.line1\",\n \"individual.address.postal_code\",\n \"individual.address.state\",\n \"individual.dob.day\",\n \"individual.dob.month\",\n \"individual.dob.year\",\n \"individual.email\",\n \"individual.first_name\",\n \"individual.id_number\",\n \"individual.last_name\",\n \"individual.phone\",\n \"individual.ssn_last_4\",\n \"individual.verification.document\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ]\n }\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.CountrySpec.retrieve(\"US\")\n'''Response {\n \"id\": \"US\",\n \"object\": \"country_spec\",\n \"default_currency\": \"usd\",\n \"supported_bank_account_currencies\": {\n \"usd\": [\n \"US\"\n ]\n },\n \"supported_payment_currencies\": [\n \"usd\",\n \"aed\",\n \"afn\",\n \"...\"\n ],\n \"supported_payment_methods\": [\n \"ach\",\n \"card\",\n \"stripe\"\n ],\n \"supported_transfer_countries\": [\n \"US\",\n \"AE\",\n \"AR\",\n \"AT\",\n \"AU\",\n \"BE\",\n \"BG\",\n \"BO\",\n \"CA\",\n \"CH\",\n \"CI\",\n \"CL\",\n \"CO\",\n \"CR\",\n \"CY\",\n \"CZ\",\n \"DE\",\n \"DK\",\n \"DO\",\n \"EE\",\n \"EG\",\n \"ES\",\n \"FI\",\n \"FR\",\n \"GB\",\n \"GM\",\n \"GR\",\n \"HK\",\n \"HR\",\n \"HU\",\n \"ID\",\n \"IE\",\n \"IL\",\n \"IS\",\n \"IT\",\n \"JP\",\n \"KE\",\n \"KR\",\n \"LI\",\n \"LT\",\n \"LU\",\n \"LV\",\n \"MA\",\n \"MT\",\n \"MX\",\n \"MY\",\n \"NL\",\n \"NO\",\n \"NZ\",\n \"PE\",\n \"PH\",\n \"PL\",\n \"PT\",\n \"PY\",\n \"RO\",\n \"RS\",\n \"SA\",\n \"SE\",\n \"SG\",\n \"SI\",\n \"SK\",\n \"SV\",\n \"TH\",\n \"TN\",\n \"TR\",\n \"TT\",\n \"UY\",\n \"ZA\",\n \"BD\",\n \"BJ\",\n \"JM\",\n \"MC\",\n \"NE\",\n \"SN\",\n \"AG\",\n \"BH\",\n \"GH\",\n \"GT\",\n \"GY\",\n \"KW\",\n \"LC\",\n \"MU\",\n \"NA\",\n \"SM\",\n \"AM\",\n \"BA\",\n \"OM\",\n \"PA\",\n \"AZ\",\n \"BN\",\n \"BT\",\n \"EC\",\n \"MD\",\n \"MK\",\n \"QA\"\n ],\n \"verification_fields\": {\n \"company\": {\n \"additional\": [],\n \"minimum\": [\n \"business_profile.mcc\",\n \"business_profile.url\",\n \"business_type\",\n \"company.address.city\",\n \"company.address.line1\",\n \"company.address.postal_code\",\n \"company.address.state\",\n \"company.name\",\n \"company.owners_provided\",\n \"company.phone\",\n \"company.tax_id\",\n \"external_account\",\n \"owners.address.city\",\n \"owners.address.line1\",\n \"owners.address.postal_code\",\n \"owners.address.state\",\n \"owners.dob.day\",\n \"owners.dob.month\",\n \"owners.dob.year\",\n \"owners.email\",\n \"owners.first_name\",\n \"owners.id_number\",\n \"owners.last_name\",\n \"owners.phone\",\n \"owners.ssn_last_4\",\n \"owners.verification.document\",\n \"representative.address.city\",\n \"representative.address.line1\",\n \"representative.address.postal_code\",\n \"representative.address.state\",\n \"representative.dob.day\",\n \"representative.dob.month\",\n \"representative.dob.year\",\n \"representative.email\",\n \"representative.first_name\",\n \"representative.id_number\",\n \"representative.last_name\",\n \"representative.phone\",\n \"representative.relationship.executive\",\n \"representative.relationship.title\",\n \"representative.ssn_last_4\",\n \"representative.verification.document\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ]\n },\n \"individual\": {\n \"additional\": [],\n \"minimum\": [\n \"business_profile.mcc\",\n \"business_profile.url\",\n \"business_type\",\n \"external_account\",\n \"individual.address.city\",\n \"individual.address.line1\",\n \"individual.address.postal_code\",\n \"individual.address.state\",\n \"individual.dob.day\",\n \"individual.dob.month\",\n \"individual.dob.year\",\n \"individual.email\",\n \"individual.first_name\",\n \"individual.id_number\",\n \"individual.last_name\",\n \"individual.phone\",\n \"individual.ssn_last_4\",\n \"individual.verification.document\",\n \"tos_acceptance.date\",\n \"tos_acceptance.ip\"\n ]\n }\n }\n}'''"},{"nl":"External AccountsExternal Accounts are transfer destinations on Account objects for\nconnected accounts. They can be bank accounts or\ndebit cards.Bank accounts and debit\ncards can also be used as payment sources\non regular charges, and are documented in the links above.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/external_accounts\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/external_accounts\/:id\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/external_accounts\/:idDELETE\u00a0\/v1\/accounts\/:id\/external_accounts\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/external_accounts?object=bank_account\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/external_accounts\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/external_accounts\/:id\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/external_accounts\/:idDELETE\u00a0\/v1\/accounts\/:id\/external_accounts\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/external_accounts?object=card\n'''"},{"nl":"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\u2019t 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\u2019t 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\u2019ll set the status to errored and will not continue to send transfers until the bank details are updated.\nFor external accounts, possible values are new and errored. Validations aren\u2019t run against external accounts because they\u2019re only used for payouts. This means the other statuses don\u2019t 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","code":"'''The (account) bank account object {\n \"id\": \"ba_1LSds92eZvKYlo2CqMnJaute\",\n \"object\": \"bank_account\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"individual\",\n \"account_type\": null,\n \"available_payout_methods\": [\n \"standard\"\n ],\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtz\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n}\n'''"},{"nl":"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\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.create_external_account(\n \"acct_1032D82eZvKYlo2C\",\n external_account=\"btok_1LSds72eZvKYlo2Cn81vxdpp\",\n)\n'''Response {\n \"id\": \"ba_1LSds32eZvKYlo2C27ZyVavY\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\",\n \"account\": \"acct_1032D82eZvKYlo2C\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.retrieve_external_account(\n \"acct_1032D82eZvKYlo2C\",\n \"ba_1LSds92eZvKYlo2CqMnJaute\",\n)\n'''Response {\n \"id\": \"ba_1LSds32eZvKYlo2C27ZyVavY\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"customer\": null,\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\"\n}'''"},{"nl":"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.\nYou 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.modify_external_account(\n \"acct_1032D82eZvKYlo2C\",\n \"ba_1LSds32eZvKYlo2C27ZyVavY\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ba_1LSds32eZvKYlo2C27ZyVavY\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"routing_number\": \"110000000\",\n \"status\": \"new\",\n \"account\": \"acct_1032D82eZvKYlo2C\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.delete_external_account(\n \"acct_1032D82eZvKYlo2C\",\n \"ba_1LSds32eZvKYlo2C27ZyVavY\",\n)\n'''Response {\n \"id\": \"ba_1LSds92eZvKYlo2CqMnJaute\",\n \"object\": \"bank_account\",\n \"deleted\": true\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.list_external_accounts(\n \"acct_1032D82eZvKYlo2C\",\n object=\"bank_account\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ba_1LSds32eZvKYlo2C27ZyVavY\",\n \"object\": \"bank_account\",\n \"account_holder_name\": \"Jane Austen\",\n \"account_holder_type\": \"company\",\n \"account_type\": null,\n \"bank_name\": \"STRIPE TEST BANK\",\n \"country\": \"US\",\n \"currency\": \"usd\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"metadata\": {},\n \"routing_number\": \"110000000\",\n \"status\": \"new\",\n \"account\": \"acct_1032D82eZvKYlo2C\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"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\u2019ve 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\u2019t 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\u2019s expiration month. exp_year integer Four-digit number representing the card\u2019s expiration year. fingerprint string Uniquely identifies this particular card number. You can use this attribute to check whether two customers who\u2019ve 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.\nStarting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card \u2014 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","code":"'''The (account) card object {\n \"id\": \"card_1LSds52eZvKYlo2C2trSBqxB\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"customer\": null,\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null\n}\n'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.create_external_account(\n \"acct_1032D82eZvKYlo2C\",\n external_account=\"tok_visa_debit\",\n)\n'''Response {\n \"id\": \"card_1LSds52eZvKYlo2C2trSBqxB\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null,\n \"account\": \"acct_1032D82eZvKYlo2C\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.retrieve_external_account(\n \"acct_1032D82eZvKYlo2C\",\n \"card_1LSds52eZvKYlo2C2trSBqxB\",\n)\n'''Response {\n \"id\": \"card_1LSds52eZvKYlo2C2trSBqxB\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null,\n \"account\": \"acct_1032D82eZvKYlo2C\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.modify_external_account(\n \"acct_1032D82eZvKYlo2C\",\n \"card_1LSds52eZvKYlo2C2trSBqxB\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"card_1LSds52eZvKYlo2C2trSBqxB\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"redaction\": null,\n \"tokenization_method\": null,\n \"account\": \"acct_1032D82eZvKYlo2C\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.delete_external_account(\n \"acct_1032D82eZvKYlo2C\",\n \"card_1LSds52eZvKYlo2C2trSBqxB\",\n)\n'''Response {\n \"id\": \"card_1LSds52eZvKYlo2C2trSBqxB\",\n \"object\": \"card\",\n \"deleted\": true\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.list_external_accounts(\n \"acct_1032D82eZvKYlo2C\",\n object=\"card\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/external_accounts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"card_1LSds52eZvKYlo2C2trSBqxB\",\n \"object\": \"card\",\n \"address_city\": null,\n \"address_country\": null,\n \"address_line1\": null,\n \"address_line1_check\": null,\n \"address_line2\": null,\n \"address_state\": null,\n \"address_zip\": null,\n \"address_zip_check\": null,\n \"brand\": \"Visa\",\n \"country\": \"US\",\n \"cvc_check\": \"pass\",\n \"dynamic_last4\": null,\n \"exp_month\": 8,\n \"exp_year\": 2023,\n \"fingerprint\": \"Xt5EWLLDS7FJjR1c\",\n \"funding\": \"credit\",\n \"last4\": \"4242\",\n \"metadata\": {},\n \"name\": null,\n \"redaction\": null,\n \"tokenization_method\": null,\n \"account\": \"acct_1032D82eZvKYlo2C\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"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.\nSee the Standard onboarding or Express onboarding documentation for information about platform pre-filling and account onboarding steps.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/persons\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/persons\/:id\u00a0\u00a0POST\u00a0\/v1\/accounts\/:id\/persons\/:idDELETE\u00a0\/v1\/accounts\/:id\/persons\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/accounts\/:id\/persons\n'''"},{"nl":"The person objectAttributes id string Unique identifier for the object. account string The account the person is associated with. address hash The person\u2019s address.Show child attributes dob hash The person\u2019s date of birth.Show child attributes email string The person\u2019s email address. first_name string The person\u2019s first name. last_name string The person\u2019s 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\u2019s phone number. relationship hash Describes the person\u2019s 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","code":"'''The person object {\n \"id\": \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n \"object\": \"person\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"created\": 1659519729,\n \"dob\": {\n \"day\": null,\n \"month\": null,\n \"year\": null\n },\n \"first_name\": null,\n \"future_requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"id_number_provided\": false,\n \"last_name\": null,\n \"metadata\": {},\n \"relationship\": {\n \"director\": false,\n \"executive\": false,\n \"owner\": false,\n \"percent_ownership\": null,\n \"representative\": false,\n \"title\": null\n },\n \"requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"ssn_last_4_provided\": false,\n \"verification\": {\n \"additional_document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"details\": null,\n \"details_code\": null,\n \"document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"status\": \"unverified\"\n }\n}\n'''"},{"nl":"Create a personCreates a new person.Parameters address optional dictionary The person\u2019s address.Show child parameters dob optional dictionary The person\u2019s date of birth.Show child parameters email optional The person\u2019s email address. first_name optional The person\u2019s first name. id_number optional The person\u2019s 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\u2019s 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\u2019s phone number. relationship optional dictionary The relationship that this person has with the account\u2019s legal entity.Show child parameters ssn_last_4 optional The last four digits of the person\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.create_person(\n \"acct_1032D82eZvKYlo2C\",\n first_name=\"Jane\",\n last_name=\"Diaz\",\n)\n'''Response {\n \"id\": \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n \"object\": \"person\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"created\": 1659519729,\n \"dob\": {\n \"day\": null,\n \"month\": null,\n \"year\": null\n },\n \"first_name\": null,\n \"future_requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"id_number_provided\": false,\n \"last_name\": null,\n \"metadata\": {},\n \"relationship\": {\n \"director\": false,\n \"executive\": false,\n \"owner\": false,\n \"percent_ownership\": null,\n \"representative\": false,\n \"title\": null\n },\n \"requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"ssn_last_4_provided\": false,\n \"verification\": {\n \"additional_document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"details\": null,\n \"details_code\": null,\n \"document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"status\": \"unverified\"\n }\n}'''"},{"nl":"Retrieve a personRetrieves an existing person.ParametersNo parameters.ReturnsReturns a person object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.retrieve_person(\n \"acct_1032D82eZvKYlo2C\",\n \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n)\n'''Response {\n \"id\": \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n \"object\": \"person\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"created\": 1659519729,\n \"dob\": {\n \"day\": null,\n \"month\": null,\n \"year\": null\n },\n \"first_name\": null,\n \"future_requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"id_number_provided\": false,\n \"last_name\": null,\n \"metadata\": {},\n \"relationship\": {\n \"director\": false,\n \"executive\": false,\n \"owner\": false,\n \"percent_ownership\": null,\n \"representative\": false,\n \"title\": null\n },\n \"requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"ssn_last_4_provided\": false,\n \"verification\": {\n \"additional_document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"details\": null,\n \"details_code\": null,\n \"document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"status\": \"unverified\"\n }\n}'''"},{"nl":"Update a personUpdates an existing person.Parameters address optional dictionary The person\u2019s address.Show child parameters dob optional dictionary The person\u2019s date of birth.Show child parameters email optional The person\u2019s email address. first_name optional The person\u2019s first name. id_number optional The person\u2019s 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\u2019s 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\u2019s phone number. relationship optional dictionary The relationship that this person has with the account\u2019s legal entity.Show child parameters ssn_last_4 optional The last four digits of the person\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.modify_person(\n \"acct_1032D82eZvKYlo2C\",\n \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n \"object\": \"person\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"created\": 1659519729,\n \"dob\": {\n \"day\": null,\n \"month\": null,\n \"year\": null\n },\n \"first_name\": null,\n \"future_requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"id_number_provided\": false,\n \"last_name\": null,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"relationship\": {\n \"director\": false,\n \"executive\": false,\n \"owner\": false,\n \"percent_ownership\": null,\n \"representative\": false,\n \"title\": null\n },\n \"requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"ssn_last_4_provided\": false,\n \"verification\": {\n \"additional_document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"details\": null,\n \"details_code\": null,\n \"document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"status\": \"unverified\"\n }\n}'''"},{"nl":"Delete a personDeletes an existing person\u2019s relationship to the account\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.delete_person(\n \"acct_1032D82eZvKYlo2C\",\n \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n)\n'''Response {\n \"id\": \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n \"object\": \"person\",\n \"deleted\": true\n}'''"},{"nl":"List all personsReturns a list of people associated with the account\u2019s 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\u2019s relationship to the account\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Account.list_persons(\n \"acct_1032D82eZvKYlo2C\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/accounts\/acct_1032D82eZvKYlo2C\/persons\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"person_1LSe5d2eZvKYlo2CpJsBMQu0\",\n \"object\": \"person\",\n \"account\": \"acct_1032D82eZvKYlo2C\",\n \"created\": 1659519729,\n \"dob\": {\n \"day\": null,\n \"month\": null,\n \"year\": null\n },\n \"first_name\": null,\n \"future_requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"id_number_provided\": false,\n \"last_name\": null,\n \"metadata\": {},\n \"relationship\": {\n \"director\": false,\n \"executive\": false,\n \"owner\": false,\n \"percent_ownership\": null,\n \"representative\": false,\n \"title\": null\n },\n \"requirements\": {\n \"alternatives\": [],\n \"currently_due\": [],\n \"errors\": [],\n \"eventually_due\": [],\n \"past_due\": [],\n \"pending_verification\": []\n },\n \"ssn_last_4_provided\": false,\n \"verification\": {\n \"additional_document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"details\": null,\n \"details_code\": null,\n \"document\": {\n \"back\": null,\n \"details\": null,\n \"details_code\": null,\n \"front\": null\n },\n \"status\": \"unverified\"\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Top-upsTo top up your Stripe balance, you create a top-up object. You can retrieve\nindividual top-ups, as well as list all top-ups. Top-ups are identified by a\nunique, random ID.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/topups\u00a0\u00a0\u00a0GET\u00a0\/v1\/topups\/:id\u00a0\u00a0POST\u00a0\/v1\/topups\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/topups\u00a0\u00a0POST\u00a0\/v1\/topups\/:id\/cancel\n'''"},{"nl":"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","code":"'''The top-up object {\n \"id\": \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n \"object\": \"topup\",\n \"amount\": 1000,\n \"balance_transaction\": null,\n \"created\": 123456789,\n \"currency\": \"usd\",\n \"description\": \"Top-up description\",\n \"expected_availability_date\": 123456789,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"12345678\"\n },\n \"source\": {\n \"id\": \"src_1LSdsB2eZvKYlo2CYlHKaT69\",\n \"object\": \"source\",\n \"ach_debit\": {\n \"country\": \"US\",\n \"type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"5Wh4KBcfDrz5IOnx\",\n \"last4\": \"6789\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I\",\n \"created\": 1659518895,\n \"currency\": \"usd\",\n \"flow\": \"code_verification\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": \"Jenny Rosen\",\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_debit\",\n \"usage\": \"reusable\"\n },\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"transfer_group\": null\n}\n'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.Topup.create(\n amount=2000,\n currency=\"usd\",\n description=\"Top-up for Jenny Rosen\",\n statement_descriptor=\"Top-up\",\n)\n'''Response {\n \"id\": \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n \"object\": \"topup\",\n \"amount\": 2000,\n \"balance_transaction\": null,\n \"created\": 123456789,\n \"currency\": \"usd\",\n \"description\": \"Top-up for Jenny Rosen\",\n \"expected_availability_date\": 123456789,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"12345678\"\n },\n \"source\": {\n \"id\": \"src_1LSdsB2eZvKYlo2CYlHKaT69\",\n \"object\": \"source\",\n \"ach_debit\": {\n \"country\": \"US\",\n \"type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"5Wh4KBcfDrz5IOnx\",\n \"last4\": \"6789\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I\",\n \"created\": 1659518895,\n \"currency\": \"usd\",\n \"flow\": \"code_verification\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": \"Jenny Rosen\",\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_debit\",\n \"usage\": \"reusable\"\n },\n \"statement_descriptor\": \"Top-up\",\n \"status\": \"pending\",\n \"transfer_group\": null\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.Topup.retrieve(\n \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n)\n'''Response {\n \"id\": \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n \"object\": \"topup\",\n \"amount\": 1000,\n \"balance_transaction\": null,\n \"created\": 123456789,\n \"currency\": \"usd\",\n \"description\": \"Top-up description\",\n \"expected_availability_date\": 123456789,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"12345678\"\n },\n \"source\": {\n \"id\": \"src_1LSdsB2eZvKYlo2CYlHKaT69\",\n \"object\": \"source\",\n \"ach_debit\": {\n \"country\": \"US\",\n \"type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"5Wh4KBcfDrz5IOnx\",\n \"last4\": \"6789\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I\",\n \"created\": 1659518895,\n \"currency\": \"usd\",\n \"flow\": \"code_verification\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": \"Jenny Rosen\",\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_debit\",\n \"usage\": \"reusable\"\n },\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"transfer_group\": null\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.Topup.modify(\n \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n \"object\": \"topup\",\n \"amount\": 1000,\n \"balance_transaction\": null,\n \"created\": 123456789,\n \"currency\": \"usd\",\n \"description\": \"Top-up description\",\n \"expected_availability_date\": 123456789,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"source\": {\n \"id\": \"src_1LSdsB2eZvKYlo2CYlHKaT69\",\n \"object\": \"source\",\n \"ach_debit\": {\n \"country\": \"US\",\n \"type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"5Wh4KBcfDrz5IOnx\",\n \"last4\": \"6789\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I\",\n \"created\": 1659518895,\n \"currency\": \"usd\",\n \"flow\": \"code_verification\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": \"Jenny Rosen\",\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_debit\",\n \"usage\": \"reusable\"\n },\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"transfer_group\": null\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.Topup.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/topups\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n \"object\": \"topup\",\n \"amount\": 1000,\n \"balance_transaction\": null,\n \"created\": 123456789,\n \"currency\": \"usd\",\n \"description\": \"Top-up description\",\n \"expected_availability_date\": 123456789,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"12345678\"\n },\n \"source\": {\n \"id\": \"src_1LSdsB2eZvKYlo2CYlHKaT69\",\n \"object\": \"source\",\n \"ach_debit\": {\n \"country\": \"US\",\n \"type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"5Wh4KBcfDrz5IOnx\",\n \"last4\": \"6789\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I\",\n \"created\": 1659518895,\n \"currency\": \"usd\",\n \"flow\": \"code_verification\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": \"Jenny Rosen\",\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_debit\",\n \"usage\": \"reusable\"\n },\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"transfer_group\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"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\u2019t be canceled, an error is returned","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.Topup.cancel(\"tu_1LSdsB2eZvKYlo2CPBrD5rKA\")\n'''Response {\n \"id\": \"tu_1LSdsB2eZvKYlo2CPBrD5rKA\",\n \"object\": \"topup\",\n \"amount\": 1000,\n \"balance_transaction\": null,\n \"created\": 123456789,\n \"currency\": \"usd\",\n \"description\": \"Top-up for Jenny Rosen\",\n \"expected_availability_date\": 123456789,\n \"failure_code\": null,\n \"failure_message\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"12345678\"\n },\n \"source\": {\n \"id\": \"src_1LSdsB2eZvKYlo2CYlHKaT69\",\n \"object\": \"source\",\n \"ach_debit\": {\n \"country\": \"US\",\n \"type\": \"individual\",\n \"routing_number\": \"110000000\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"5Wh4KBcfDrz5IOnx\",\n \"last4\": \"6789\"\n },\n \"amount\": null,\n \"client_secret\": \"src_client_secret_ZM2Yk0vVDyBHyoH4ygVj8n1I\",\n \"created\": 1659518895,\n \"currency\": \"usd\",\n \"flow\": \"code_verification\",\n \"livemode\": false,\n \"metadata\": {},\n \"owner\": {\n \"address\": null,\n \"email\": \"jenny.rosen@example.com\",\n \"name\": \"Jenny Rosen\",\n \"phone\": null,\n \"verified_address\": null,\n \"verified_email\": null,\n \"verified_name\": null,\n \"verified_phone\": null\n },\n \"redaction\": null,\n \"statement_descriptor\": null,\n \"status\": \"pending\",\n \"type\": \"ach_debit\",\n \"usage\": \"reusable\"\n },\n \"statement_descriptor\": null,\n \"status\": \"canceled\",\n \"transfer_group\": null\n}'''"},{"nl":"TransfersA Transfer object is created when you move funds between Stripe accounts as\npart of Connect.Before April 6, 2017, transfers also represented movement of funds from a\nStripe account to a card or bank account. This behavior has since been split\nout into a Payout object, with corresponding payout endpoints. For more\ninformation, read about the\ntransfer\/payout split.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/transfers\u00a0\u00a0\u00a0GET\u00a0\/v1\/transfers\/:id\u00a0\u00a0POST\u00a0\/v1\/transfers\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/transfers\n'''"},{"nl":"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","code":"'''The transfer object {\n \"id\": \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"object\": \"transfer\",\n \"amount\": 8000,\n \"amount_reversed\": 400,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1655763124,\n \"currency\": \"usd\",\n \"description\": \"files\",\n \"destination\": \"acct_1AojmwI9Pbw6jkMZ\",\n \"destination_payment\": \"py_1LCspEI9Pbw6jkMZFXNCdw6R\",\n \"livemode\": false,\n \"metadata\": {},\n \"reversals\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOIHA2eZvKYlo2C5BcdzQSo\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIHA2eZvKYlo2Cipghkcca\",\n \"created\": 1658482564,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOHcd2eZvKYlo2Cnij37pKX\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOHcd2eZvKYlo2C29QFNLJI\",\n \"created\": 1658480051,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOHcdI9Pbw6jkMZiDv4NOH4\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LNxbx2eZvKYlo2CUmCEbiBC\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LNxbx2eZvKYlo2CO2wY5Zen\",\n \"created\": 1658403129,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LNxbxI9Pbw6jkMZHiYe6cyc\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/transfers\/tr_3LCspD2eZvKYlo2C02wegtL1\/reversals\"\n },\n \"reversed\": false,\n \"source_transaction\": \"ch_3LCspD2eZvKYlo2C0x1hr0GY\",\n \"source_type\": \"card\",\n \"transfer_group\": \"group_pi_3LCspD2eZvKYlo2C0vli1FBj\"\n}\n'''"},{"nl":"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\u2019ll receive an \u201cInsufficient Funds\u201d 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)","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.create(\n amount=400,\n currency=\"usd\",\n destination=\"acct_1032D82eZvKYlo2C\",\n transfer_group=\"ORDER_95\",\n)\n'''Response {\n \"id\": \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"object\": \"transfer\",\n \"amount\": 400,\n \"amount_reversed\": 400,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1655763124,\n \"currency\": \"usd\",\n \"description\": \"files\",\n \"destination\": \"acct_1032D82eZvKYlo2C\",\n \"destination_payment\": \"py_1LCspEI9Pbw6jkMZFXNCdw6R\",\n \"livemode\": false,\n \"metadata\": {},\n \"reversals\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOIHA2eZvKYlo2C5BcdzQSo\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIHA2eZvKYlo2Cipghkcca\",\n \"created\": 1658482564,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOHcd2eZvKYlo2Cnij37pKX\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOHcd2eZvKYlo2C29QFNLJI\",\n \"created\": 1658480051,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOHcdI9Pbw6jkMZiDv4NOH4\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LNxbx2eZvKYlo2CUmCEbiBC\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LNxbx2eZvKYlo2CO2wY5Zen\",\n \"created\": 1658403129,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LNxbxI9Pbw6jkMZHiYe6cyc\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/transfers\/tr_3LCspD2eZvKYlo2C02wegtL1\/reversals\"\n },\n \"reversed\": false,\n \"source_transaction\": \"ch_3LCspD2eZvKYlo2C0x1hr0GY\",\n \"source_type\": \"card\",\n \"transfer_group\": \"ORDER_95\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.retrieve(\n \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n)\n'''Response {\n \"id\": \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"object\": \"transfer\",\n \"amount\": 8000,\n \"amount_reversed\": 400,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1655763124,\n \"currency\": \"usd\",\n \"description\": \"files\",\n \"destination\": \"acct_1AojmwI9Pbw6jkMZ\",\n \"destination_payment\": \"py_1LCspEI9Pbw6jkMZFXNCdw6R\",\n \"livemode\": false,\n \"metadata\": {},\n \"reversals\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOIHA2eZvKYlo2C5BcdzQSo\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIHA2eZvKYlo2Cipghkcca\",\n \"created\": 1658482564,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOHcd2eZvKYlo2Cnij37pKX\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOHcd2eZvKYlo2C29QFNLJI\",\n \"created\": 1658480051,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOHcdI9Pbw6jkMZiDv4NOH4\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LNxbx2eZvKYlo2CUmCEbiBC\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LNxbx2eZvKYlo2CO2wY5Zen\",\n \"created\": 1658403129,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LNxbxI9Pbw6jkMZHiYe6cyc\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/transfers\/tr_3LCspD2eZvKYlo2C02wegtL1\/reversals\"\n },\n \"reversed\": false,\n \"source_transaction\": \"ch_3LCspD2eZvKYlo2C0x1hr0GY\",\n \"source_type\": \"card\",\n \"transfer_group\": \"group_pi_3LCspD2eZvKYlo2C0vli1FBj\"\n}'''"},{"nl":"Update a transferUpdates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.\nThis 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.modify(\n \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"object\": \"transfer\",\n \"amount\": 8000,\n \"amount_reversed\": 400,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1655763124,\n \"currency\": \"usd\",\n \"description\": \"files\",\n \"destination\": \"acct_1AojmwI9Pbw6jkMZ\",\n \"destination_payment\": \"py_1LCspEI9Pbw6jkMZFXNCdw6R\",\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"reversals\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOIHA2eZvKYlo2C5BcdzQSo\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIHA2eZvKYlo2Cipghkcca\",\n \"created\": 1658482564,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOHcd2eZvKYlo2Cnij37pKX\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOHcd2eZvKYlo2C29QFNLJI\",\n \"created\": 1658480051,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOHcdI9Pbw6jkMZiDv4NOH4\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LNxbx2eZvKYlo2CUmCEbiBC\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LNxbx2eZvKYlo2CO2wY5Zen\",\n \"created\": 1658403129,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LNxbxI9Pbw6jkMZHiYe6cyc\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/transfers\/tr_3LCspD2eZvKYlo2C02wegtL1\/reversals\"\n },\n \"reversed\": false,\n \"source_transaction\": \"ch_3LCspD2eZvKYlo2C0x1hr0GY\",\n \"source_type\": \"card\",\n \"transfer_group\": \"group_pi_3LCspD2eZvKYlo2C0vli1FBj\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/transfers\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"object\": \"transfer\",\n \"amount\": 8000,\n \"amount_reversed\": 400,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1655763124,\n \"currency\": \"usd\",\n \"description\": \"files\",\n \"destination\": \"acct_1AojmwI9Pbw6jkMZ\",\n \"destination_payment\": \"py_1LCspEI9Pbw6jkMZFXNCdw6R\",\n \"livemode\": false,\n \"metadata\": {},\n \"reversals\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOIHA2eZvKYlo2C5BcdzQSo\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIHA2eZvKYlo2Cipghkcca\",\n \"created\": 1658482564,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIH9I9Pbw6jkMZdhQ81UQ9\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LOHcd2eZvKYlo2Cnij37pKX\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOHcd2eZvKYlo2C29QFNLJI\",\n \"created\": 1658480051,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOHcdI9Pbw6jkMZiDv4NOH4\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {\n \"id\": \"trr_1LNxbx2eZvKYlo2CUmCEbiBC\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LNxbx2eZvKYlo2CO2wY5Zen\",\n \"created\": 1658403129,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LNxbxI9Pbw6jkMZHiYe6cyc\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/transfers\/tr_3LCspD2eZvKYlo2C02wegtL1\/reversals\"\n },\n \"reversed\": false,\n \"source_transaction\": \"ch_3LCspD2eZvKYlo2C0x1hr0GY\",\n \"source_type\": \"card\",\n \"transfer_group\": \"group_pi_3LCspD2eZvKYlo2C0vli1FBj\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Transfer ReversalsStripe Connect platforms can reverse transfers made to a\nconnected account, either entirely or partially, and can also specify whether\nto refund any related application fees. Transfer reversals add to the\nplatform's balance and subtract from the destination account's balance.Reversing a transfer that was made for a destination\ncharge is allowed only up to the amount of\nthe charge. It is possible to reverse a\ntransfer_group\ntransfer only if the destination account has enough balance to cover the\nreversal.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/transfers\/:id\/reversals\u00a0\u00a0\u00a0GET\u00a0\/v1\/transfers\/:id\/reversals\/:id\u00a0\u00a0POST\u00a0\/v1\/transfers\/:id\/reversals\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/transfers\/:id\/reversals\n'''"},{"nl":"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 ","code":"'''The transfer reversal object {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n}\n'''"},{"nl":"Create a transfer reversalWhen you create a new reversal, you must specify a transfer to create it on.\nWhen 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.\nOnce entirely reversed, a transfer can\u2019t 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.create_reversal(\n \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n amount=100,\n)\n'''Response {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1LOIlS2eZvKYlo2CqVLqZUir\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.retrieve_reversal(\n \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n)\n'''Response {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n}'''"},{"nl":"Update a reversalUpdates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.\nThis 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.modify_reversal(\n \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Transfer.list_reversals(\n \"tr_3LCspD2eZvKYlo2C02wegtL1\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/transfers\/tr_3LCspD2eZvKYlo2C02wegtL1\/reversals\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"trr_1LOIlS2eZvKYlo2C4uzbNRsJ\",\n \"object\": \"transfer_reversal\",\n \"amount\": 100,\n \"balance_transaction\": \"txn_1032HU2eZvKYlo2CEPtcnUvl\",\n \"created\": 1658484442,\n \"currency\": \"usd\",\n \"destination_payment_refund\": \"pyr_1LOIlSI9Pbw6jkMZi6TfasGy\",\n \"metadata\": {},\n \"source_refund\": null,\n \"transfer\": \"tr_3LCspD2eZvKYlo2C02wegtL1\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"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.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/apps\/secrets\u00a0\u00a0\u00a0GET\u00a0\/v1\/apps\/secrets\/find\u00a0\u00a0POST\u00a0\/v1\/apps\/secrets\/delete\u00a0\u00a0\u00a0GET\u00a0\/v1\/apps\/secrets\n'''"},{"nl":"The Secret objectAttributes id string Unique identifier for the object. object string, value is \"apps.secret\" String representing the object\u2019s 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\u2019s 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","code":"'''The Secret object {\n \"id\": \"appsecret_5110QzMIZ0005GiEH1m0419O8KAxCG\",\n \"object\": \"apps.secret\",\n \"created\": 1659519,\n \"expires_at\": null,\n \"livemode\": false,\n \"name\": \"test-secret\",\n \"scope\": {\n \"type\": \"account\"\n }\n}\n'''"},{"nl":"Set a SecretCreate or replace a secret in the secret store.Parameters name required A name for the secret that\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.apps.Secret.create(\n name=\"my-api-key\",\n payload=\"secret_key_xxxxxx\",\n scope={\"type\": \"account\"},\n)\n'''Response {\n \"id\": \"appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy\",\n \"object\": \"apps.secret\",\n \"created\": 1648494781232,\n \"expires_at\": null,\n \"livemode\": false,\n \"name\": \"my-api-key\",\n \"scope\": {\n \"type\": \"account\"\n }\n}'''"},{"nl":"Find a SecretFinds a secret in the secret store by name and scope.Parameters name required A name for the secret that\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.apps.Secret.find(\n name=\"my-api-key\",\n scope={\"type\": \"account\"},\n)\n'''Response {\n \"id\": \"appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy\",\n \"object\": \"apps.secret\",\n \"created\": 1648494781232,\n \"expires_at\": null,\n \"livemode\": false,\n \"name\": \"my-api-key\",\n \"scope\": {\n \"type\": \"account\"\n }\n}'''"},{"nl":"Delete a SecretDeletes a secret from the secret store by name and scope.Parameters name required A name for the secret that\u2019s 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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.apps.Secret.delete_where(\n name=\"my-api-key\",\n scope={\"type\": \"account\"},\n)\n'''Response {\n \"id\": \"appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy\",\n \"object\": \"apps.secret\",\n \"created\": 1648494781232,\n \"expires_at\": null,\n \"livemode\": false,\n \"name\": \"my-api-key\",\n \"scope\": {\n \"type\": \"account\"\n },\n \"deleted\": true\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.apps.Secret.list(\n scope={\"type\": \"account\"},\n limit=2,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/apps\/secrets\",\n \"has_more\": false,\n \"data\": [\n {\n \"object\": \"list\",\n \"url\": \"\/v1\/apps\/secrets\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy\",\n \"object\": \"apps.secret\",\n \"created\": 1648494781232,\n \"expires_at\": null,\n \"livemode\": false,\n \"name\": \"my-api-key\",\n \"scope\": {\n \"type\": \"account\"\n }\n },\n {\n \"id\": \"appsecret_5110UWLXV0040GHjtzG1F5WYaFhJjy\",\n \"object\": \"apps.secret\",\n \"created\": 1648502711249,\n \"expires_at\": null,\n \"livemode\": false,\n \"name\": \"my-api-key2\",\n \"scope\": {\n \"type\": \"account\"\n }\n }\n ]\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Early Fraud WarningAn early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/radar\/early_fraud_warnings\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/radar\/early_fraud_warnings\n'''"},{"nl":"The early fraud warning objectAttributes id string Unique identifier for the object. object string, value is \"radar.early_fraud_warning\" String representing the object\u2019s 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","code":"'''The early fraud warning object {\n \"id\": \"issfr_1LSe5d2eZvKYlo2CGrFuyZYx\",\n \"object\": \"radar.early_fraud_warning\",\n \"actionable\": true,\n \"charge\": \"ch_1234\",\n \"created\": 123456789,\n \"fraud_type\": \"misc\",\n \"livemode\": false\n}\n'''"},{"nl":"Retrieve an early fraud warningRetrieves the details of an early fraud warning that has previously been created. \nPlease refer to the early fraud warning object reference for more details.ParametersNo parameters.ReturnsReturns an EarlyFraudWarning if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.EarlyFraudWarning.retrieve(\n \"issfr_1LSe5d2eZvKYlo2CGrFuyZYx\",\n)\n'''Response {\n \"id\": \"issfr_1LSe5d2eZvKYlo2CGrFuyZYx\",\n \"object\": \"radar.early_fraud_warning\",\n \"actionable\": true,\n \"charge\": \"ch_1234\",\n \"created\": 123456789,\n \"fraud_type\": \"misc\",\n \"livemode\": false\n}'''"},{"nl":"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","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.EarlyFraudWarning.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/radar\/early_fraud_warnings\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"issfr_1LSe5d2eZvKYlo2CGrFuyZYx\",\n \"object\": \"radar.early_fraud_warning\",\n \"actionable\": true,\n \"charge\": \"ch_1234\",\n \"created\": 123456789,\n \"fraud_type\": \"misc\",\n \"livemode\": false\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"ReviewsReviews can be used to supplement automated fraud detection with human expertise.Learn more about Radar and reviewing payments\nhere","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/reviews\/:id\/approve\u00a0\u00a0\u00a0GET\u00a0\/v1\/reviews\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/reviews\n'''"},{"nl":"The review objectAttributes id string Unique identifier for the object. charge string expandable The charge associated with this review. open boolean If true, the review needs action. payment_intent string expandable The PaymentIntent ID associated with this review, if one exists. reason string The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, disputed, or redacted.More attributesExpand all object string, value is \"review\" billing_zip string closed_reason string created timestamp ip_address string ip_address_location hash livemode boolean opened_reason string session hash","code":"'''The review object {\n \"id\": \"prv_1D5Z7u2eZvKYlo2CJBwIbCtC\",\n \"object\": \"review\",\n \"billing_zip\": null,\n \"charge\": \"ch_1D5Z7u2eZvKYlo2C5eRC7CrZ\",\n \"closed_reason\": null,\n \"created\": 1535808418,\n \"ip_address\": null,\n \"ip_address_location\": null,\n \"livemode\": false,\n \"open\": true,\n \"opened_reason\": \"rule\",\n \"reason\": \"rule\",\n \"session\": null\n}\n'''"},{"nl":"Approve a reviewApproves a Review object, closing it and removing it from the list of reviews.ParametersNo parameters.ReturnsReturns the approved Review object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Review.approve(\n \"prv_1D5Z7u2eZvKYlo2CJBwIbCtC\",\n)\n'''Response {\n \"id\": \"prv_1D5Z7u2eZvKYlo2CJBwIbCtC\",\n \"object\": \"review\",\n \"billing_zip\": null,\n \"charge\": \"ch_1D5Z7u2eZvKYlo2C5eRC7CrZ\",\n \"closed_reason\": null,\n \"created\": 1535808418,\n \"ip_address\": null,\n \"ip_address_location\": null,\n \"livemode\": false,\n \"open\": true,\n \"opened_reason\": \"rule\",\n \"reason\": \"rule\",\n \"session\": null\n}'''"},{"nl":"Retrieve a reviewRetrieves a Review object.ParametersNo parameters.ReturnsReturns a Review object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Review.retrieve(\n \"prv_1D5Z7u2eZvKYlo2CJBwIbCtC\",\n)\n'''Response {\n \"id\": \"prv_1D5Z7u2eZvKYlo2CJBwIbCtC\",\n \"object\": \"review\",\n \"billing_zip\": null,\n \"charge\": \"ch_1D5Z7u2eZvKYlo2C5eRC7CrZ\",\n \"closed_reason\": null,\n \"created\": 1535808418,\n \"ip_address\": null,\n \"ip_address_location\": null,\n \"livemode\": false,\n \"open\": true,\n \"opened_reason\": \"rule\",\n \"reason\": \"rule\",\n \"session\": null\n}'''"},{"nl":"List all open reviewsReturns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.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 reviews, starting after review starting_after. Each entry in the array is a separate Review object. If no more reviews are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.Review.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/reviews\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"prv_1D5Z7u2eZvKYlo2CJBwIbCtC\",\n \"object\": \"review\",\n \"billing_zip\": null,\n \"charge\": \"ch_1D5Z7u2eZvKYlo2C5eRC7CrZ\",\n \"closed_reason\": null,\n \"created\": 1535808418,\n \"ip_address\": null,\n \"ip_address_location\": null,\n \"livemode\": false,\n \"open\": true,\n \"opened_reason\": \"rule\",\n \"reason\": \"rule\",\n \"session\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Value ListsValue lists allow you to group values together which can then be referenced in rules.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/radar\/value_lists\u00a0\u00a0\u00a0GET\u00a0\/v1\/radar\/value_lists\/:id\u00a0\u00a0POST\u00a0\/v1\/radar\/value_lists\/:idDELETE\u00a0\/v1\/radar\/value_lists\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/radar\/value_lists\n'''"},{"nl":"The value list objectAttributes id string Unique identifier for the object. alias string The name of the value list for use in rules. item_type string The type of items in the value list. One of card_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id. list_items list List of items contained within this value list.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. name string The name of the value list.More attributesExpand all object string, value is \"radar.value_list\" created timestamp created_by string livemode boolean","code":"'''The value list object {\n \"id\": \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n \"object\": \"radar.value_list\",\n \"alias\": \"custom_ip_blocklist\",\n \"created\": 1659519594,\n \"created_by\": \"jenny@example.com\",\n \"item_type\": \"ip_address\",\n \"list_items\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/radar\/value_list_items?value_list=rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Custom IP Blocklist\"\n}\n'''"},{"nl":"Create a value listCreates a new ValueList object, which can then be referenced in rules.Parameters alias required The name of the value list for use in rules. name required The human-readable name of the value list. item_type optional Type of the items in the value list. One of card_fingerprint, card_bin, email, ip_address, country, string, case_sensitive_string, or customer_id. Use string if the item type is unknown or mixed. 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 a ValueList object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueList.create(\n alias=\"custom_ip_blocklist\",\n name=\"Custom IP Blocklist\",\n item_type=\"ip_address\",\n)\n'''Response {\n \"id\": \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n \"object\": \"radar.value_list\",\n \"alias\": \"custom_ip_blocklist\",\n \"created\": 1659519594,\n \"created_by\": \"jenny@example.com\",\n \"item_type\": \"ip_address\",\n \"list_items\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/radar\/value_list_items?value_list=rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Custom IP Blocklist\"\n}'''"},{"nl":"Retrieve a value listRetrieves a ValueList object.ParametersNo parameters.ReturnsReturns a ValueList object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueList.retrieve(\n \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n)\n'''Response {\n \"id\": \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n \"object\": \"radar.value_list\",\n \"alias\": \"custom_ip_blocklist\",\n \"created\": 1659519594,\n \"created_by\": \"jenny@example.com\",\n \"item_type\": \"ip_address\",\n \"list_items\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/radar\/value_list_items?value_list=rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Custom IP Blocklist\"\n}'''"},{"nl":"Update a value listUpdates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.Parameters alias optional The name of the value list for use in rules. 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. name optional The human-readable name of the value list.ReturnsReturns an updated ValueList object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueList.modify(\n \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n name=\"Updated IP Block List\",\n)\n'''Response {\n \"id\": \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n \"object\": \"radar.value_list\",\n \"alias\": \"custom_ip_blocklist\",\n \"created\": 1659519594,\n \"created_by\": \"jenny@example.com\",\n \"item_type\": \"ip_address\",\n \"list_items\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/radar\/value_list_items?value_list=rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Updated IP Blocklist\",\n \"updated\": 1659519597,\n \"updated_by\": \"jenny@example.com\"\n}'''"},{"nl":"Delete a value listDeletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.ParametersNo parameters.ReturnsReturns an object with the deleted ValueList object\u2019s ID and a deleted parameter on success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueList.delete(\n \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n)\n'''Response {\n \"id\": \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n \"object\": \"radar.value_list\",\n \"deleted\": true\n}'''"},{"nl":"List all value listsReturns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.Parameters alias optional The alias used to reference the value list when writing rules.More parametersExpand all contains optional 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 lists, starting after list starting_after. Each entry in the array is a separate ValueList object. If no more lists are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueList.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/radar\/value_lists\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\",\n \"object\": \"radar.value_list\",\n \"alias\": \"custom_ip_blocklist\",\n \"created\": 1659519594,\n \"created_by\": \"jenny@example.com\",\n \"item_type\": \"ip_address\",\n \"list_items\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/radar\/value_list_items?value_list=rsl_1LSe3S2eZvKYlo2C3mKm3N8Z\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Custom IP Blocklist\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Value List ItemsValue list items allow you to add specific values to a given Radar value list, which can then be used in rules.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/radar\/value_list_items\u00a0\u00a0\u00a0GET\u00a0\/v1\/radar\/value_list_items\/:idDELETE\u00a0\/v1\/radar\/value_list_items\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/radar\/value_list_items\n'''"},{"nl":"The value list item objectAttributes id string Unique identifier for the object. value string The value of the item. value_list string The identifier of the value list this item belongs to.More attributesExpand all object string, value is \"radar.value_list_item\" created timestamp created_by string livemode boolean","code":"'''The value list item object {\n \"id\": \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n \"object\": \"radar.value_list_item\",\n \"created\": 1659518872,\n \"created_by\": \"jenny@example.com\",\n \"livemode\": false,\n \"value\": \"1.2.3.4\",\n \"value_list\": \"rsl_1LSdro2eZvKYlo2C40UDoADG\"\n}\n'''"},{"nl":"Create a value list itemCreates a new ValueListItem object, which is added to the specified parent value list.Parameters value required The value of the item (whose type must match the type of the parent value list). value_list required The identifier of the value list which the created item will be added to.ReturnsReturns a ValueListItem object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueListItem.create(\n value_list=\"rsl_1LSdro2eZvKYlo2C9T0dzYHM\",\n value=\"1.2.3.4\",\n)\n'''Response {\n \"id\": \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n \"object\": \"radar.value_list_item\",\n \"created\": 1659518872,\n \"created_by\": \"jenny@example.com\",\n \"livemode\": false,\n \"value\": \"1.2.3.4\",\n \"value_list\": \"rsl_1LSdro2eZvKYlo2C9T0dzYHM\"\n}'''"},{"nl":"Retrieve a value list itemRetrieves a ValueListItem object.ParametersNo parameters.ReturnsReturns a ValueListItem object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueListItem.retrieve(\n \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n)\n'''Response {\n \"id\": \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n \"object\": \"radar.value_list_item\",\n \"created\": 1659518872,\n \"created_by\": \"jenny@example.com\",\n \"livemode\": false,\n \"value\": \"1.2.3.4\",\n \"value_list\": \"rsl_1LSdro2eZvKYlo2C40UDoADG\"\n}'''"},{"nl":"Delete a value list itemDeletes a ValueListItem object, removing it from its parent value list.ParametersNo parameters.ReturnsReturns an object with the deleted ValueListItem object\u2019s ID and a deleted parameter on success. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueListItem.delete(\n \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n)\n'''Response {\n \"id\": \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n \"object\": \"radar.value_list_item\",\n \"deleted\": true\n}'''"},{"nl":"List all value list itemsReturns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.Parameters value_list required Identifier for the parent value list this item belongs to. value optional Return items belonging to the parent list whose value matches the specified value (using an \u201cis like\u201d match).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 items, starting after item starting_after. Each entry in the array is a separate ValueListItem object. If no more items are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.radar.ValueListItem.list(\n limit=3,\n value_list=\"rsl_1LSdro2eZvKYlo2C9T0dzYHM\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/radar\/value_list_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"rsli_1LSdro2eZvKYlo2Cv5zBtwbD\",\n \"object\": \"radar.value_list_item\",\n \"created\": 1659518872,\n \"created_by\": \"jenny@example.com\",\n \"livemode\": false,\n \"value\": \"1.2.3.4\",\n \"value_list\": \"rsl_1LSdro2eZvKYlo2C40UDoADG\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"AuthorizationsWhen an issued card is used to make a purchase, an Issuing Authorization\nobject is created. Authorizations must be approved for the\npurchase to be completed successfully.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/authorizations\/:id\u00a0\u00a0POST\u00a0\/v1\/issuing\/authorizations\/:id\u00a0\u00a0POST\u00a0\/v1\/issuing\/authorizations\/:id\/approve\u00a0\u00a0POST\u00a0\/v1\/issuing\/authorizations\/:id\/decline\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/authorizations\n'''"},{"nl":"The Authorization objectAttributes id string Unique identifier for the object. amount integer The total amount that was authorized or rejected. This amount is in the card\u2019s currency and in the smallest currency unit. approved boolean Whether the authorization has been approved. card hash, issuing.card object Card associated with this authorization. cardholder string expandable The cardholder to whom this authorization belongs. 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. status enum The current status of the authorization in its lifecycle.Possible enum valuespending The authorization was created and is awaiting approval or was approved and is awaiting capture.closed The authorization was declined or captured through one or more transactions.reversed The authorization was reversed by the merchant or expired without capture.More attributesExpand all object string, value is \"issuing.authorization\" amount_details hash authorization_method enum balance_transactions array, contains: balance_transaction object created timestamp livemode boolean merchant_amount integer merchant_currency currency merchant_data hash pending_request hash request_history array of hashes transactions array, contains: issuing.transaction object verification_data hash wallet string","code":"'''The Authorization object {\n \"id\": \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n \"object\": \"issuing.authorization\",\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"authorization_method\": \"online\",\n \"balance_transactions\": [],\n \"card\": {\n \"id\": \"ic_1JDmgz2eZvKYlo2CRXlTsXj6\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1626425119,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1626425206,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2024,\n \"last4\": \"8693\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n \"cardholder\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"livemode\": false,\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_request\": null,\n \"redaction\": null,\n \"request_history\": [\n {\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"reason\": \"verification_failed\"\n }\n ],\n \"status\": \"closed\",\n \"transactions\": [],\n \"verification_data\": {\n \"address_line1_check\": \"not_provided\",\n \"address_postal_code_check\": \"not_provided\",\n \"cvc_check\": \"mismatch\",\n \"expiry_check\": \"match\"\n },\n \"wallet\": null\n}\n'''"},{"nl":"Retrieve an authorizationRetrieves an Issuing Authorization object.ParametersNo parameters.ReturnsReturns an Issuing Authorization object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Authorization.retrieve(\n \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n)\n'''Response {\n \"id\": \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n \"object\": \"issuing.authorization\",\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"authorization_method\": \"online\",\n \"balance_transactions\": [],\n \"card\": {\n \"id\": \"ic_1JDmgz2eZvKYlo2CRXlTsXj6\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1626425119,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1626425206,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2024,\n \"last4\": \"8693\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n \"cardholder\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"livemode\": false,\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_request\": null,\n \"redaction\": null,\n \"request_history\": [\n {\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"reason\": \"verification_failed\"\n }\n ],\n \"status\": \"closed\",\n \"transactions\": [],\n \"verification_data\": {\n \"address_line1_check\": \"not_provided\",\n \"address_postal_code_check\": \"not_provided\",\n \"cvc_check\": \"mismatch\",\n \"expiry_check\": \"match\"\n },\n \"wallet\": null\n}'''"},{"nl":"Update an authorizationUpdates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.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 an updated Issuing Authorization object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Authorization.modify(\n \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n \"object\": \"issuing.authorization\",\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"authorization_method\": \"online\",\n \"balance_transactions\": [],\n \"card\": {\n \"id\": \"ic_1JDmgz2eZvKYlo2CRXlTsXj6\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1626425119,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1626425206,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2024,\n \"last4\": \"8693\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n \"cardholder\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"livemode\": false,\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_request\": null,\n \"redaction\": null,\n \"request_history\": [\n {\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"reason\": \"verification_failed\"\n }\n ],\n \"status\": \"closed\",\n \"transactions\": [],\n \"verification_data\": {\n \"address_line1_check\": \"not_provided\",\n \"address_postal_code_check\": \"not_provided\",\n \"cvc_check\": \"mismatch\",\n \"expiry_check\": \"match\"\n },\n \"wallet\": null\n}'''"},{"nl":"Approve an authorizationApproves a pending Issuing Authorization object. This request should be made within the timeout window of the real-time authorization flow.Parameters amount optional If the authorization\u2019s pending_request.is_amount_controllable property is true, you may provide this value to control how much to hold for the authorization. Must be positive (use decline to decline an authorization request). 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 an approved Issuing Authorization object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Authorization.approve(\n \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n)\n'''Response {\n \"id\": \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n \"object\": \"issuing.authorization\",\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"authorization_method\": \"online\",\n \"balance_transactions\": [],\n \"card\": {\n \"id\": \"ic_1JDmgz2eZvKYlo2CRXlTsXj6\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1626425119,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1626425206,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2024,\n \"last4\": \"8693\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n \"cardholder\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"livemode\": false,\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_request\": null,\n \"redaction\": null,\n \"request_history\": [\n {\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"reason\": \"verification_failed\"\n }\n ],\n \"status\": \"closed\",\n \"transactions\": [],\n \"verification_data\": {\n \"address_line1_check\": \"not_provided\",\n \"address_postal_code_check\": \"not_provided\",\n \"cvc_check\": \"mismatch\",\n \"expiry_check\": \"match\"\n },\n \"wallet\": null\n}'''"},{"nl":"Decline an authorizationDeclines a pending Issuing Authorization object. This request should be made within the timeout window of the real time authorization flow.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 a declined Issuing Authorization object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Authorization.decline(\n \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n)\n'''Response {\n \"id\": \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n \"object\": \"issuing.authorization\",\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"authorization_method\": \"online\",\n \"balance_transactions\": [],\n \"card\": {\n \"id\": \"ic_1JDmgz2eZvKYlo2CRXlTsXj6\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1626425119,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1626425206,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2024,\n \"last4\": \"8693\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n \"cardholder\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"livemode\": false,\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_request\": null,\n \"redaction\": null,\n \"request_history\": [\n {\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"reason\": \"verification_failed\"\n }\n ],\n \"status\": \"closed\",\n \"transactions\": [],\n \"verification_data\": {\n \"address_line1_check\": \"not_provided\",\n \"address_postal_code_check\": \"not_provided\",\n \"cvc_check\": \"mismatch\",\n \"expiry_check\": \"match\"\n },\n \"wallet\": null\n}'''"},{"nl":"List all authorizationsReturns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.Parameters card optional Only return authorizations that belong to the given card. cardholder optional Only return authorizations that belong to the given cardholder. status optional Only return authorizations with the given status. One of pending, closed, or reversed.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 authorizations, starting after authorization starting_after. Each entry in the array is a separate Issuing Authorization object. If no more authorizations are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Authorization.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/issuing\/authorizations\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"iauth_1JVXl82eZvKYlo2CPIiWlzrn\",\n \"object\": \"issuing.authorization\",\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"authorization_method\": \"online\",\n \"balance_transactions\": [],\n \"card\": {\n \"id\": \"ic_1JDmgz2eZvKYlo2CRXlTsXj6\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1626425119,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1626425206,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2024,\n \"last4\": \"8693\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n \"cardholder\": \"ich_1JDmfb2eZvKYlo2CwHUgaAxU\",\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"livemode\": false,\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_request\": null,\n \"redaction\": null,\n \"request_history\": [\n {\n \"amount\": 382,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"approved\": false,\n \"created\": 1630657706,\n \"currency\": \"usd\",\n \"merchant_amount\": 382,\n \"merchant_currency\": \"usd\",\n \"reason\": \"verification_failed\"\n }\n ],\n \"status\": \"closed\",\n \"transactions\": [],\n \"verification_data\": {\n \"address_line1_check\": \"not_provided\",\n \"address_postal_code_check\": \"not_provided\",\n \"cvc_check\": \"mismatch\",\n \"expiry_check\": \"match\"\n },\n \"wallet\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"CardholdersAn Issuing Cardholder object represents an individual or business entity who is issued cards.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/issuing\/cardholders\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/cardholders\/:id\u00a0\u00a0POST\u00a0\/v1\/issuing\/cardholders\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/cardholders\n'''"},{"nl":"The Cardholder objectAttributes id string Unique identifier for the object. billing hash The cardholder\u2019s billing information.Show child attributes email string The cardholder\u2019s email address. 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 The cardholder\u2019s name. This will be printed on cards issued to them. phone_number string The cardholder\u2019s phone number. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details. type enum One of individual or company.Possible enum valuesindividual The cardholder is a person, and additional information include first and last name, date of birth, etc.company The cardholder is a company or business entity, and additional information include their tax ID.More attributesExpand all object string, value is \"issuing.cardholder\" company hash created timestamp individual hash livemode boolean requirements hash spending_controls hash status enum","code":"'''The Cardholder object {\n \"id\": \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"\\\"San Francisco\\\"\",\n \"country\": \"US\",\n \"line1\": \"\\\"1234 Main Street\\\"\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1651948931,\n \"email\": \"adnansami1992sami@gmail.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"\\\"Jenny Rosen\\\"\",\n \"phone_number\": \"+18888675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n}\n'''"},{"nl":"Create a cardholderCreates a new Issuing Cardholder object that can be issued cards.Parameters billing required The cardholder\u2019s billing address.Show child parameters name required The cardholder\u2019s name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. type required One of individual or company.Possible enum valuesindividual The cardholder is a person, and additional information include first and last name, date of birth, etc.company The cardholder is a company or business entity, and additional information include their tax ID. email optional The cardholder\u2019s email address. 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_number optional The cardholder\u2019s phone number. This will be transformed to E.164 if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details.More parametersExpand all company optional dictionary individual optional dictionary spending_controls optional dictionary status optional enum ReturnsReturns an Issuing Cardholder object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Cardholder.create(\n type=\"individual\",\n name=\"Jenny Rosen\",\n email=\"jenny.rosen@example.com\",\n phone_number=\"+18888675309\",\n billing={\n \"address\": {\n \"line1\": \"1234 Main Street\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94111\",\n },\n },\n)\n'''Response {\n \"id\": \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"line1\": \"1234 Main Street\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"country\": \"US\",\n \"postal_code\": \"94111\"\n }\n },\n \"company\": null,\n \"created\": 1651948931,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18888675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n}'''"},{"nl":"Retrieve a cardholderRetrieves an Issuing Cardholder object.ParametersNo parameters.ReturnsReturns an Issuing Cardholder object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Cardholder.retrieve(\n \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n)\n'''Response {\n \"id\": \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"\\\"San Francisco\\\"\",\n \"country\": \"US\",\n \"line1\": \"\\\"1234 Main Street\\\"\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1651948931,\n \"email\": \"adnansami1992sami@gmail.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"\\\"Jenny Rosen\\\"\",\n \"phone_number\": \"+18888675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n}'''"},{"nl":"Update a cardholderUpdates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters billing optional dictionary The cardholder\u2019s billing address.Show child parameters email optional The cardholder\u2019s email address. 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_number optional The cardholder\u2019s phone number. This is required for all cardholders who will be creating EU cards. See the 3D Secure documentation for more details.More parametersExpand all company optional dictionary individual optional dictionary spending_controls optional dictionary status optional enum ReturnsReturns an updated Issuing Cardholder object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Cardholder.modify(\n \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"\\\"San Francisco\\\"\",\n \"country\": \"US\",\n \"line1\": \"\\\"1234 Main Street\\\"\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1651948931,\n \"email\": \"adnansami1992sami@gmail.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"name\": \"\\\"Jenny Rosen\\\"\",\n \"phone_number\": \"+18888675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n}'''"},{"nl":"List all cardholdersReturns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.ParametersExpand all created optional dictionary email optional ending_before optional limit optional phone_number optional starting_after optional status optional enum type optional enum ReturnsA dictionary with a data property that contains an array of up to limit cardholders, starting after cardholder starting_after. Each entry in the array is a separate Issuing Cardholder object. If no more cardholders are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Cardholder.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/issuing\/cardholders\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"\\\"San Francisco\\\"\",\n \"country\": \"US\",\n \"line1\": \"\\\"1234 Main Street\\\"\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1651948931,\n \"email\": \"adnansami1992sami@gmail.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"\\\"Jenny Rosen\\\"\",\n \"phone_number\": \"+18888675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"CardsYou can create physical or virtual cards that are issued to cardholders","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/issuing\/cards\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/cards\/:id\u00a0\u00a0POST\u00a0\/v1\/issuing\/cards\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/cards\n'''"},{"nl":"The Card objectAttributes id string Unique identifier for the object. cancellation_reason enum The reason why the card was canceled.Possible enum valueslost The card was lost.stolen The card was stolen.design_rejected The design of this card was rejected by Stripe for violating our partner guidelines. cardholder hash, issuing.cardholder object The Cardholder object to which the card belongs. currency currency Three-letter ISO currency code, in lowercase. Supported currencies are usd in the US, eur in the EU, and gbp in the UK. exp_month integer The expiration month of the card. exp_year integer The expiration year of the card. last4 string The last 4 digits of the card 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. status enum Whether authorizations can be approved on this card.Possible enum valuesactive The card can approve authorizations.inactive The card will decline authorizations with the card_inactive reason.canceled The card will decline authorization, and no authorization object will be recorded. This status is permanent. type enum The type of the card.Possible enum valuesphysical A physical card will be printed and shipped. It can be used at physical terminals.virtual No physical card will be printed. The card can be used online and can be added to digital wallets.More attributesExpand all object string, value is \"issuing.card\" brand string created timestamp cvc string expandable livemode boolean number string expandable replaced_by string expandable replacement_for string expandable replacement_reason enum shipping hash spending_controls hash wallets hash","code":"'''The Card object {\n \"id\": \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1LPMCG2eZvKYlo2CwrVVYctD\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1658735964,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1658736001,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2025,\n \"last4\": \"9592\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n}\n'''"},{"nl":"Create a cardCreates an Issuing Card object.Parameters cardholder required The Cardholder object with which the card will be associated. currency required The currency for the card. type required The type of card to issue. Possible values are physical or virtual.Possible enum valuesphysical A physical card will be printed and shipped. It can be used at physical terminals.virtual No physical card will be printed. The card can be used online and can be added to digital wallets. 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. status optional enum Whether authorizations can be approved on this card. Defaults to inactive.Possible enum valuesactive The card can approve authorizations.inactive The card will decline authorizations with the card_inactive reason.More parametersExpand all replacement_for optional replacement_reason optional enum shipping optional dictionary spending_controls optional dictionary ReturnsReturns an Issuing Card object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Card.create(\n cardholder=\"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n currency=\"usd\",\n type=\"virtual\",\n)\n'''Response {\n \"id\": \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": \"ich_1KwsZz2eZvKYlo2Cz5eys5Kb\",\n \"created\": 1658736001,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2025,\n \"last4\": \"9592\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n}'''"},{"nl":"Retrieve a cardRetrieves an Issuing Card object.ParametersNo parameters.ReturnsReturns an Issuing Card object if a valid identifier was provided. When requesting the ID of a card that has been deleted, a subset of the card\u2019s information will be returned, including a deleted property, which will be true","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Card.retrieve(\n \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n)\n'''Response {\n \"id\": \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1LPMCG2eZvKYlo2CwrVVYctD\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1658735964,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1658736001,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2025,\n \"last4\": \"9592\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n}'''"},{"nl":"Update a cardUpdates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters cancellation_reason optional enum Reason why the status of this card is canceled.Possible enum valueslost The card was lost.stolen The card was stolen. 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. status optional enum Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as cancellation_reason.Possible enum valuesactive The card can approve authorizations.inactive The card will decline authorizations with the card_inactive reason.canceled The card will decline authorization, and no authorization object will be recorded. This status is permanent.More parametersExpand all pin optional dictionary spending_controls optional dictionary ReturnsReturns an updated Issuing Card object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Card.modify(\n \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1LPMCG2eZvKYlo2CwrVVYctD\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1658735964,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1658736001,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2025,\n \"last4\": \"9592\",\n \"livemode\": false,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n}'''"},{"nl":"List all cardsReturns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.Parameters cardholder optional Only return cards belonging to the Cardholder with the provided ID. type optional enum Only return cards that have the given type. One of virtual or physical.Possible enum valuesphysical A physical card will be printed and shipped. It can be used at physical terminals.virtual No physical card will be printed. The card can be used online and can be added to digital wallets.More parametersExpand all created optional dictionary ending_before optional exp_month optional exp_year optional last4 optional limit optional starting_after optional status optional enum ReturnsA dictionary with a data property that contains an array of up to limit cards, starting after card starting_after. Each entry in the array is a separate Issuing Card object. If no more cards are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Card.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/issuing\/cards\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ic_1LPMCr2eZvKYlo2CELh8Lw2B\",\n \"object\": \"issuing.card\",\n \"brand\": \"Visa\",\n \"cancellation_reason\": null,\n \"cardholder\": {\n \"id\": \"ich_1LPMCG2eZvKYlo2CwrVVYctD\",\n \"object\": \"issuing.cardholder\",\n \"billing\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"123 Main Street\",\n \"line2\": null,\n \"postal_code\": \"94111\",\n \"state\": \"CA\"\n }\n },\n \"company\": null,\n \"created\": 1658735964,\n \"email\": \"jenny.rosen@example.com\",\n \"individual\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"name\": \"Jenny Rosen\",\n \"phone_number\": \"+18008675309\",\n \"redaction\": null,\n \"requirements\": {\n \"disabled_reason\": null,\n \"past_due\": []\n },\n \"spending_controls\": {\n \"allowed_categories\": [],\n \"blocked_categories\": [],\n \"spending_limits\": [],\n \"spending_limits_currency\": null\n },\n \"status\": \"active\",\n \"type\": \"individual\"\n },\n \"created\": 1658736001,\n \"currency\": \"usd\",\n \"exp_month\": 6,\n \"exp_year\": 2025,\n \"last4\": \"9592\",\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"replaced_by\": null,\n \"replacement_for\": null,\n \"replacement_reason\": null,\n \"shipping\": null,\n \"spending_controls\": {\n \"allowed_categories\": null,\n \"blocked_categories\": null,\n \"spending_limits\": [\n {\n \"amount\": 50000,\n \"categories\": [],\n \"interval\": \"daily\"\n }\n ],\n \"spending_limits_currency\": \"usd\"\n },\n \"status\": \"active\",\n \"type\": \"virtual\",\n \"wallets\": {\n \"apple_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"google_pay\": {\n \"eligible\": true,\n \"ineligible_reason\": null\n },\n \"primary_account_identifier\": null\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"DisputesAs a card issuer, you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/issuing\/disputes\u00a0\u00a0POST\u00a0\/v1\/issuing\/disputes\/:id\/submit\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/disputes\/:id\u00a0\u00a0POST\u00a0\/v1\/issuing\/disputes\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/disputes\n'''"},{"nl":"The Dispute objectAttributes id string Unique identifier for the object. amount integer Disputed amount in the card\u2019s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). balance_transactions array, contains: balance_transaction object expandable List of balance transactions associated with the dispute. This field is not included by default. To include it in the response, expand the balance_transactions field. currency currency The currency the transaction was made in. evidence hash Evidence for the dispute. Evidence contains exactly two non-null fields: the reason for the dispute and the associated evidence field for the selected reason.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. status enum Current status of the dispute.Possible enum valueswon The dispute is won.lost The dispute is lost.submitted The dispute has been submitted to Stripe.unsubmitted The dispute is pending submission to Stripe.expired The dispute has expired. transaction string expandable The transaction being disputed.More attributesExpand all object string, value is \"issuing.dispute\" created timestamp livemode boolean","code":"'''The Dispute object {\n \"id\": \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n \"object\": \"issuing.dispute\",\n \"amount\": 2000,\n \"created\": 1659518945,\n \"currency\": \"usd\",\n \"evidence\": {\n \"fraudulent\": {\n \"additional_documentation\": null,\n \"explanation\": \"Fraud; card reported lost on 08\/03\/2022\"\n },\n \"reason\": \"fraudulent\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"status\": \"unsubmitted\",\n \"transaction\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\"\n}\n'''"},{"nl":"Create a disputeCreates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.Parameters evidence optional dictionary Evidence provided for the dispute.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. transaction optional The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use treasury.received_debit.ReturnsReturns an Issuing Dispute object in unsubmitted status if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Dispute.create(\n transaction=\"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n evidence={\n \"reason\": \"fraudulent\",\n \"fraudulent\": {\n \"explanation\": \"Purchase was unrecognized.\",\n },\n },\n)\n'''Response {\n \"id\": \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n \"object\": \"issuing.dispute\",\n \"amount\": 2000,\n \"created\": 1659518945,\n \"currency\": \"usd\",\n \"evidence\": {\n \"reason\": \"fraudulent\",\n \"fraudulent\": {\n \"explanation\": \"Purchase was unrecognized.\"\n }\n },\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"status\": \"unsubmitted\",\n \"transaction\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\"\n}'''"},{"nl":"Submit a disputeSubmits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute\u2019s reason are present. For more details, see Dispute reasons and evidence.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 an Issuing Dispute object in submitted status if submission succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Dispute.submit(\n \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n)\n'''Response {\n \"id\": \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n \"object\": \"issuing.dispute\",\n \"amount\": 2000,\n \"created\": 1659518945,\n \"currency\": \"usd\",\n \"evidence\": {\n \"fraudulent\": {\n \"additional_documentation\": null,\n \"explanation\": \"Fraud; card reported lost on 08\/03\/2022\"\n },\n \"reason\": \"fraudulent\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"status\": \"submitted\",\n \"transaction\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\"\n}'''"},{"nl":"Retrieve a disputeRetrieves an Issuing Dispute object.ParametersNo parameters.ReturnsReturns an Issuing Dispute object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Dispute.retrieve(\n \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n)\n'''Response {\n \"id\": \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n \"object\": \"issuing.dispute\",\n \"amount\": 2000,\n \"created\": 1659518945,\n \"currency\": \"usd\",\n \"evidence\": {\n \"fraudulent\": {\n \"additional_documentation\": null,\n \"explanation\": \"Fraud; card reported lost on 08\/03\/2022\"\n },\n \"reason\": \"fraudulent\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"status\": \"unsubmitted\",\n \"transaction\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\"\n}'''"},{"nl":"Update a disputeUpdates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.Parameters evidence optional dictionary Evidence provided for the dispute.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.ReturnsReturns an updated Issuing Dispute object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Dispute.modify(\n \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n evidence={\n \"reason\": \"not_received\",\n \"not_received\": {\n \"expected_at\": 1590000000,\n \"explanation\": \"\",\n \"product_description\": \"Baseball cap\",\n \"product_type\": \"merchandise\",\n },\n },\n)\n'''Response {\n \"id\": \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n \"object\": \"issuing.dispute\",\n \"amount\": 2000,\n \"created\": 1659518945,\n \"currency\": \"usd\",\n \"evidence\": {\n \"reason\": \"not_received\",\n \"not_received\": {\n \"expected_at\": 1590000000,\n \"explanation\": null,\n \"product_description\": \"Baseball cap\",\n \"product_type\": \"merchandise\"\n }\n },\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"status\": \"unsubmitted\",\n \"transaction\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\"\n}'''"},{"nl":"List all disputesReturns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.Parameters transaction optional Select the Issuing dispute for the given transaction.More parametersExpand all created optional dictionary ending_before optional limit optional starting_after optional status optional enum ReturnsA dictionary with a data property that contains an array of up to limit disputes, starting after dispute starting_after. Each entry in the array is a separate Issuing Dispute object. If no more disputes are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Dispute.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/issuing\/disputes\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"idp_1LSdsz2eZvKYlo2CzYY577wS\",\n \"object\": \"issuing.dispute\",\n \"amount\": 2000,\n \"created\": 1659518945,\n \"currency\": \"usd\",\n \"evidence\": {\n \"fraudulent\": {\n \"additional_documentation\": null,\n \"explanation\": \"Fraud; card reported lost on 08\/03\/2022\"\n },\n \"reason\": \"fraudulent\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"redaction\": null,\n \"status\": \"unsubmitted\",\n \"transaction\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Funding InstructionsFunding Instructions contain reusable bank account and routing information. Push funds\nto these addresses via bank transfer to top up Issuing Balances","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/issuing\/funding_instructions\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/funding_instructions\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/issuing\/fund_balance\n'''"},{"nl":"The FundingInstruction objectAttributes bank_transfer hash Details to display instructions for initiating a bank transferShow child attributes currency string Three-letter ISO currency code, in lowercase. Must be a supported currency. funding_type enum The funding_type of the returned instructionsPossible enum valuesbank_transfer Use a bank_transfer hash to define the bank transfer typeMore attributesExpand all object string, value is \"funding_instructions\" livemode boolean","code":"'''The FundingInstruction object {\n \"object\": \"funding_instructions\",\n \"bank_transfer\": {\n \"country\": \"DE\",\n \"financial_addresses\": [\n {\n \"iban\": {\n \"account_holder_name\": \"Stripe Technology Europe Limited\",\n \"bic\": \"SXPYDEHH\",\n \"country\": \"DE\",\n \"iban\": \"DE00000000000000000001\"\n },\n \"supported_networks\": [\n \"sepa\"\n ],\n \"type\": \"iban\"\n }\n ],\n \"type\": \"eu_bank_transfer\"\n },\n \"currency\": \"eur\",\n \"funding_type\": \"bank_transfer\",\n \"livemode\": false\n}\n'''"},{"nl":"Create funding instructionsCreate or retrieve funding instructions for an Issuing balance. If funding instructions don\u2019t yet exist for the account,\nwe\u2019ll create new funding instructions. If we\u2019ve already created funding instructions for the account, the same\nwe\u2019ll retrieve the same funding instructions. In other words, we\u2019ll return the same funding instructions each time.Parameters bank_transfer required Additional parameters for bank_transfer funding typesShow child parameters currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. funding_type required The funding_type to get the instructions for.Possible enum valuesbank_transfer Use a bank_transfer hash to define the bank transfer typeReturnsReturns funding instructions for an Issuing balanc","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.FundingInstructions.create(\n currency=\"eur\",\n funding_type=\"bank_transfer\",\n bank_transfer={\"type\": \"eu_bank_transfer\"},\n)\n'''Response {\n \"object\": \"funding_instructions\",\n \"bank_transfer\": {\n \"country\": \"DE\",\n \"financial_addresses\": [\n {\n \"iban\": {\n \"account_holder_name\": \"Stripe Technology Europe Limited\",\n \"bic\": \"SXPYDEHH\",\n \"country\": \"DE\",\n \"iban\": \"DE00000000000000000001\"\n },\n \"supported_networks\": [\n \"sepa\"\n ],\n \"type\": \"iban\"\n }\n ],\n \"type\": \"eu_bank_transfer\"\n },\n \"currency\": \"eur\",\n \"funding_type\": \"bank_transfer\",\n \"livemode\": false\n}'''"},{"nl":"List all funding instructionsRetrieve all applicable funding instructions for an Issuing balance.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsReturns all funding instructions for an Issuing balanc","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.FundingInstructions.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/issuing\/funding_instructionss\",\n \"has_more\": false,\n \"data\": [\n {\n \"object\": \"funding_instructions\",\n \"bank_transfer\": {\n \"country\": \"DE\",\n \"financial_addresses\": [\n {\n \"iban\": {\n \"account_holder_name\": \"Stripe Technology Europe Limited\",\n \"bic\": \"SXPYDEHH\",\n \"country\": \"DE\",\n \"iban\": \"DE00000000000000000001\"\n },\n \"supported_networks\": [\n \"sepa\"\n ],\n \"type\": \"iban\"\n }\n ],\n \"type\": \"eu_bank_transfer\"\n },\n \"currency\": \"eur\",\n \"funding_type\": \"bank_transfer\",\n \"livemode\": false\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Simulate a top upSimulates an external bank transfer and adds funds to an Issuing balance.\nThis method can only be called in test mode.Parameters amount required The amount to top up currency required The currency to top upReturnsReturns testmode funding instructions for an Issuing balanc","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.FundingInstructions.TestHelpers.fund(\n \"fi_1LSe6U2eZvKYlo2CQw6IsejT\",\n currency=\"eur\",\n amount=4200,\n)\n'''Response {\n \"object\": \"funding_instructions\",\n \"bank_transfer\": {\n \"country\": \"DE\",\n \"financial_addresses\": [\n {\n \"iban\": {\n \"account_holder_name\": \"Stripe Technology Europe Limited\",\n \"bic\": \"SXPYDEHH\",\n \"country\": \"DE\",\n \"iban\": \"DE00000000000000000001\"\n },\n \"supported_networks\": [\n \"sepa\"\n ],\n \"type\": \"iban\"\n }\n ],\n \"type\": \"eu_bank_transfer\"\n },\n \"currency\": \"eur\",\n \"funding_type\": \"bank_transfer\",\n \"livemode\": false\n}'''"},{"nl":"TransactionsAny use of an issued card that results in funds entering or leaving\nyour Stripe account, such as a completed purchase or refund, is represented by an Issuing\nTransaction object.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/transactions\/:id\u00a0\u00a0POST\u00a0\/v1\/issuing\/transactions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/issuing\/transactions\n'''"},{"nl":"The Transaction objectAttributes id string Unique identifier for the object. amount integer The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit. authorization string expandable The Authorization object that led to this transaction. card string expandable The card used to make this transaction. cardholder string expandable The cardholder to whom this transaction belongs. 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. type enum The nature of the transaction.Possible enum valuescapture Funds were captured by the acquirer. amount will be negative as funds are moving out of your balance. Not all captures will be linked to an authorization, as acquirers can force capture in some cases.refund An acquirer initiated a refund. This transaction might not be linked to an original capture, for example credits are original transactions. amount will be positive for refunds and negative for refund reversals (very rare).More attributesExpand all object string, value is \"issuing.transaction\" amount_details hash balance_transaction string expandable created timestamp dispute string expandable livemode boolean merchant_amount integer merchant_currency currency merchant_data hash purchase_details hash expandable wallet enum","code":"'''The Transaction object {\n \"id\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n \"object\": \"issuing.transaction\",\n \"amount\": -2000,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"authorization\": \"iauth_1JIdAO2eZvKYlo2CNzjj2lif\",\n \"balance_transaction\": \"txn_1JIdAm2eZvKYlo2CHfFOwGfr\",\n \"card\": \"ic_1JId7I2eZvKYlo2CQcSKF8Df\",\n \"cardholder\": \"ich_1JId712eZvKYlo2C0lXNIoYn\",\n \"created\": 1627580251,\n \"currency\": \"usd\",\n \"dispute\": null,\n \"livemode\": false,\n \"merchant_amount\": -2000,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"redaction\": null,\n \"type\": \"capture\",\n \"wallet\": null\n}\n'''"},{"nl":"Retrieve a transactionRetrieves an Issuing Transaction object.ParametersNo parameters.ReturnsReturns an Issuing Transaction object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Transaction.retrieve(\n \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n)\n'''Response {\n \"id\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n \"object\": \"issuing.transaction\",\n \"amount\": -2000,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"authorization\": \"iauth_1JIdAO2eZvKYlo2CNzjj2lif\",\n \"balance_transaction\": \"txn_1JIdAm2eZvKYlo2CHfFOwGfr\",\n \"card\": \"ic_1JId7I2eZvKYlo2CQcSKF8Df\",\n \"cardholder\": \"ich_1JId712eZvKYlo2C0lXNIoYn\",\n \"created\": 1627580251,\n \"currency\": \"usd\",\n \"dispute\": null,\n \"livemode\": false,\n \"merchant_amount\": -2000,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"redaction\": null,\n \"type\": \"capture\",\n \"wallet\": null\n}'''"},{"nl":"Update a transactionUpdates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.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 an updated Issuing Transaction object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Transaction.modify(\n \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n \"object\": \"issuing.transaction\",\n \"amount\": -2000,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"authorization\": \"iauth_1JIdAO2eZvKYlo2CNzjj2lif\",\n \"balance_transaction\": \"txn_1JIdAm2eZvKYlo2CHfFOwGfr\",\n \"card\": \"ic_1JId7I2eZvKYlo2CQcSKF8Df\",\n \"cardholder\": \"ich_1JId712eZvKYlo2C0lXNIoYn\",\n \"created\": 1627580251,\n \"currency\": \"usd\",\n \"dispute\": null,\n \"livemode\": false,\n \"merchant_amount\": -2000,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"redaction\": null,\n \"type\": \"capture\",\n \"wallet\": null\n}'''"},{"nl":"List all transactionsReturns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.Parameters card optional Only return transactions that belong to the given card. cardholder optional Only return transactions that belong to the given cardholder.More parametersExpand all created optional dictionary ending_before optional limit optional starting_after optional type optional enum ReturnsA dictionary with a data property that contains an array of up to limit transactions, starting after transaction starting_after. Each entry in the array is a separate Issuing Transaction object. If no more transactions are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.issuing.Transaction.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/issuing\/transactions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ipi_1JIdAl2eZvKYlo2Cfr8US8uB\",\n \"object\": \"issuing.transaction\",\n \"amount\": -2000,\n \"amount_details\": {\n \"atm_fee\": null\n },\n \"authorization\": \"iauth_1JIdAO2eZvKYlo2CNzjj2lif\",\n \"balance_transaction\": \"txn_1JIdAm2eZvKYlo2CHfFOwGfr\",\n \"card\": \"ic_1JId7I2eZvKYlo2CQcSKF8Df\",\n \"cardholder\": \"ich_1JId712eZvKYlo2C0lXNIoYn\",\n \"created\": 1627580251,\n \"currency\": \"usd\",\n \"dispute\": null,\n \"livemode\": false,\n \"merchant_amount\": -2000,\n \"merchant_currency\": \"usd\",\n \"merchant_data\": {\n \"category\": \"computer_software_stores\",\n \"category_code\": \"5734\",\n \"city\": \"SAN FRANCISCO\",\n \"country\": \"US\",\n \"name\": \"STRIPE\",\n \"network_id\": \"1234567890\",\n \"postal_code\": \"94103\",\n \"state\": \"CA\"\n },\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"redaction\": null,\n \"type\": \"capture\",\n \"wallet\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Connection TokenA Connection Token is used by the Stripe Terminal SDK to connect to a reader.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/terminal\/connection_tokens\n'''"},{"nl":"The connection token objectAttributes location string The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens. secret string Your application should pass this token to the Stripe Terminal SDK.More attributesExpand all object string, value is \"terminal.connection_token\"","code":"'''The connection token object {\n \"object\": \"terminal.connection_token\",\n \"secret\": \"pst_test_your_key\"\n}\n'''"},{"nl":"Create a Connection TokenTo connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.Parameters location optional The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see the docs on scoping connection tokens.ReturnsReturns a Connection Token","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.ConnectionToken.create()\n'''Response {\n \"object\": \"terminal.connection_token\",\n \"secret\": \"pst_test_your_key\"\n}'''"},{"nl":"LocationA Location represents a grouping of readers.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/terminal\/locations\u00a0\u00a0\u00a0GET\u00a0\/v1\/terminal\/locations\/:id\u00a0\u00a0POST\u00a0\/v1\/terminal\/locations\/:idDELETE\u00a0\/v1\/terminal\/locations\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/terminal\/locations\n'''"},{"nl":"The location objectAttributes id string Unique identifier for the object. address hash The full address of the location.Show child attributes display_name string The display name of the location. 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 \"terminal.location\" configuration_overrides string livemode boolean","code":"'''The location object {\n \"id\": \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n \"object\": \"terminal.location\",\n \"address\": {\n \"city\": \"Stevieland\",\n \"country\": \"BE\",\n \"line1\": \"1016 Mohamed Rest Suite 549\\nEast Fermin, AK 54642-6984\",\n \"line2\": null,\n \"postal_code\": \"07458-8074\",\n \"state\": null\n },\n \"display_name\": \"My First Store\",\n \"livemode\": false,\n \"metadata\": {}\n}\n'''"},{"nl":"Create a LocationCreates a new Location object.\nFor further details, including which address fields are required in each country, see the Manage locations guide.Parameters address required The full address of the location.Show child parameters display_name required A name for the location. 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 configuration_overrides optional ReturnsReturns a Location object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Location.create(\n display_name=\"My First Store\",\n address={\n \"line1\": \"1234 Main Street\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"postal_code\": \"94111\",\n },\n)\n'''Response {\n \"id\": \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n \"object\": \"terminal.location\",\n \"address\": {\n \"line1\": \"1234 Main Street\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"postal_code\": \"94111\"\n },\n \"display_name\": \"My First Store\",\n \"livemode\": false,\n \"metadata\": {}\n}'''"},{"nl":"Retrieve a LocationRetrieves a Location object.ParametersNo parameters.ReturnsReturns a Location object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Location.retrieve(\n \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n)\n'''Response {\n \"id\": \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n \"object\": \"terminal.location\",\n \"address\": {\n \"city\": \"Stevieland\",\n \"country\": \"BE\",\n \"line1\": \"1016 Mohamed Rest Suite 549\\nEast Fermin, AK 54642-6984\",\n \"line2\": null,\n \"postal_code\": \"07458-8074\",\n \"state\": null\n },\n \"display_name\": \"My First Store\",\n \"livemode\": false,\n \"metadata\": {}\n}'''"},{"nl":"Update a LocationUpdates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters address optional dictionary The full address of the location.Show child parameters display_name optional A name for the location. 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 configuration_overrides optional ReturnsReturns an updated Location object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Location.modify(\n \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n display_name=\"My First Store\",\n)\n'''Response {\n \"id\": \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n \"object\": \"terminal.location\",\n \"address\": {\n \"city\": \"Stevieland\",\n \"country\": \"BE\",\n \"line1\": \"1016 Mohamed Rest Suite 549\\nEast Fermin, AK 54642-6984\",\n \"line2\": null,\n \"postal_code\": \"07458-8074\",\n \"state\": null\n },\n \"display_name\": \"My First Store\",\n \"livemode\": false,\n \"metadata\": {}\n}'''"},{"nl":"Delete a LocationDeletes a Location object.ParametersNo parameters.ReturnsReturns the Location object that was deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Location.delete(\n \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n)\n'''Response {\n \"id\": \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n \"object\": \"terminal.location\",\n \"deleted\": true\n}'''"},{"nl":"List all LocationsReturns a list of Location objects.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit locations, starting after location starting_after. Each entry in the array is a separate Terminal location object. If no more locations are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Location.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/terminal\/locations\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"tml_5oQeOYRZZRY3Q3Vpdz1vRfaQ\",\n \"object\": \"terminal.location\",\n \"address\": {\n \"city\": \"Stevieland\",\n \"country\": \"BE\",\n \"line1\": \"1016 Mohamed Rest Suite 549\\nEast Fermin, AK 54642-6984\",\n \"line2\": null,\n \"postal_code\": \"07458-8074\",\n \"state\": null\n },\n \"display_name\": \"My First Store\",\n \"livemode\": false,\n \"metadata\": {}\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"ReaderA Reader represents a physical device for accepting payment details.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/terminal\/readers\u00a0\u00a0\u00a0GET\u00a0\/v1\/terminal\/readers\/:id\u00a0\u00a0POST\u00a0\/v1\/terminal\/readers\/:idDELETE\u00a0\/v1\/terminal\/readers\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/terminal\/readers\u00a0\u00a0POST\u00a0\/v1\/terminal\/readers\/:id\/process_payment_intent\u00a0\u00a0POST\u00a0\/v1\/terminal\/readers\/:id\/process_setup_intent\u00a0\u00a0POST\u00a0\/v1\/terminal\/readers\/:id\/set_reader_display\u00a0\u00a0POST\u00a0\/v1\/terminal\/readers\/:id\/cancel_action\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/terminal\/readers\/:id\/present_payment_method\n'''"},{"nl":"The reader objectAttributes id string Unique identifier for the object. device_type string Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, or simulated_wisepos_e. label string Custom label given to the reader for easier identification. location string expandable The location identifier of the reader. 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. serial_number string Serial number of the reader. status string The networking status of the reader.More attributesExpand all object string, value is \"terminal.reader\" action hash preview feature device_sw_version string ip_address string livemode boolean","code":"'''The reader object {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": null,\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}\n'''"},{"nl":"Create a ReaderCreates a new Reader object.Parameters location required The location to assign the reader to. registration_code required A code generated by the reader used for registering to an account. label optional Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. 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 a Reader object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.create(\n registration_code=\"puppies-plug-could\",\n label=\"Blue Rabbit\",\n location=\"tml_1234\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": null,\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": \"tml_1234\",\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\",\n \"registration_code\": \"puppies-plug-could\"\n}'''"},{"nl":"Retrieve a ReaderRetrieves a Reader object.ParametersNo parameters.ReturnsReturns a Reader object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.retrieve(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": null,\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"Update a ReaderUpdates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters label optional The new label of the reader. 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 an updated Reader object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.modify(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n label=\"Blue Rabbit\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": null,\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"Delete a ReaderDeletes a Reader object.ParametersNo parameters.ReturnsReturns the Reader object that was deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.delete(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"deleted\": true\n}'''"},{"nl":"List all ReadersReturns a list of Reader objects.Parameters device_type optional enum Filters readers by device typePossible enum valuesbbpos_wisepad3 stripe_m2 bbpos_chipper2x bbpos_wisepos_e verifone_P400 simulated_wisepos_e location optional A location ID to filter the response list to only readers at the specific location serial_number optional preview feature Filters readers by serial number status optional enum A status filter to filter readers to only offline or online readersPossible enum valuesoffline online 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 readers, starting after reader starting_after. Each entry in the array is a separate Terminal Reader object. If no more readers are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/terminal\/readers\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": null,\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Hand-off a PaymentIntent to a ReaderInitiates a payment flow on a Reader.Parameters payment_intent required PaymentIntent IDMore parametersExpand all process_config optional dictionary ReturnsReturns an updated Reader resource","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.process_payment_intent(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n payment_intent=\"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": {\n \"failure_code\": null,\n \"failure_message\": null,\n \"process_payment_intent\": {\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"status\": \"in_progress\",\n \"type\": \"process_payment_intent\"\n },\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"Hand-off a SetupIntent to a ReaderInitiates a setup intent flow on a Reader.Parameters customer_consent_collected required Customer Consent Collected setup_intent required SetupIntent IDReturnsReturns an updated Reader resource","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.process_setup_intent(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n setup_intent=\"seti_1EuLW12eZvKYlo2CSSF0PlLO\",\n customer_consent_collected=\"true\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": {\n \"failure_code\": null,\n \"failure_message\": null,\n \"process_setup_intent\": {\n \"setup_intent\": \"seti_1EuLW12eZvKYlo2CSSF0PlLO\"\n },\n \"status\": \"in_progress\",\n \"type\": \"process_setup_intent\"\n },\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"Set reader displaySets reader display to show cart details.Parameters type required TypePossible enum valuescart cart optional dictionary CartShow child parametersReturnsReturns an updated Reader resource","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.set_reader_display(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n type=\"cart\",\n cart={\n \"currency\": \"usd\",\n \"line_items\": [\n {\n \"amount\": 5100,\n \"description\": \"Red t-shirt\",\n \"quantity\": 1,\n },\n ],\n \"tax\": 100,\n \"total\": 5200,\n },\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": {\n \"failure_code\": null,\n \"failure_message\": null,\n \"set_reader_display\": {\n \"type\": \"cart\",\n \"cart\": {\n \"currency\": \"usd\",\n \"line_items\": [\n {\n \"amount\": 5100,\n \"description\": \"Red t-shirt\",\n \"quantity\": 1\n }\n ],\n \"tax\": 100,\n \"total\": 5200\n }\n },\n \"status\": \"succeeded\",\n \"type\": \"set_reader_display\"\n },\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"Cancel the current reader actionCancels the current reader action.ParametersNo parameters.ReturnsReturns an updated Reader resource","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.cancel_action(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": null,\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"Simulate presenting a payment methodPresents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.Parameters card_present optional dictionary Simulated data for the card_present payment methodShow child parameters type optional enum Simulated payment typePossible enum valuescard_present ReturnsReturns an updated Reader resource","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.terminal.Reader.TestHelpers.present_payment_method(\n \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n)\n'''Response {\n \"id\": \"tmr_btgOcOEM5hB0GOzeM19LioJf\",\n \"object\": \"terminal.reader\",\n \"action\": {\n \"failure_code\": null,\n \"failure_message\": null,\n \"process_payment_intent\": {\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\"\n },\n \"status\": \"succeeded\",\n \"type\": \"process_payment_intent\"\n },\n \"device_sw_version\": null,\n \"device_type\": \"bbpos_wisepos_e\",\n \"ip_address\": \"192.168.2.2\",\n \"label\": \"Blue Rabbit\",\n \"livemode\": false,\n \"location\": null,\n \"metadata\": {},\n \"serial_number\": \"123-456-789\",\n \"status\": \"online\"\n}'''"},{"nl":"ConfigurationA Configurations object represents how features should be configured for terminal readers","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/terminal\/configurations\u00a0\u00a0\u00a0GET\u00a0\/v1\/terminal\/configurations\/:id\u00a0\u00a0POST\u00a0\/v1\/terminal\/configurations\/:idDELETE\u00a0\/v1\/terminal\/configurations\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/terminal\/configurations\n'''"},{"nl":"The Configuration objectAttributes id string Unique identifier for the object. bbpos_wisepos_e hash An object containing device type specific settings for BBPOS WisePOS EShow child attributes is_account_default boolean Whether this Configuration is the default for your account tipping hash On-reader tipping settingsShow child attributes verifone_p400 hash An object containing device type specific settings for Verifone P400Show child attributesMore attributesExpand all object string, value is \"terminal.configuration\" livemode boolean","code":"'''The Configuration object {\n \"id\": \"tmc_ElVUAjF8xXG3hj\",\n \"object\": \"terminal.configuration\",\n \"bbpos_wisepos_e\": {\n \"splashscreen\": \"file_1LSe6q2eZvKYlo2CU2r7wt6K\"\n },\n \"is_account_default\": false,\n \"livemode\": false\n}\n'''"},{"nl":"Create a ConfigurationCreates a new Configuration object.Parameters bbpos_wisepos_e optional dictionary An object containing device type specific settings for BBPOS WisePOS E readersShow child parameters tipping optional dictionary Tipping configurations for readers supporting on-reader tipsShow child parameters verifone_p400 optional dictionary An object containing device type specific settings for Verifone P400 readersShow child parametersReturnsReturns a Configuration object if creation succeeds","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.terminal.Configuration.create(\n bbpos_wisepos_e={\n \"splashscreen\":\n \"file_1LSe6q2eZvKYlo2C44t5c528\",\n },\n)\n'''Response {\n \"id\": \"tmc_ElVUAjF8xXG3hj\",\n \"object\": \"terminal.configuration\",\n \"bbpos_wisepos_e\": {\n \"splashscreen\": \"file_1LSe6q2eZvKYlo2C44t5c528\"\n },\n \"is_account_default\": false,\n \"livemode\": false\n}'''"},{"nl":"Retrieve a ConfigurationRetrieves a Configuration object.ParametersNo parameters.ReturnsReturns a Configuration object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.terminal.Configuration.retrieve(\n \"tmc_ElVUAjF8xXG3hj\",\n)\n'''Response {\n \"id\": \"tmc_ElVUAjF8xXG3hj\",\n \"object\": \"terminal.configuration\",\n \"bbpos_wisepos_e\": {\n \"splashscreen\": \"file_1LSe6q2eZvKYlo2CU2r7wt6K\"\n },\n \"is_account_default\": false,\n \"livemode\": false\n}'''"},{"nl":"Update a ConfigurationUpdates a new Configuration object.Parameters bbpos_wisepos_e optional dictionary An object containing device type specific settings for BBPOS WisePOS E readersShow child parameters tipping optional dictionary Tipping configurations for readers supporting on-reader tipsShow child parameters verifone_p400 optional dictionary An object containing device type specific settings for Verifone P400 readersShow child parametersReturnsReturns a Configuration object if the update succeeds","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.terminal.Configuration.modify(\n \"tmc_ElVUAjF8xXG3hj\",\n bbpos_wisepos_e={\n \"splashscreen\":\n \"file_1LSe6q2eZvKYlo2C44t5c528\",\n },\n)\n'''Response {\n \"id\": \"tmc_ElVUAjF8xXG3hj\",\n \"object\": \"terminal.configuration\",\n \"bbpos_wisepos_e\": {\n \"splashscreen\": \"file_1LSe6q2eZvKYlo2C44t5c528\"\n },\n \"is_account_default\": false,\n \"livemode\": false\n}'''"},{"nl":"Delete a ConfigurationDeletes a Configuration object.ParametersNo parameters.ReturnsReturns the Configuration object that was deleted","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.terminal.Configuration.delete(\n \"tmc_ElVUAjF8xXG3hj\",\n)\n'''Response {\n \"id\": \"tmc_ElVUAjF8xXG3hj\",\n \"object\": \"terminal.configuration\",\n \"deleted\": true\n}'''"},{"nl":"List all ConfigurationsReturns a list of Configuration objects.Parameters is_account_default optional if present, only return the account default or non-default configurations.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 configurations, starting after configurations configurations. Each entry in the array is a separate Terminal configurations object. If no more configurations are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.terminal.Configuration.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/terminal\/configurations\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"tmc_ElVUAjF8xXG3hj\",\n \"object\": \"terminal.configuration\",\n \"bbpos_wisepos_e\": {\n \"splashscreen\": \"file_1LSe6q2eZvKYlo2CU2r7wt6K\"\n },\n \"is_account_default\": false,\n \"livemode\": false\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"FinancialAccountsStripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance.\nFinancialAccounts serve as the source and destination of Treasury\u2019s money movement APIs","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/financial_accounts\u00a0\u00a0POST\u00a0\/v1\/treasury\/financial_accounts\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/financial_accounts\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/financial_accounts\n'''"},{"nl":"The FinancialAccount objectAttributes id string Unique identifier for the object. object string, value is \"treasury.financial_account\" String representing the object\u2019s type. Objects of the same type share the same value. active_features array of enum values The array of paths to active Features in the Features hash.Possible enum valuescard_issuing outbound_payments.ach outbound_payments.us_domestic_wire financial_addresses.aba deposit_insurance intra_stripe_flows inbound_transfers.ach outbound_transfers.ach outbound_transfers.us_domestic_wire remote_deposit_capture balance hash The single multi-currency balance of the FinancialAccount. Positive values represent money that belongs to the user while negative values represent funds the user owes. Currently, FinancialAccounts can only carry balances in USD.Show child attributes country string Two-letter country code (ISO 3166-1 alpha-2). created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. features hash expandable The features and their statuses for this FinancialAccount. This field is not included by default. To include it in the response, expand the features field.Show child attributes financial_addresses array of hashes The set of credentials that resolve to a FinancialAccount.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. pending_features array of enum values The array of paths to pending Features in the Features hash.Possible enum valuescard_issuing outbound_payments.ach outbound_payments.us_domestic_wire financial_addresses.aba deposit_insurance intra_stripe_flows inbound_transfers.ach outbound_transfers.ach outbound_transfers.us_domestic_wire remote_deposit_capture platform_restrictions hash The set of functionalities that the platform can restrict on the FinancialAccount.Show child attributes restricted_features array of enum values The array of paths to restricted Features in the Features hash.Possible enum valuescard_issuing outbound_payments.ach outbound_payments.us_domestic_wire financial_addresses.aba deposit_insurance intra_stripe_flows inbound_transfers.ach outbound_transfers.ach outbound_transfers.us_domestic_wire remote_deposit_capture status enum The enum specifying what state the account is in.Possible enum valuesopen closed status_details hash Details related to the status of this FinancialAccount.Show child attributes supported_currencies array The currencies the FinancialAccount can hold a balance in. Three-letter ISO currency code, in lowercase","code":"'''The FinancialAccount object {\n \"id\": \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n \"object\": \"treasury.financial_account\",\n \"active_features\": [\n \"financial_addresses.aba\",\n \"outbound_payments.ach\",\n \"outbound_payments.us_domestic_wire\"\n ],\n \"balance\": {\n \"cash\": {\n \"usd\": 0\n },\n \"inbound_pending\": {\n \"usd\": 0\n },\n \"outbound_pending\": {\n \"usd\": 0\n }\n },\n \"country\": \"US\",\n \"created\": 1659517841,\n \"financial_addresses\": [\n {\n \"aba\": {\n \"account_holder_name\": \"Jenny Rosen\",\n \"account_number_last4\": \"7890\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"routing_number\": \"0000000001\"\n },\n \"supported_networks\": [\n \"ach\",\n \"us_domestic_wire\"\n ],\n \"type\": \"aba\"\n }\n ],\n \"livemode\": true,\n \"metadata\": null,\n \"pending_features\": [],\n \"restricted_features\": [],\n \"status\": \"open\",\n \"status_details\": {\n \"closed\": null\n },\n \"supported_currencies\": [\n \"usd\"\n ]\n}\n'''"},{"nl":"Create a FinancialAccountCreates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.Parameters supported_currencies required The currencies the FinancialAccount can hold a balance in. features optional dictionary Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.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. platform_restrictions optional dictionary The set of functionalities that the platform can restrict on the FinancialAccount.Show child parametersReturnsReturns a FinancialAccount object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.FinancialAccount.create(\n supported_currencies=[\"usd\"],\n features={},\n)\n'''Response {\n \"id\": \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n \"object\": \"treasury.financial_account\",\n \"active_features\": [\n \"financial_addresses.aba\",\n \"outbound_payments.ach\",\n \"outbound_payments.us_domestic_wire\"\n ],\n \"balance\": {\n \"cash\": {\n \"usd\": 0\n },\n \"inbound_pending\": {\n \"usd\": 0\n },\n \"outbound_pending\": {\n \"usd\": 0\n }\n },\n \"country\": \"US\",\n \"created\": 1659517841,\n \"financial_addresses\": [\n {\n \"aba\": {\n \"account_holder_name\": \"Jenny Rosen\",\n \"account_number_last4\": \"7890\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"routing_number\": \"0000000001\"\n },\n \"supported_networks\": [\n \"ach\",\n \"us_domestic_wire\"\n ],\n \"type\": \"aba\"\n }\n ],\n \"livemode\": true,\n \"metadata\": null,\n \"pending_features\": [],\n \"restricted_features\": [],\n \"status\": \"open\",\n \"status_details\": {\n \"closed\": null\n },\n \"supported_currencies\": [\n \"usd\"\n ],\n \"features\": {}\n}'''"},{"nl":"Update a FinancialAccountUpdates the details of a FinancialAccount.Parameters features optional dictionary Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated status_details. Stripe or the platform may control features via the requested field.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. platform_restrictions optional dictionary The set of functionalities that the platform can restrict on the FinancialAccount.Show child parametersReturnsReturns a FinancialAccount object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.FinancialAccount.modify(\n \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n metadata={\"order_id\": \"6735\"},\n)\n'''Response {\n \"id\": \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n \"object\": \"treasury.financial_account\",\n \"active_features\": [\n \"financial_addresses.aba\",\n \"outbound_payments.ach\",\n \"outbound_payments.us_domestic_wire\"\n ],\n \"balance\": {\n \"cash\": {\n \"usd\": 0\n },\n \"inbound_pending\": {\n \"usd\": 0\n },\n \"outbound_pending\": {\n \"usd\": 0\n }\n },\n \"country\": \"US\",\n \"created\": 1659517841,\n \"financial_addresses\": [\n {\n \"aba\": {\n \"account_holder_name\": \"Jenny Rosen\",\n \"account_number_last4\": \"7890\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"routing_number\": \"0000000001\"\n },\n \"supported_networks\": [\n \"ach\",\n \"us_domestic_wire\"\n ],\n \"type\": \"aba\"\n }\n ],\n \"livemode\": true,\n \"metadata\": {\n \"order_id\": \"6735\"\n },\n \"pending_features\": [],\n \"restricted_features\": [],\n \"status\": \"open\",\n \"status_details\": {\n \"closed\": null\n },\n \"supported_currencies\": [\n \"usd\"\n ]\n}'''"},{"nl":"Retrieve a FinancialAccountRetrieves the details of a FinancialAccount.ParametersNo parameters.ReturnsReturn a FinancialAccount object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.FinancialAccount.retrieve(\n \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n)\n'''Response {\n \"id\": \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n \"object\": \"treasury.financial_account\",\n \"active_features\": [\n \"financial_addresses.aba\",\n \"outbound_payments.ach\",\n \"outbound_payments.us_domestic_wire\"\n ],\n \"balance\": {\n \"cash\": {\n \"usd\": 0\n },\n \"inbound_pending\": {\n \"usd\": 0\n },\n \"outbound_pending\": {\n \"usd\": 0\n }\n },\n \"country\": \"US\",\n \"created\": 1659517841,\n \"financial_addresses\": [\n {\n \"aba\": {\n \"account_holder_name\": \"Jenny Rosen\",\n \"account_number_last4\": \"7890\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"routing_number\": \"0000000001\"\n },\n \"supported_networks\": [\n \"ach\",\n \"us_domestic_wire\"\n ],\n \"type\": \"aba\"\n }\n ],\n \"livemode\": true,\n \"metadata\": null,\n \"pending_features\": [],\n \"restricted_features\": [],\n \"status\": \"open\",\n \"status_details\": {\n \"closed\": null\n },\n \"supported_currencies\": [\n \"usd\"\n ]\n}'''"},{"nl":"List all FinancialAccountsReturns a list of FinancialAccounts.Parameters created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: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 FinancialAccounts, starting after FinancialAccount starting_after. Each entry in the array is a separate FinancialAccount object. If no more FinancialAccounts are available, the resulting array is empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.FinancialAccount.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/financial_accounts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"fa_1LSdbB2eZvKYlo2Cq76guDva\",\n \"object\": \"treasury.financial_account\",\n \"active_features\": [\n \"financial_addresses.aba\",\n \"outbound_payments.ach\",\n \"outbound_payments.us_domestic_wire\"\n ],\n \"balance\": {\n \"cash\": {\n \"usd\": 0\n },\n \"inbound_pending\": {\n \"usd\": 0\n },\n \"outbound_pending\": {\n \"usd\": 0\n }\n },\n \"country\": \"US\",\n \"created\": 1659517841,\n \"financial_addresses\": [\n {\n \"aba\": {\n \"account_holder_name\": \"Jenny Rosen\",\n \"account_number_last4\": \"7890\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"routing_number\": \"0000000001\"\n },\n \"supported_networks\": [\n \"ach\",\n \"us_domestic_wire\"\n ],\n \"type\": \"aba\"\n }\n ],\n \"livemode\": true,\n \"metadata\": null,\n \"pending_features\": [],\n \"restricted_features\": [],\n \"status\": \"open\",\n \"status_details\": {\n \"closed\": null\n },\n \"supported_currencies\": [\n \"usd\"\n ]\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"FinancialAccount FeaturesEncodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details.\nStripe or the platform can control Features via the requested field","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/financial_accounts\/:id\/features\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/financial_accounts\/:id\/features\n'''"},{"nl":"The FinancialAccount Feature objectAttributes object string, value is \"treasury.financial_account_features\" String representing the object\u2019s type. Objects of the same type share the same value. card_issuing hash Contains a Feature encoding the FinancialAccount\u2019s ability to be used with the Issuing product, including attaching cards to and drawing funds from.Show child attributes deposit_insurance hash Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.Show child attributes financial_addresses hash Contains Features that add FinancialAddresses to the FinancialAccount.Show child attributes inbound_transfers hash Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.Show child attributes intra_stripe_flows hash Represents the ability for this FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).Show child attributes outbound_payments hash Contains Features related to initiating money movement out of the FinancialAccount to someone else\u2019s bucket of money.Show child attributes outbound_transfers hash Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.Show child attribute","code":"'''The FinancialAccount Feature object {\n \"object\": \"treasury.financial_account_features\",\n \"card_issuing\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"deposit_insurance\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"financial_addresses\": {\n \"aba\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"inbound_transfers\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"intra_stripe_flows\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"outbound_payments\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"us_domestic_wire\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"outbound_transfers\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"us_domestic_wire\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n }\n}\n'''"},{"nl":"Update FinancialAccount FeaturesUpdates the Features associated with a FinancialAccount.Parameters card_issuing optional dictionary Encodes the FinancialAccount\u2019s ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.Show child parameters deposit_insurance optional dictionary Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.Show child parameters financial_addresses optional dictionary Contains Features that add FinancialAddresses to the FinancialAccount.Show child parameters inbound_transfers optional dictionary Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.Show child parameters intra_stripe_flows optional dictionary Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).Show child parameters outbound_payments optional dictionary Includes Features related to initiating money movement out of the FinancialAccount to someone else\u2019s bucket of money.Show child parameters outbound_transfers optional dictionary Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.Show child parametersReturnsA dictionary of Features associated with the given FinancialAccount. Each entry in the dictionary is a Feature object, which may contain child Features","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.FinancialAccount.modify_financial_account_features(\n \"fa_1LSdrV2eZvKYlo2C1rw3AuSN\",\n card_issuing={\"requested\": False},\n)\n'''Response {\n \"object\": \"treasury.financial_account_features\",\n \"deposit_insurance\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"financial_addresses\": {\n \"aba\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"inbound_transfers\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"intra_stripe_flows\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"outbound_payments\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"us_domestic_wire\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"outbound_transfers\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"us_domestic_wire\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n }\n}'''"},{"nl":"Retrieve FinancialAccount FeaturesRetrieves Features information associated with the FinancialAccount.ParametersNo parameters.ReturnsA dictionary of Features associated with the given FinancialAccount. Each entry in the dictionary is a Feature object, which might contain child Features","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.FinancialAccount.retrieve_feature(\n \"fa_1LSdrV2eZvKYlo2C1rw3AuSN\",\n)\n'''Response {\n \"object\": \"treasury.financial_account_features\",\n \"card_issuing\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"deposit_insurance\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"financial_addresses\": {\n \"aba\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"inbound_transfers\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"intra_stripe_flows\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"outbound_payments\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"us_domestic_wire\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"outbound_transfers\": {\n \"ach\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n },\n \"us_domestic_wire\": {\n \"requested\": true,\n \"status\": \"active\",\n \"status_details\": []\n }\n },\n \"id\": \"fa_1LSdrV2eZvKYlo2C1rw3AuSN\"\n}'''"},{"nl":"TransactionsTransactions represent changes to a FinancialAccount's balance","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/transactions\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/transactions\n'''"},{"nl":"The Transaction objectAttributes id string Unique identifier for the object. object string, value is \"treasury.transaction\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. balance_impact hash The change made to each of the FinancialAccount\u2019s sub-balances by the Transaction.Show child attributes created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. 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. entries list expandable A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. This field is not included by default. To include it in the response, expand the entries field.Show child attributes financial_account string The FinancialAccount associated with this object. flow string ID of the flow that created the Transaction. flow_details hash expandable Details of the flow that created the Transaction. This field is not included by default. To include it in the response, expand the flow_details field.Show child attributes flow_type enum Type of the flow that created the Transaction.Possible enum valuesinbound_transfer The Transaction is associated with an InboundTransfer.issuing_authorization The Transaction is associated with an Issuing authorization.outbound_payment The Transaction is associated with an OutboundPayment.outbound_transfer The Transaction is associated with an OutboundTransfer.received_credit The Transaction is associated with a ReceivedCredit.received_debit The Transaction is associated with a ReceivedDebit.credit_reversal The Transaction is associated with a CreditReversal.debit_reversal The Transaction is associated with a DebitReversal.other The Transaction is associated with some other money movement not listed above. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. status enum Status of the Transaction.Possible enum valuesopen The initial state for all Transactions. The Transaction results in updates to the sub-balance amounts, but the current balance is not affected until the Transaction posts.posted Funds have successfully entered or left the account. The current balance was affected.void The Transaction never impacted the balance. For example, a Transaction would enter this state if an OutboundPayment was initiated but then canceled before the funds left the account. status_transitions hash Hash containing timestamps of when the object transitioned to a particular status.Show child attribute","code":"'''The Transaction object {\n \"id\": \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n \"object\": \"treasury.transaction\",\n \"amount\": -100,\n \"balance_impact\": {\n \"cash\": -100,\n \"inbound_pending\": 0,\n \"outbound_pending\": 100\n },\n \"created\": 1659517920,\n \"currency\": \"usd\",\n \"description\": \"Jane Austen (6789) | Outbound transfer | transfer\",\n \"financial_account\": \"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n \"flow\": \"obt_1LSdcS2eZvKYlo2C57nEGLrc\",\n \"flow_type\": \"outbound_transfer\",\n \"livemode\": false,\n \"status\": \"open\",\n \"status_transitions\": {\n \"posted_at\": null,\n \"void_at\": null\n }\n}\n'''"},{"nl":"Retrieve a TransactionRetrieves the details of an existing Transaction.ParametersNo parameters.ReturnsReturns a Transaction object if a valid identifier was provided. Otherwise, returns an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.Transaction.retrieve(\n \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n)\n'''Response {\n \"id\": \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n \"object\": \"treasury.transaction\",\n \"amount\": -100,\n \"balance_impact\": {\n \"cash\": -100,\n \"inbound_pending\": 0,\n \"outbound_pending\": 100\n },\n \"created\": 1659517920,\n \"currency\": \"usd\",\n \"description\": \"Jane Austen (6789) | Outbound transfer | transfer\",\n \"financial_account\": \"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n \"flow\": \"obt_1LSdcS2eZvKYlo2C57nEGLrc\",\n \"flow_type\": \"outbound_transfer\",\n \"livemode\": false,\n \"status\": \"open\",\n \"status_transitions\": {\n \"posted_at\": null,\n \"void_at\": null\n }\n}'''"},{"nl":"List all TransactionsRetrieves a list of Transaction objects.Parameters financial_account required Returns objects associated with this FinancialAccount. created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:Show child parameters order_by optional enum The results are in reverse chronological order by created or posted_at. The default is created.Possible enum valuescreated Timestamp describing when the Transaction was created.posted_at Timestamp describing when the Transaction was posted. status optional enum Only return Transactions that have the given status: open, posted, or void.Possible enum valuesopen The initial state for all Transactions. The Transaction results in updates to the sub-balance amounts, but the current balance is not affected until the Transaction posts.posted Funds have successfully entered or left the account. The current balance was affected.void The Transaction never impacted the balance. For example, a Transaction would enter this state if an OutboundPayment was initiated but then canceled before the funds left the account. status_transitions optional dictionary A filter for the status_transitions.posted_at timestamp. When using this filter, status=posted and order_by=posted_at must also be specified.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 Transactions, starting after Transaction starting_after. Each entry in the array is a separate Transaction object. If no more Transactions are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.Transaction.list(\n financial_account=\"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/transactions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n \"object\": \"treasury.transaction\",\n \"amount\": -100,\n \"balance_impact\": {\n \"cash\": -100,\n \"inbound_pending\": 0,\n \"outbound_pending\": 100\n },\n \"created\": 1659517920,\n \"currency\": \"usd\",\n \"description\": \"Jane Austen (6789) | Outbound transfer | transfer\",\n \"financial_account\": \"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n \"flow\": \"obt_1LSdcS2eZvKYlo2C57nEGLrc\",\n \"flow_type\": \"outbound_transfer\",\n \"livemode\": false,\n \"status\": \"open\",\n \"status_transitions\": {\n \"posted_at\": null,\n \"void_at\": null\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"TransactionEntriesTransactionEntries represent individual units of money movements within a single Transaction","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/transaction_entries\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/transaction_entries\n'''"},{"nl":"The TransactionEntry objectAttributes id string Unique identifier for the object. object string, value is \"treasury.transaction_entry\" String representing the object\u2019s type. Objects of the same type share the same value. balance_impact hash The current impact of the TransactionEntry on the FinancialAccount\u2019s balance.Show child attributes created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. effective_at timestamp When the TransactionEntry will impact the FinancialAccount\u2019s balance. financial_account string The FinancialAccount associated with this object. flow string Token of the flow associated with the TransactionEntry. flow_details hash expandable Details of the flow associated with the TransactionEntry. This field is not included by default. To include it in the response, expand the flow_details field.Show child attributes flow_type enum Type of the flow associated with the TransactionEntry.Possible enum valuesinbound_transfer The Transaction is associated with an InboundTransfer.issuing_authorization The Transaction is associated with an Issuing authorization.outbound_payment The Transaction is associated with an OutboundPayment.outbound_transfer The Transaction is associated with an OutboundTransfer.received_credit The Transaction is associated with a ReceivedCredit.received_debit The Transaction is associated with a ReceivedDebit.credit_reversal The Transaction is associated with a CreditReversal.debit_reversal The Transaction is associated with a DebitReversal.other The Transaction is associated with some other money movement not listed above. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. transaction string expandable The Transaction associated with this object. type enum The specific money movement that generated the TransactionEntry.Possible enum valuesoutbound_payment The TransactionEntry was generated by an OutboundPayment.outbound_payment_cancellation The TransactionEntry was generated by a cancelled OutboundPayment.outbound_payment_failure The TransactionEntry was generated by a failed OutboundPayment.outbound_payment_posting The TransactionEntry was generated by a posted OutboundPayment.outbound_payment_return The TransactionEntry was generated by a returned OutboundPayment.outbound_transfer The TransactionEntry was generated by an OutboundTransfer.outbound_transfer_cancellation The TransactionEntry was generated by a canceled OutboundTransfer.Show 13 mor","code":"'''The TransactionEntry object {\n \"id\": \"trxne_1LSdcT2eZvKYlo2CSclqAhpM\",\n \"object\": \"treasury.transaction_entry\",\n \"balance_impact\": {\n \"cash\": 0,\n \"inbound_pending\": 0,\n \"outbound_pending\": -1000\n },\n \"created\": 1659517921,\n \"currency\": \"usd\",\n \"effective_at\": 1659517921,\n \"financial_account\": \"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n \"flow\": \"obt_1LSdcS2eZvKYlo2C57nEGLrc\",\n \"flow_type\": \"outbound_transfer\",\n \"livemode\": false,\n \"transaction\": \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n \"type\": \"outbound_transfer\"\n}\n'''"},{"nl":"Retrieve a TransactionEntryRetrieves a TransactionEntry object.ParametersNo parameters.ReturnsReturns a TransactionEntry object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.TransactionEntry.retrieve(\n \"trxne_1LSdcT2eZvKYlo2CSclqAhpM\",\n)\n'''Response {\n \"id\": \"trxne_1LSdcT2eZvKYlo2CSclqAhpM\",\n \"object\": \"treasury.transaction_entry\",\n \"balance_impact\": {\n \"cash\": 0,\n \"inbound_pending\": 0,\n \"outbound_pending\": -1000\n },\n \"created\": 1659517921,\n \"currency\": \"usd\",\n \"effective_at\": 1659517921,\n \"financial_account\": \"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n \"flow\": \"obt_1LSdcS2eZvKYlo2C57nEGLrc\",\n \"flow_type\": \"outbound_transfer\",\n \"livemode\": false,\n \"transaction\": \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n \"type\": \"outbound_transfer\"\n}'''"},{"nl":"List all TransactionEntriesRetrieves a list of TransactionEntry objects.Parameters financial_account required Returns objects associated with this FinancialAccount. created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:Show child parameters effective_at optional dictionary A filter on the list based on the object effective_at field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:Show child parameters order_by optional enum The results are in reverse chronological order by created or effective_at. The default is created.Possible enum valuescreated Timestamp describing when the TransactionEntry was created.effective_at Timestamp describing when the TransactionEntry was effective. transaction optional Only return TransactionEntries associated with this Transaction.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 TransactionEntries, starting after TransactionEntry starting_after. Each entry in the array is a separate TransactionEntry object. If no more TransactionEntries are available, the resulting array is empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.TransactionEntry.list(\n financial_account=\"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/transaction_entrys\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"trxne_1LSdcT2eZvKYlo2CSclqAhpM\",\n \"object\": \"treasury.transaction_entry\",\n \"balance_impact\": {\n \"cash\": 0,\n \"inbound_pending\": 0,\n \"outbound_pending\": -1000\n },\n \"created\": 1659517921,\n \"currency\": \"usd\",\n \"effective_at\": 1659517921,\n \"financial_account\": \"fa_1LSdcS2eZvKYlo2C9OkJJG35\",\n \"flow\": \"obt_1LSdcS2eZvKYlo2C57nEGLrc\",\n \"flow_type\": \"outbound_transfer\",\n \"livemode\": false,\n \"transaction\": \"trxn_1LSdcS2eZvKYlo2CvaRGIFEN\",\n \"type\": \"outbound_transfer\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"OutboundTransfersUse OutboundTransfers to transfer funds from a FinancialAccount to a PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.Simulate OutboundTransfer state changes with the \/v1\/test_helpers\/treasury\/outbound_transfers endpoints. These methods can only be called on test mode objects","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/outbound_transfers\u00a0\u00a0POST\u00a0\/v1\/treasury\/outbound_transfers\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/outbound_transfers\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/outbound_transfers\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/outbound_transfers\/:id\/post\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/outbound_transfers\/:id\/return\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/outbound_transfers\/:id\/fail\n'''"},{"nl":"The OutboundTransfer objectAttributes id string Unique identifier for the object. object string, value is \"treasury.outbound_transfer\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. cancelable boolean Returns true if the object can be canceled, and false otherwise. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. 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_payment_method string The PaymentMethod used as the payment instrument for an OutboundTransfer. destination_payment_method_details hash Details about the PaymentMethod for an OutboundTransferShow child attributes expected_arrival_date timestamp The date when funds are expected to arrive in the destination account. financial_account string The FinancialAccount that funds were pulled from. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. returned_details hash Details about a returned OutboundTransfer. Only set when the status is returned.Show child attributes statement_descriptor string Information about the OutboundTransfer to be sent to the recipient account. status enum Current status of the OutboundTransfer: processing, failed, canceled, posted, returned. An OutboundTransfer is processing if it has been created and is pending. The status changes to posted once the OutboundTransfer has been \u201cconfirmed\u201d and funds have left the account, or to failed or canceled. If an OutboundTransfer fails to arrive at its destination, its status will change to returned.Possible enum valuesprocessing canceled failed posted returned status_transitions hash Hash containing timestamps of when the object transitioned to a particular status.Show child attributes transaction string expandable The Transaction associated with this object","code":"'''The OutboundTransfer object {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgatCqHoDNk6NpO0hL06uxupTC911B5-fw2twm0hGwib1IN-bZ4pIvQZkXHzIrnOUZ-sw4rDyltPKFiZTMZMNg\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}\n'''"},{"nl":"Create an OutboundTransferCreates an OutboundTransfer.Parameters amount required Amount (in cents) to be transferred. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. destination_payment_method required The PaymentMethod to use as the payment instrument for the OutboundTransfer. financial_account required The FinancialAccount to pull funds from. description optional An arbitrary string attached to the object. Often useful for displaying to users. destination_payment_method_options optional dictionary Hash describing payment method configuration details.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. statement_descriptor optional Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for ach transfers or 140 characters for wire transfers. The default value is transfer.ReturnsReturns an OutboundTransfer object if there were no issues with OutboundTransfer creation. The status of the created OutboundTransfer object is initially marked as processing","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.create(\n financial_account=\"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n destination_payment_method=\"pm_1234567890\",\n amount=500,\n currency=\"usd\",\n description=\"OutboundTransfer to my external bank account\",\n)\n'''Response {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 500,\n \"cancelable\": true,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1234567890\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}'''"},{"nl":"Cancel an OutboundTransferAn OutboundTransfer can be canceled if the funds have not yet been paid out.ParametersNo parameters.ReturnsReturns the OutboundTransfer object if the cancellation succeeded. Returns an error if the object has already been canceled or cannot be canceled","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.cancel(\n \"obt_1LSe792eZvKYlo2CdMy15utm\",\n)\n'''Response {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"canceled\",\n \"status_transitions\": {\n \"posted_at\": null,\n \"failed_at\": null,\n \"canceled_at\": 1659519823,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}'''"},{"nl":"Retrieve an OutboundTransferRetrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.ParametersNo parameters.ReturnsReturns an OutboundTransfer object if a valid identifier was provided. Otherwise, returns an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.retrieve(\n \"obt_1LSe792eZvKYlo2CdMy15utm\",\n)\n'''Response {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}'''"},{"nl":"List all OutboundTransfersReturns a list of OutboundTransfers sent from the specified FinancialAccount.Parameters financial_account required Returns objects associated with this FinancialAccount. status optional enum Only return OutboundTransfers that have the given status: processing, canceled, failed, posted, or returned.Possible enum valuesprocessing canceled failed posted returned 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 OutboundTransfers, starting after OutboundTransfer starting_after. Each entry in the array is a separate OutboundTransfer object. If no more OutboundTransfers are available, the resulting array is empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.list(\n financial_account=\"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/outbound_transfers\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Test mode: Post an OutboundTransferTransitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.ParametersNo parameters.ReturnsReturns the OutboundTransfer object in the posted state. Returns an error if the OutboundTransfer has already been posted or cannot be posted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.TestHelpers.post(\n \"obt_1LSe792eZvKYlo2CdMy15utm\",\n)\n'''Response {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"posted\",\n \"status_transitions\": {\n \"posted_at\": 1659519823,\n \"failed_at\": null,\n \"canceled_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}'''"},{"nl":"Test mode: Return an OutboundTransferTransitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.Parameters returned_details optional dictionary Details about a returned OutboundTransfer.Show child parametersReturnsReturns the OutboundTransfer object in the returned state. Returns an error if the OutboundTransfer has already been returned or cannot be returned","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.TestHelpers.return(\n \"obt_1LSe792eZvKYlo2CdMy15utm\",\n code=\"declined\",\n)\n'''Response {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": {\n \"code\": \"declined\",\n \"transaction\": \"trxn_1LSe792eZvKYlo2CePGIY5b0\"\n },\n \"statement_descriptor\": \"transfer\",\n \"status\": \"returned\",\n \"status_transitions\": {\n \"returned_at\": 1659519823,\n \"failed_at\": null,\n \"canceled_at\": null,\n \"posted_at\": 1659519823\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}'''"},{"nl":"Test mode: Fail an OutboundTransferTransitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.ParametersNo parameters.ReturnsReturns the OutboundTransfer object in the failed state. Returns an error if the OutboundTransfer has already been failed or cannot be failed","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundTransfer.TestHelpers.fail(\n \"obt_1LSe792eZvKYlo2CdMy15utm\",\n)\n'''Response {\n \"id\": \"obt_1LSe792eZvKYlo2CdMy15utm\",\n \"object\": \"treasury.outbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659519823,\n \"currency\": \"usd\",\n \"description\": \"OutboundTransfer to my external bank account\",\n \"destination_payment_method\": \"pm_1LSe792eZvKYlo2CYRFX7vAt\",\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSe792eZvKYlo2C9eJvA4u8\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"failed\",\n \"status_transitions\": {\n \"failed_at\": 1659519823,\n \"canceled_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe792eZvKYlo2CQfSsp6IB\"\n}'''"},{"nl":"Outbound PaymentsUse OutboundPayments to send funds to another party's external bank account or FinancialAccount. To send money to an account belonging to the same user, use an OutboundTransfer.Simulate OutboundPayment state changes with the \/v1\/test_helpers\/treasury\/outbound_payments endpoints. These methods can only be called on test mode objects","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/outbound_payments\u00a0\u00a0POST\u00a0\/v1\/treasury\/outbound_payments\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/outbound_payments\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/outbound_payments\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/outbound_payments\/:id\/post\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/outbound_payments\/:id\/return\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/outbound_payments\/:id\/fail\n'''"},{"nl":"The OutboundPayment objectAttributes id string Unique identifier for the object. object string, value is \"treasury.outbound_payment\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. cancelable boolean Returns true if the object can be canceled, and false otherwise. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string ID of the customer to whom an OutboundPayment is sent. description string An arbitrary string attached to the object. Often useful for displaying to users. destination_payment_method string The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using destination_payment_method_data. destination_payment_method_details hash Details about the PaymentMethod for an OutboundPayment.Show child attributes end_user_details hash Details about the end user.Show child attributes expected_arrival_date timestamp The date when funds are expected to arrive in the destination account. financial_account string The FinancialAccount that funds were pulled from. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. returned_details hash Details about a returned OutboundPayment. Only set when the status is returned.Show child attributes statement_descriptor string The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). status enum Current status of the OutboundPayment: processing, failed, posted, returned, canceled. An OutboundPayment is processing if it has been created and is pending. The status changes to posted once the OutboundPayment has been \u201cconfirmed\u201d and funds have left the account, or to failed or canceled. If an OutboundPayment fails to arrive at its destination, its status will change to returned.Possible enum valuesprocessing failed posted returned canceled status_transitions hash Hash containing timestamps of when the object transitioned to a particular status.Show child attributes transaction string expandable The Transaction associated with this object","code":"'''The OutboundPayment object {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"individual\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtz\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYIfE7sQl46NpMxcTQbWWqOs69ZGHCUCY6vernHtBxDzhTaa6ALrs8bZ0gHZlwaHa4PRo0ix3lglY4se2fPEQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}\n'''"},{"nl":"Create an OutboundPaymentCreates an OutboundPayment.Parameters amount required Amount (in cents) to be transferred. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. financial_account required The FinancialAccount to pull funds from. customer optional ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the destination_payment_method passed in. description optional An arbitrary string attached to the object. Often useful for displaying to users. destination_payment_method optional The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with destination_payment_method_data. destination_payment_method_data optional dictionary Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with destination_payment_method.Show child parameters destination_payment_method_options optional dictionary Payment method-specific configuration for this OutboundPayment.Show child parameters end_user_details optional dictionary End user details.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. statement_descriptor optional The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for ach payments, 140 characters for wire payments, or 500 characters for stripe network transfers. The default value is payment.ReturnsReturns an OutboundPayment object if there were no issues with OutboundPayment creation","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.create(\n financial_account=\"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n amount=10000,\n currency=\"usd\",\n customer=\"cus_8TEMHVY5moxIPI\",\n destination_payment_method=\"pm_1LSdi72eZvKYlo2CNRgK5HVh\",\n description=\"OutboundPayment to a 3rd party\",\n)\n'''Response {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": \"pm_1LSdi72eZvKYlo2CMbBhphCr\",\n \"destination_payment_method_details\": {\n \"type\": \"us_bank_account\",\n \"destination\": \"ba_1LSdi12eZvKYlo2CVq3qRggm\"\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"Cancel an OutboundPaymentCancel an OutboundPayment.ParametersNo parameters.ReturnsReturns the OutboundPayment object if the cancellation succeeded. Returns an error if the OutboundPayment has already been canceled or cannot be canceled","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.cancel(\n \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n)\n'''Response {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"individual\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtz\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYIfE7sQl46NpMxcTQbWWqOs69ZGHCUCY6vernHtBxDzhTaa6ALrs8bZ0gHZlwaHa4PRo0ix3lglY4se2fPEQ\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"canceled\",\n \"status_transitions\": {\n \"posted_at\": null,\n \"failed_at\": null,\n \"canceled_at\": 1659518271,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"Retrieve an OutboundPaymentRetrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.ParametersNo parameters.ReturnsReturns an OutboundPayment object if a valid identifier was provided. Otherwise, returns an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.retrieve(\n \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n)\n'''Response {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"type\": \"us_bank_account\",\n \"destination\": \"ba_1LSdi12eZvKYlo2CVq3qRggm\"\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"List all OutboundPaymentsReturns a list of OutboundPayments sent from the specified FinancialAccount.Parameters financial_account required Returns objects associated with this FinancialAccount. customer optional Only return OutboundPayments sent to this customer. status optional enum Only return OutboundPayments that have the given status: processing, failed, posted, returned, or canceled.Possible enum valuesprocessing failed posted returned canceled 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 OutboundPayments, starting after OutboundPayments starting_after. Each entry in the array is a separate OutboundPayments object. If no more OutboundPayments are available, the resulting array is empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.list(\n financial_account=\"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/outbound_payments\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"type\": \"us_bank_account\",\n \"destination\": \"ba_1LSdi12eZvKYlo2CVq3qRggm\"\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"canceled_at\": null,\n \"failed_at\": null,\n \"posted_at\": null,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Test mode: Post an OutboundPaymentTransitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.ParametersNo parameters.ReturnsReturns the OutboundPayment object in the posted state. Returns an error if the OutboundPayment has already been posted or cannot be posted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.TestHelpers.post(\n \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n)\n'''Response {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"type\": \"us_bank_account\",\n \"destination\": \"ba_1LSdi12eZvKYlo2CVq3qRggm\"\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"posted\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"posted_at\": 1659518271,\n \"returned_at\": null,\n \"canceled_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"Test mode: Return an OutboundPaymentTransitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.Parameters returned_details optional dictionary Optional hash to set the the return code.Show child parametersReturnsReturns the OutboundPayment object in the returned state. Returns an error if the OutboundPayment has already been returned or cannot be returned","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.TestHelpers.return(\n \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n return_details={\"code\": \"account_closed\"},\n)\n'''Response {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"type\": \"us_bank_account\",\n \"destination\": \"ba_1LSdi12eZvKYlo2CVq3qRggm\"\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": {\n \"code\": \"account_closed\",\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n },\n \"statement_descriptor\": \"payment\",\n \"status\": \"returned\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"posted_at\": 1659518271,\n \"returned_at\": 1659518272,\n \"canceled_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"Test mode: Fail an OutboundPaymentTransitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.ParametersNo parameters.ReturnsReturns the OutboundPayment object in the failed state. Returns an error if the OutboundPayment has already been failed or cannot be failed","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.OutboundPayment.TestHelpers.fail(\n \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n)\n'''Response {\n \"id\": \"obp_1LSdi72eZvKYlo2C9qeS9ZNt\",\n \"object\": \"treasury.outbound_payment\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": \"OutboundPayment to a 3rd party\",\n \"destination_payment_method\": null,\n \"destination_payment_method_details\": {\n \"type\": \"us_bank_account\",\n \"destination\": \"ba_1LSdi12eZvKYlo2CVq3qRggm\"\n },\n \"end_user_details\": {\n \"ip_address\": null,\n \"present\": false\n },\n \"expected_arrival_date\": 1659657600,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A\",\n \"livemode\": false,\n \"metadata\": {},\n \"returned_details\": null,\n \"statement_descriptor\": \"payment\",\n \"status\": \"failed\",\n \"status_transitions\": {\n \"failed_at\": 1659518271,\n \"posted_at\": null,\n \"returned_at\": null,\n \"canceled_at\": null\n },\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"InboundTransfersUse InboundTransfers to add funds to your FinancialAccount via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/inbound_transfers\u00a0\u00a0POST\u00a0\/v1\/treasury\/inbound_transfers\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/inbound_transfers\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/inbound_transfers\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/inbound_transfers\/:id\/fail\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/inbound_transfers\/:id\/return\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/inbound_transfers\/:id\/succeed\n'''"},{"nl":"The InboundTransfer objectAttributes id string Unique identifier for the object. object string, value is \"treasury.inbound_transfer\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. cancelable boolean Returns true if the InboundTransfer is able to be canceled. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. 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. failure_details hash Details about this InboundTransfer\u2019s failure. Only set when status is failed.Show child attributes financial_account string The FinancialAccount that received the funds. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. linked_flows hash Other flows linked to a InboundTransfer.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. origin_payment_method string The origin payment method to be debited for an InboundTransfer. origin_payment_method_details hash Details about the PaymentMethod for an InboundTransfer.Show child attributes returned boolean Returns true if the funds for an InboundTransfer were returned after the InboundTransfer went to the succeeded state. statement_descriptor string Statement descriptor shown when funds are debited from the source. Not all payment networks support statement_descriptor. status enum Status of the InboundTransfer: processing, succeeded, failed, and canceled. An InboundTransfer is processing if it is created and pending. The status changes to succeeded once the funds have been \u201cconfirmed\u201d and a transaction is created and posted. The status changes to failed if the transfer fails.Possible enum valuesprocessing succeeded failed canceled status_transitions hash Hash containing timestamps of when the object transitioned to a particular status.Show child attributes transaction string expandable The Transaction associated with this object","code":"'''The InboundTransfer object {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbzM0ep4jk6NpM68_p9jIuRS7LURzy58hzMDKXiGggTX80CYXkE-0ZQmnLX5lVap43-6D0B7G3t6PGwmOi1lA\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"succeeded_at\": null\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}\n'''"},{"nl":"Create an InboundTransferCreates an InboundTransfer.Parameters amount required Amount (in cents) to be transferred. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. financial_account required The FinancialAccount to send funds to. origin_payment_method required The origin payment method to be debited for the InboundTransfer. 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. statement_descriptor optional The complete description that appears on your customers\u2019 statements. Maximum 10 characters.ReturnsReturns an InboundTransfer object if there were no issues with InboundTransfer creation. The status of the created InboundTransfer object is initially marked as processing","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.create(\n financial_account=\"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n amount=10000,\n currency=\"usd\",\n origin_payment_method=\"pm_1KMDdkGPnV27VyGeAgGz8bsi\",\n description=\"InboundTransfer from my bank account\",\n)\n'''Response {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1KMDdkGPnV27VyGeAgGz8bsi\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"succeeded_at\": null\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}'''"},{"nl":"Cancel an InboundTransferCancels an InboundTransfer.ParametersNo parameters.ReturnsReturns the InboundTransfer object if the cancellation succeeded. Returns an error if the InboundTransfer has already been canceled or cannot be canceled","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.cancel(\n \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n)\n'''Response {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": false,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"canceled\",\n \"status_transitions\": {\n \"posted_at\": null,\n \"failed_at\": null,\n \"canceled_at\": 1659519519,\n \"returned_at\": null\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}'''"},{"nl":"Retrieve an InboundTransferRetrieves the details of an existing InboundTransfer.ParametersNo parameters.ReturnsReturns an InboundTransfer object if a valid identifier was provided. Otherwise, returns an error","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.retrieve(\n \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n)\n'''Response {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"succeeded_at\": null\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}'''"},{"nl":"List all InboundTransfersReturns a list of InboundTransfers sent from the specified FinancialAccount.Parameters financial_account required Returns objects associated with this FinancialAccount. status optional enum Only return InboundTransfers that have the given status: processing, succeeded, failed or canceled.Possible enum valuesprocessing succeeded failed canceled 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 InboundTransfers, starting after InboundTransfer starting_after. Each entry in the array is a separate InboundTransfer object. If no more InboundTransfers are available, the resulting array is empty","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.list(\n financial_account=\"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/inbound_transfers\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"succeeded_at\": null\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Test mode: Fail an InboundTransferTransitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.Parameters failure_details optional dictionary Details about a failed InboundTransfer.Show child parametersReturnsReturns the InboundTransfer object in the returned state. Returns an error if the InboundTransfer has already failed or cannot be failed","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.TestHelpers.fail(\n \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n failure_details={\"code\": \"insufficient_funds\"},\n)\n'''Response {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": {\n \"code\": \"insufficient_funds\"\n },\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"failed\",\n \"status_transitions\": {\n \"failed_at\": 1659519519,\n \"succeeded_at\": null\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}'''"},{"nl":"Test mode: Return an InboundTransferMarks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.ParametersNo parameters.ReturnsReturns the InboundTransfer object with returned set to true. Returns an error if the InboundTransfer has already been returned or cannot be returned","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.TestHelpers.return(\n \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n)\n'''Response {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": \"rd_1LSe2F2eZvKYlo2Co2KflmTB\"\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": true,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"succeeded\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"succeeded_at\": 1659519519\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}'''"},{"nl":"Test mode: Succeed an InboundTransferTransitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.ParametersNo parameters.ReturnsReturns the InboundTransfer object in the succeeded state. Returns an error if the InboundTransfer has already succeeded or cannot be succeeded","code":"import stripe\nstripe.api_key = \"sk_test_4eC39HqLyjWDarjtT1zdp7dc\"\n\nstripe.treasury.InboundTransfer.TestHelpers.succeed(\n \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n)\n'''Response {\n \"id\": \"ibt_1LSe2F2eZvKYlo2CipojuKFw\",\n \"object\": \"treasury.inbound_transfer\",\n \"amount\": 10000,\n \"cancelable\": true,\n \"created\": 1659519519,\n \"currency\": \"usd\",\n \"description\": \"InboundTransfer from my external bank account\",\n \"failure_details\": null,\n \"financial_account\": \"fa_1LSe2F2eZvKYlo2C7GbabeHc\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g\",\n \"linked_flows\": {\n \"received_debit\": null\n },\n \"livemode\": false,\n \"metadata\": {},\n \"origin_payment_method\": \"pm_1LSe2F2eZvKYlo2CEsB36N9Z\",\n \"origin_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line1\": \"1234 Fake Street\",\n \"line2\": null,\n \"postal_code\": \"94102\",\n \"state\": \"CA\"\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"account_holder_type\": \"company\",\n \"account_type\": \"checking\",\n \"bank_name\": \"STRIPE TEST BANK\",\n \"fingerprint\": \"1JWtPxqbdX5Gamtc\",\n \"last4\": \"6789\",\n \"network\": \"ach\",\n \"routing_number\": \"110000000\"\n }\n },\n \"returned\": false,\n \"statement_descriptor\": \"transfer\",\n \"status\": \"succeeded\",\n \"status_transitions\": {\n \"failed_at\": null,\n \"succeeded_at\": 1659519519\n },\n \"transaction\": \"trxn_1LSe2F2eZvKYlo2CJLeUtWAK\"\n}'''"},{"nl":"ReceivedCreditsReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/received_credits\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/received_credits\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/received_credits\n'''"},{"nl":"The ReceivedCredit objectAttributes id string Unique identifier for the object. object string, value is \"treasury.received_credit\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. 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. failure_code enum Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.Possible enum valuesaccount_closed Funds can\u2019t be sent to a closed FinancialAccount.account_frozen Funds can\u2019t be sent to a frozen FinancialAccount.other Funds can\u2019t be sent to FinancialAccount for other reasons. financial_account string The FinancialAccount that received the funds. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. initiating_payment_method_details hash Details about the PaymentMethod used to send a ReceivedCredit.Show child attributes linked_flows hash Other flows linked to a ReceivedCredit.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. network enum The rails used to send the funds.Possible enum valuesach card stripe us_domestic_wire reversal_details hash Details describing when a ReceivedCredit may be reversed.Show child attributes status enum Status of the ReceivedCredit. ReceivedCredits are created either succeeded (approved) or failed (declined). If a ReceivedCredit is declined, the failure reason can be found in the failure_code field.Possible enum valuessucceeded The ReceivedCredit was approved.failed The ReceivedCredit was declined, and no Transaction was created. transaction string expandable The Transaction associated with this object","code":"'''The ReceivedCredit object {\n \"id\": \"rc_1LSdi72eZvKYlo2CX3M5Bpl3\",\n \"object\": \"treasury.received_credit\",\n \"amount\": 1234,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgb1mHFieUQ6NpMBSliWlUzu3NAo-x_OOJVfT6YwtZSA-s6HlK-G-39UTTUEIpml4aMWxHL6oej3l7MwHuH1aQ\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"credit_reversal\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null,\n \"source_flow\": null,\n \"source_flow_type\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}\n'''"},{"nl":"Retrieve a ReceivedCreditRetrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.ParametersNo parameters.ReturnsReturns a ReceivedCredit object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.ReceivedCredit.retrieve(\n \"rc_1LSdi72eZvKYlo2CX3M5Bpl3\",\n)\n'''Response {\n \"id\": \"rc_1LSdi72eZvKYlo2CX3M5Bpl3\",\n \"object\": \"treasury.received_credit\",\n \"amount\": 1234,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYwhGXwARM6NpPX_oYm0NdRfmg4HF7gER7Hua24GXefNx5zWfk8CkG0CKVp64QeoSTZ8fN_tV6X1ggNfIQxRw\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"credit_reversal\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null,\n \"source_flow\": null,\n \"source_flow_type\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"List all ReceivedCreditsReturns a list of ReceivedCredits.Parameters financial_account required The FinancialAccount that received the funds. linked_flows optional dictionary Only return ReceivedCredits described by the flow.Show child parameters status optional enum Only return ReceivedCredits that have the given status: succeeded or failed.Possible enum valuessucceeded The ReceivedCredit was approved.failed The ReceivedCredit was declined, and no Transaction was created.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 ReceivedCredits, starting after ReceivedCredit starting_after. Each entry in the array is a separate ReceivedCredit object. If no more ReceivedCredits are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.ReceivedCredit.list(\n financial_account=\"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/received_credits\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"rc_1LSdi72eZvKYlo2CX3M5Bpl3\",\n \"object\": \"treasury.received_credit\",\n \"amount\": 1234,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYwhGXwARM6NpPX_oYm0NdRfmg4HF7gER7Hua24GXefNx5zWfk8CkG0CKVp64QeoSTZ8fN_tV6X1ggNfIQxRw\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"credit_reversal\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null,\n \"source_flow\": null,\n \"source_flow_type\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Test mode: Create a ReceivedCreditUse this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can\u2019t directly create ReceivedCredits initiated by third parties.Parameters amount required Amount (in cents) to be transferred. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. financial_account required The FinancialAccount to send funds to. network required The rails used for the object.Possible enum valuesach us_domestic_wire description optional An arbitrary string attached to the object. Often useful for displaying to users. initiating_payment_method_details optional dictionary Initiating payment method details for the object.Show child parametersReturnsA test mode ReceivedCredit object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.ReceivedCredit.TestHelpers.create(\n amount=1000,\n currency=\"usd\",\n financial_account=\"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n network=\"ach\",\n)\n'''Response {\n \"id\": \"rc_1LSdi72eZvKYlo2CX3M5Bpl3\",\n \"object\": \"treasury.received_credit\",\n \"amount\": 1000,\n \"created\": 1659518271,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdi72eZvKYlo2CAwKTB33F\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYwhGXwARM6NpPX_oYm0NdRfmg4HF7gER7Hua24GXefNx5zWfk8CkG0CKVp64QeoSTZ8fN_tV6X1ggNfIQxRw\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"credit_reversal\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null,\n \"source_flow\": null,\n \"source_flow_type\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdi72eZvKYlo2CQiyepd8w\"\n}'''"},{"nl":"ReceivedDebitsReceivedDebits represent funds pulled from a FinancialAccount. These are not initiated from the FinancialAccount","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/received_debits\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/received_debits\u00a0\u00a0POST\u00a0\/v1\/test_helpers\/treasury\/received_debits\n'''"},{"nl":"The ReceivedDebit objectAttributes id string Unique identifier for the object. object string, value is \"treasury.received_debit\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. 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. failure_code enum Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn\u2019t have sufficient funds, is closed, or is frozen.Possible enum valuesaccount_closed Funds can\u2019t be pulled from a closed FinancialAccount.account_frozen Funds can\u2019t be pulled from a frozen FinancialAccount.insufficient_funds The FinancialAccount doesn\u2019t have a sufficient balance.other Funds can\u2019t be pulled from the FinancialAccount for other reasons. financial_account string The FinancialAccount that funds were pulled from. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. initiating_payment_method_details hash Details about how a ReceivedDebit was created.Show child attributes linked_flows hash Other flows linked to a ReceivedDebit.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. network enum The network used for the ReceivedDebit.Possible enum valuesach card stripe reversal_details hash Details describing when a ReceivedDebit might be reversed.Show child attributes status enum Status of the ReceivedDebit. ReceivedDebits are created with a status of either succeeded (approved) or failed (declined). The failure reason can be found under the failure_code.Possible enum valuessucceeded The ReceivedDebit was approved.failed The ReceivedDebit was declined, and no Transaction was created. transaction string expandable The Transaction associated with this object","code":"'''The ReceivedDebit object {\n \"id\": \"rd_1LSdrp2eZvKYlo2CAfX8P6F5\",\n \"object\": \"treasury.received_debit\",\n \"amount\": 54321,\n \"created\": 1659518873,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYFTnTgAxg6NpPjdc9B8NawI7Du99aZ0x45UKMXLhp50gN23Z0p3lkPc_ZM6dFvd0egWFAW28Nav9I5CsdfAg\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"debit_reversal\": null,\n \"inbound_transfer\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}\n'''"},{"nl":"Retrieve a ReceivedDebitRetrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit listParametersNo parameters.ReturnsReturns a ReceivedDebit object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.ReceivedDebit.retrieve(\n \"rd_1LSdrp2eZvKYlo2CAfX8P6F5\",\n)\n'''Response {\n \"id\": \"rd_1LSdrp2eZvKYlo2CAfX8P6F5\",\n \"object\": \"treasury.received_debit\",\n \"amount\": 54321,\n \"created\": 1659518873,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgZe7u3Vdm86NpNdI31c4uzzYctFwmmhFEp2rNxE0bGKLi1E94PI7N1ZcRqXe_E8lSVa_eemN2Zv_GwsPhK1eg\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"debit_reversal\": null,\n \"inbound_transfer\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}'''"},{"nl":"List all ReceivedDebitsReturns a list of ReceivedDebits.Parameters financial_account required The FinancialAccount that funds were pulled from. status optional enum Only return ReceivedDebits that have the given status: succeeded or failed.Possible enum valuessucceeded The ReceivedDebit was approved.failed The ReceivedDebit was declined, and no Transaction was created.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 ReceivedDebits, starting after ReceivedDebit starting_after. Each entry in the array is a separate ReceivedDebit object. If no more ReceivedDebits are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.ReceivedDebit.list(\n financial_account=\"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/received_debits\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"rd_1LSdrp2eZvKYlo2CAfX8P6F5\",\n \"object\": \"treasury.received_debit\",\n \"amount\": 54321,\n \"created\": 1659518873,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgZe7u3Vdm86NpNdI31c4uzzYctFwmmhFEp2rNxE0bGKLi1E94PI7N1ZcRqXe_E8lSVa_eemN2Zv_GwsPhK1eg\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"debit_reversal\": null,\n \"inbound_transfer\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Test mode: Create a ReceivedDebitUse this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can\u2019t directly create ReceivedDebits initiated by third parties.Parameters amount required Amount (in cents) to be transferred. currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. financial_account required The FinancialAccount to pull funds from. network required The rails used for the object.Possible enum valuesach description optional An arbitrary string attached to the object. Often useful for displaying to users. initiating_payment_method_details optional dictionary Initiating payment method details for the object.Show child parametersReturnsA test mode ReceivedDebit object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.ReceivedDebit.TestHelpers.create(\n amount=1000,\n currency=\"usd\",\n financial_account=\"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n network=\"ach\",\n)\n'''Response {\n \"id\": \"rd_1LSdrp2eZvKYlo2CAfX8P6F5\",\n \"object\": \"treasury.received_debit\",\n \"amount\": 1000,\n \"created\": 1659518873,\n \"currency\": \"usd\",\n \"description\": \"Stripe Test\",\n \"failure_code\": null,\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgZe7u3Vdm86NpNdI31c4uzzYctFwmmhFEp2rNxE0bGKLi1E94PI7N1ZcRqXe_E8lSVa_eemN2Zv_GwsPhK1eg\",\n \"initiating_payment_method_details\": {\n \"billing_details\": {\n \"address\": {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n },\n \"email\": null,\n \"name\": \"Jane Austen\"\n },\n \"type\": \"us_bank_account\",\n \"us_bank_account\": {\n \"bank_name\": \"STRIPE TEST BANK\",\n \"last4\": \"6789\",\n \"routing_number\": \"110000000\"\n }\n },\n \"linked_flows\": {\n \"debit_reversal\": null,\n \"inbound_transfer\": null,\n \"issuing_authorization\": null,\n \"issuing_transaction\": null\n },\n \"livemode\": false,\n \"network\": \"ach\",\n \"reversal_details\": {\n \"deadline\": 1659657600,\n \"restricted_reason\": null\n },\n \"status\": \"succeeded\",\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}'''"},{"nl":"CreditReversalsYou can reverse some ReceivedCredits depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/credit_reversals\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/credit_reversals\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/credit_reversals\n'''"},{"nl":"The CreditReversal objectAttributes id string Unique identifier for the object. object string, value is \"treasury.credit_reversal\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. financial_account string The FinancialAccount to reverse funds from. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. network enum The rails used to reverse the funds.Possible enum valuesach stripe received_credit string The ReceivedCredit being reversed. status enum Status of the CreditReversalPossible enum valuesprocessing The CreditReversal starting state. Funds are \u201cheld\u201d by a pending Transaction (but they are still part of the current balance).posted The CreditReversal has been sent to the network and funds have left the account (with the Transaction posting)canceled The CreditReversal has been canceled before it has been sent to the network and no funds have left the account. (Currently not supported). status_transitions hash Hash containing timestamps of when the object transitioned to a particular status.Show child attributes transaction string expandable The Transaction associated with this object","code":"'''The CreditReversal object {\n \"id\": \"credrev_1LSdrp2eZvKYlo2CSJ0201zO\",\n \"object\": \"treasury.credit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgbx2ZP1ZBE6NpPtUveUtOlCrt6dfjze6lgPYAoWm1XcL_9e6ZCPADUu2kHwwiqBXCZ-gQj61Zwt9-zkOvT6Lg\",\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_credit\": \"rc_1LSdrp2eZvKYlo2C0tawQb1y\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"posted_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}\n'''"},{"nl":"Create a CreditReversalReverses a ReceivedCredit and creates a CreditReversal object.Parameters received_credit required The ReceivedCredit to reverse. 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 a CreditReversal object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.CreditReversal.create(\n received_credit=\"rc_1LSdrp2eZvKYlo2C0tawQb1y\",\n)\n'''Response {\n \"id\": \"credrev_1LSdrp2eZvKYlo2CSJ0201zO\",\n \"object\": \"treasury.credit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYHS9NYj7Q6NpPuY0UuEPSTQxO3DPFGtDNDQjVNpIbZoX5kIkvqyeeJ5sfFJLxascVMn_jUgKJEg_H4rEb70g\",\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_credit\": \"rc_1LSdrp2eZvKYlo2C0tawQb1y\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"posted_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}'''"},{"nl":"Retrieve a CreditReversalRetrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal listParametersNo parameters.ReturnsReturns a CreditReversal object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.CreditReversal.retrieve(\n \"credrev_1LSdrp2eZvKYlo2CSJ0201zO\",\n)\n'''Response {\n \"id\": \"credrev_1LSdrp2eZvKYlo2CSJ0201zO\",\n \"object\": \"treasury.credit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYHS9NYj7Q6NpPuY0UuEPSTQxO3DPFGtDNDQjVNpIbZoX5kIkvqyeeJ5sfFJLxascVMn_jUgKJEg_H4rEb70g\",\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_credit\": \"rc_1LSdrp2eZvKYlo2C0tawQb1y\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"posted_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}'''"},{"nl":"List all CreditReversalsReturns a list of CreditReversals.Parameters financial_account required Returns objects associated with this FinancialAccount. received_credit optional Only return CreditReversals for the ReceivedCredit ID. status optional enum Only return CreditReversals for a given status.Possible enum valuesprocessing The CreditReversal starting state. Funds are \u201cheld\u201d by a pending Transaction (but they are still part of the current balance).posted The CreditReversal has been sent to the network and funds have left the account (with the Transaction posting)canceled The CreditReversal has been canceled before it has been sent to the network and no funds have left the account. (Currently not supported).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 CreditReversals, starting after CreditReversal starting_after. Each entry in the array is a separate CreditReversal object. If no more CreditReversal are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.CreditReversal.list(\n financial_account=\"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/credit_reversals\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"credrev_1LSdrp2eZvKYlo2CSJ0201zO\",\n \"object\": \"treasury.credit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYHS9NYj7Q6NpPuY0UuEPSTQxO3DPFGtDNDQjVNpIbZoX5kIkvqyeeJ5sfFJLxascVMn_jUgKJEg_H4rEb70g\",\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_credit\": \"rc_1LSdrp2eZvKYlo2C0tawQb1y\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"posted_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"DebitReversalsYou can reverse some ReceivedDebits depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/treasury\/debit_reversals\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/debit_reversals\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/treasury\/debit_reversals\n'''"},{"nl":"The DebitReversal objectAttributes id string Unique identifier for the object. object string, value is \"treasury.debit_reversal\" String representing the object\u2019s type. Objects of the same type share the same value. amount integer Amount (in cents) transferred. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. financial_account string The FinancialAccount to reverse funds from. hosted_regulatory_receipt_url string A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe\u2019s money transmission licenses. linked_flows hash Other flows linked to a DebitReversal.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. network enum The rails used to reverse the funds.Possible enum valuesach card received_debit string The ReceivedDebit being reversed. status enum Status of the DebitReversalPossible enum valuesprocessing The DebitReversal starting state.succeeded The network has resolved the DebitReversal in the users favour. A crediting Transaction is created.failed The network has resolved the DebitReversal against the user. status_transitions hash Hash containing timestamps of when the object transitioned to a particular status.Show child attributes transaction string expandable The Transaction associated with this object","code":"'''The DebitReversal object {\n \"id\": \"debrev_1LSdrp2eZvKYlo2CNrjqDeij\",\n \"object\": \"treasury.debit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgbpdRHelzw6NpMxbecKleY1ygMxayiZhUsY9yAfcelVM8CmALzpkEQNxEWcAD5IMf5K6kn9ZZ5bez1nYUKAfw\",\n \"linked_flows\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_debit\": \"rd_1LSdrp2eZvKYlo2CsgwhiPIX\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"completed_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}\n'''"},{"nl":"Create a DebitReversalReverses a ReceivedDebit and creates a DebitReversal object.Parameters received_debit required The ReceivedDebit to reverse. 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 a DebitReversal object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.DebitReversal.create(\n received_debit=\"rd_1LSdrp2eZvKYlo2CsgwhiPIX\",\n)\n'''Response {\n \"id\": \"debrev_1LSdrp2eZvKYlo2CNrjqDeij\",\n \"object\": \"treasury.debit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYOBKehoKU6NpNo8ikrdX5QwuBSMAeRH_1Px31_1fLNkBZWyJ5dI3IrYAiez5qNV2o1A5FYIIITYSTdHuik-w\",\n \"linked_flows\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_debit\": \"rd_1LSdrp2eZvKYlo2CsgwhiPIX\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"completed_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}'''"},{"nl":"Retrieve a DebitReversalRetrieves a DebitReversal object.ParametersNo parameters.ReturnsReturns a DebitReversal object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.DebitReversal.retrieve(\n \"debrev_1LSdrp2eZvKYlo2CNrjqDeij\",\n)\n'''Response {\n \"id\": \"debrev_1LSdrp2eZvKYlo2CNrjqDeij\",\n \"object\": \"treasury.debit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYOBKehoKU6NpNo8ikrdX5QwuBSMAeRH_1Px31_1fLNkBZWyJ5dI3IrYAiez5qNV2o1A5FYIIITYSTdHuik-w\",\n \"linked_flows\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_debit\": \"rd_1LSdrp2eZvKYlo2CsgwhiPIX\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"completed_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n}'''"},{"nl":"List all DebitReversalsReturns a list of DebitReversals.Parameters financial_account required Returns objects associated with this FinancialAccount. received_debit optional Only return DebitReversals for the ReceivedDebit ID. resolution optional enum Only return DebitReversals for a given resolution.Possible enum valueswon DebitReversal was won, and a crediting Transaction will be created.lost DebitReversal was lost, and no Transactions will be created. status optional enum Only return DebitReversals for a given status.Possible enum valuesprocessing The DebitReversal starting state.completed The network has provided a resolution for the DebitReversal. If won, a crediting Transaction is created.canceled The DebitReversal has been canceled before it has been sent to the network and no funds have been returned to the account. (Currently not supported).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 DebitReversals, starting after DebitReversal starting_after. Each entry in the array is a separate DebitReversal object. If no more DebitReversals are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.treasury.DebitReversal.list(\n financial_account=\"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n limit=3,\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/treasury\/debit_reversals\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"debrev_1LSdrp2eZvKYlo2CNrjqDeij\",\n \"object\": \"treasury.debit_reversal\",\n \"amount\": 1000,\n \"currency\": \"usd\",\n \"financial_account\": \"fa_1LSdro2eZvKYlo2CWVkCW1Pl\",\n \"hosted_regulatory_receipt_url\": \"https:\/\/payments.stripe.com\/regulatory-receipt\/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYOBKehoKU6NpNo8ikrdX5QwuBSMAeRH_1Px31_1fLNkBZWyJ5dI3IrYAiez5qNV2o1A5FYIIITYSTdHuik-w\",\n \"linked_flows\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"network\": \"ach\",\n \"received_debit\": \"rd_1LSdrp2eZvKYlo2CsgwhiPIX\",\n \"status\": \"processing\",\n \"status_transitions\": {\n \"completed_at\": null\n },\n \"transaction\": \"trxn_1LSdro2eZvKYlo2Cdo11cZOl\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"OrdersAn Order describes a purchase being made by a customer, including the\nproducts & quantities being purchased, the order status, the payment information,\nand the billing\/shipping details.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/orders\u00a0\u00a0\u00a0GET\u00a0\/v1\/orders\/:id\u00a0\u00a0POST\u00a0\/v1\/orders\/:id\u00a0\u00a0POST\u00a0\/v1\/orders\/:id\/submit\u00a0\u00a0POST\u00a0\/v1\/orders\/:id\/reopen\u00a0\u00a0POST\u00a0\/v1\/orders\/:id\/cancel\u00a0\u00a0\u00a0GET\u00a0\/v1\/orders\u00a0\u00a0POST\u00a0\/v1\/orders\/:id\/line_items\n'''"},{"nl":"The order objectAttributes id string Unique identifier for the object. amount_total integer Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge \u00a5100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or equivalent in charge currency. client_secret string The client secret of this Order. Used for client-side retrieval using a publishable key. \nThe client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. \nRefer to our docs for creating and processing an order to learn about how client_secret should be handled. currency currency Three-letter ISO currency code, in lowercase. Must be a supported currency. customer string expandable The customer which this orders belongs to. description string An arbitrary string attached to the object. Often useful for displaying to users. line_items list expandable A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. This field is not included by default. To include it in the response, expand the line_items field.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. payment hash Payment information associated with the order. Includes payment status, settings, and a PaymentIntent ID.Show child attributes status enum The overall status of the order.Possible enum valuesopen The initial state of the order upon creation. Products can be added to the order and payment has not yet been initiated.submitted Once the order is submitted, it stays in submitted until payment is processsing. The order\u2019s products cannot be updated at this stage.processing Once the order is processing, it stays in this state until payment is complete. The order\u2019s products cannot be updated at this stage.complete Once payment on an order is complete, the order itself is also complete.canceled The order has been canceled.More attributesExpand all object string, value is \"order\" amount_subtotal integer application string expandable \"application\" Connect only automatic_tax hash billing_details hash created timestamp discounts array containing strings expandable ip_address string livemode boolean shipping_cost hash shipping_details hash tax_details hash total_details hash","code":"'''The order object {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 0,\n \"amount_total\": 0,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": null,\n \"created\": 1659519115,\n \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"payment\": {\n \"payment_intent\": null,\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": false\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n },\n \"status\": null\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"open\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n }\n}\n'''"},{"nl":"Create an orderCreates a new open order object.Parameters currency required Three-letter ISO currency code, in lowercase. Must be a supported currency. line_items required A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.Show child parameters customer optional The customer associated with this order. 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. payment optional dictionary Payment information associated with the order, including payment settings.Show child parametersMore parametersExpand all automatic_tax optional dictionary billing_details optional dictionary discounts optional array of hashes ip_address optional shipping_cost optional dictionary shipping_details optional dictionary tax_details optional dictionary ReturnsReturns an open order object if the call succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\n\nstripe.Order.create(\n currency=\"bdt\",\n line_items=[\n {\n \"product\": \"4-4-L-new\",\n \"quantity\": 10,\n },\n ],\n expand=[\"line_items\"],\n)\n'''Response {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 14990,\n \"amount_total\": 14990,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"payment\": {\n \"payment_intent\": null,\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n },\n \"status\": null\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"open\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n }\n}'''"},{"nl":"Retrieve an orderRetrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.ParametersNo parameters.ReturnsReturns an order object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\n\nstripe.Order.retrieve(\n 'order_1LSdvj2eZvKYlo2Cj5Xm8Raw',\n)\n'''Response {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 14990,\n \"amount_total\": 14990,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"payment\": {\n \"payment_intent\": null,\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n },\n \"status\": null\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"open\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n }\n}'''"},{"nl":"Update an orderUpdates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.Parameters currency optional Three-letter ISO currency code, in lowercase. Must be a supported currency. customer optional The customer associated with this order. description optional An arbitrary string attached to the object. Often useful for displaying to users. line_items optional array of hashes A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.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. payment optional dictionary Payment information associated with the order, including payment settings.Show child parametersMore parametersExpand all automatic_tax optional dictionary billing_details optional dictionary discounts optional array of hashes ip_address optional shipping_cost optional dictionary shipping_details optional dictionary tax_details optional dictionary ReturnsReturns the order object if the update succeeded","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\n\nstripe.Order.modify(\n \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n metadata={\"reference_number\": \"183782710\"},\n)\n'''Response {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 14990,\n \"amount_total\": 14990,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {\n \"reference_number\": \"183782710\"\n },\n \"payment\": {\n \"payment_intent\": null,\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n },\n \"status\": null\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"open\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n }\n}'''"},{"nl":"Submit an orderSubmitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.Parameters expected_total required expected_total should always be set to the order\u2019s amount_total field. If they don\u2019t match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order.ReturnsReturns the order object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\nstripe.stripe_object.StripeObject().request('post', '\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/submit', {\n \"expected_total\": 2998\n})\n'''Response {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 2998,\n \"amount_total\": 2998,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {\n \"reference_number\": \"183782710\"\n },\n \"payment\": {\n \"status\": \"requires_payment_method\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n }\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"processing\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n },\n \"tax_details\": {\n \"tax_exempt\": \"none\",\n \"tax_ids\": []\n }\n}'''"},{"nl":"Reopen an orderReopens a submitted order.ParametersNo parameters.ReturnsReturns the open order object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\nstripe.stripe_object.StripeObject().request('post', '\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/reopen', {\n})\n'''Response {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 14990,\n \"amount_total\": 14990,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {\n \"reference_number\": \"183782710\"\n },\n \"payment\": {\n \"status\": null,\n \"payment_intent\": null,\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n }\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"open\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n }\n}'''"},{"nl":"Cancel an orderCancels the order as well as the payment intent if one is attached.ParametersNo parameters.ReturnsReturns the canceled order object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\nstripe.stripe_object.StripeObject().request('post', '\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/cancel', {\n})\n'''Response {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 14990,\n \"amount_total\": 14990,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {\n \"reference_number\": \"183782710\"\n },\n \"payment\": {\n \"status\": \"canceled\",\n \"payment_intent\": \"pi_1DrPsv2eZvKYlo2CEDzqXfPH\",\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n }\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"canceled\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n }\n}'''"},{"nl":"List all ordersReturns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.Parameters customer optional Only return orders for the given customer.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 orders, starting after order starting_after. Each entry in the array is a separate order object. If no more orders are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\n\nstripe.Order.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/orders\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw\",\n \"object\": \"order\",\n \"amount_subtotal\": 14990,\n \"amount_total\": 14990,\n \"application\": null,\n \"automatic_tax\": {\n \"enabled\": false,\n \"status\": null\n },\n \"billing_details\": null,\n \"client_secret\": \"order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg\",\n \"created\": 1659519115,\n \"currency\": \"bdt\",\n \"customer\": null,\n \"description\": null,\n \"discounts\": [],\n \"ip_address\": null,\n \"livemode\": false,\n \"metadata\": {\n \"reference_number\": \"183782710\"\n },\n \"payment\": {\n \"payment_intent\": null,\n \"settings\": {\n \"application_fee_amount\": null,\n \"automatic_payment_methods\": {\n \"enabled\": true\n },\n \"payment_method_options\": null,\n \"payment_method_types\": [\n \"card\"\n ],\n \"return_url\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\": null,\n \"transfer_data\": null\n },\n \"status\": null\n },\n \"shipping_cost\": null,\n \"shipping_details\": null,\n \"status\": \"open\",\n \"total_details\": {\n \"amount_discount\": 0,\n \"amount_shipping\": 0,\n \"amount_tax\": 0\n },\n \"line_items\": {\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 14990,\n \"amount_tax\": 0,\n \"amount_total\": 14990,\n \"currency\": \"bdt\",\n \"description\": \"UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"bdt\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"4-4-L-new\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 1499,\n \"unit_amount_decimal\": \"1499\"\n },\n \"quantity\": 10\n }\n ],\n \"has_more\": false,\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\"\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve an order's line itemsWhen retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit order line items, starting after Line Item starting_after. Each entry in the array is a separate Line Item object. If no more line items are available, the resulting array will be empty.","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\nstripe.api_version = \"2019-02-19; orders_beta=v4\"\nstripe.stripe_object.StripeObject().request('get', '\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items', {\n \"limit\": 3\n})\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/orders\/order_1LSdvj2eZvKYlo2Cj5Xm8Raw\/line_items\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"li_1LSdvh2eZvKYlo2Cq9UwPz2D\",\n \"object\": \"item\",\n \"amount_discount\": 0,\n \"amount_subtotal\": 0,\n \"amount_tax\": 0,\n \"amount_total\": 0,\n \"currency\": \"usd\",\n \"description\": \"auto topup addtional_viewer\",\n \"price\": {\n \"id\": \"price_1LScCX2eZvKYlo2C1Z9zPyXF\",\n \"object\": \"price\",\n \"active\": true,\n \"billing_scheme\": \"per_unit\",\n \"created\": 1659512469,\n \"currency\": \"usd\",\n \"custom_unit_amount\": null,\n \"livemode\": false,\n \"lookup_key\": null,\n \"metadata\": {},\n \"nickname\": null,\n \"product\": \"prod_MAy8UvSA0uRRju\",\n \"recurring\": null,\n \"tax_behavior\": \"unspecified\",\n \"tiers_mode\": null,\n \"transform_quantity\": null,\n \"type\": \"one_time\",\n \"unit_amount\": 300,\n \"unit_amount_decimal\": \"300\"\n },\n \"quantity\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Scheduled QueriesIf you have scheduled a Sigma query, you'll\nreceive a sigma.scheduled_query_run.created webhook each time the query\nruns. The webhook contains a ScheduledQueryRun object, which you can use to\nretrieve the query results","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/sigma\/scheduled_query_runs\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/sigma\/scheduled_query_runs\n'''"},{"nl":"The scheduled query run objectAttributes id string Unique identifier for the object. data_load_time timestamp When the query was run, Sigma contained a snapshot of your Stripe data at this time. file hash The file object representing the results of the query.Show child attributes sql string SQL for the query. status string The query\u2019s execution status, which will be completed for successful runs, and canceled, failed, or timed_out otherwise. title string Title of the query.More attributesExpand all object string, value is \"scheduled_query_run\" created timestamp error hash livemode boolean result_available_until timestamp","code":"'''The scheduled query run object {\n \"id\": \"sqr_1LSdvj2eZvKYlo2CEjKaLGzN\",\n \"object\": \"scheduled_query_run\",\n \"created\": 1659519115,\n \"data_load_time\": 1659312000,\n \"file\": {\n \"id\": \"file_1BE4yZ2eZvKYlo2C9MeXgqcB\",\n \"object\": \"file\",\n \"created\": 1508284799,\n \"expires_at\": null,\n \"filename\": \"path\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB\"\n },\n \"purpose\": \"sigma_scheduled_query\",\n \"size\": 500,\n \"title\": null,\n \"type\": \"csv\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1BE4yZ2eZvKYlo2C9MeXgqcB\/contents\"\n },\n \"livemode\": false,\n \"result_available_until\": 1691020800,\n \"sql\": \"SELECT count(*) from charges\",\n \"status\": \"completed\",\n \"title\": \"Count all charges\"\n}\n'''"},{"nl":"Retrieve a scheduled query runRetrieves the details of an scheduled query run.ParametersNo parameters.ReturnsReturns the scheduled query run object if a valid identifier was provided","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.sigma.ScheduledQueryRun.retrieve(\n \"sqr_1LSdvj2eZvKYlo2CEjKaLGzN\",\n)\n'''Response {\n \"id\": \"sqr_1LSdvj2eZvKYlo2CEjKaLGzN\",\n \"object\": \"scheduled_query_run\",\n \"created\": 1659519115,\n \"data_load_time\": 1659312000,\n \"file\": {\n \"id\": \"file_1BE4yZ2eZvKYlo2C9MeXgqcB\",\n \"object\": \"file\",\n \"created\": 1508284799,\n \"expires_at\": null,\n \"filename\": \"path\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB\"\n },\n \"purpose\": \"sigma_scheduled_query\",\n \"size\": 500,\n \"title\": null,\n \"type\": \"csv\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1BE4yZ2eZvKYlo2C9MeXgqcB\/contents\"\n },\n \"livemode\": false,\n \"result_available_until\": 1691020800,\n \"sql\": \"SELECT count(*) from charges\",\n \"status\": \"completed\",\n \"title\": \"Count all charges\"\n}'''"},{"nl":"List all scheduled query runsReturns a list of scheduled query runs.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA paginated list of all scheduled query runs","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.sigma.ScheduledQueryRun.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/sigma\/scheduled_query_runs\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"sqr_1LSdvj2eZvKYlo2CEjKaLGzN\",\n \"object\": \"scheduled_query_run\",\n \"created\": 1659519115,\n \"data_load_time\": 1659312000,\n \"file\": {\n \"id\": \"file_1BE4yZ2eZvKYlo2C9MeXgqcB\",\n \"object\": \"file\",\n \"created\": 1508284799,\n \"expires_at\": null,\n \"filename\": \"path\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB\"\n },\n \"purpose\": \"sigma_scheduled_query\",\n \"size\": 500,\n \"title\": null,\n \"type\": \"csv\",\n \"url\": \"https:\/\/files.stripe.com\/v1\/files\/file_1BE4yZ2eZvKYlo2C9MeXgqcB\/contents\"\n },\n \"livemode\": false,\n \"result_available_until\": 1691020800,\n \"sql\": \"SELECT count(*) from charges\",\n \"status\": \"completed\",\n \"title\": \"Count all charges\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Report RunsThe Report Run object represents an instance of a report type generated with\nspecific run parameters. Once the object is created, Stripe begins processing the report.\nWhen the report has finished running, it will give you a reference to a file\nwhere you can retrieve your results. For an overview, see\nAPI Access to Reports.Note that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a live-mode API key","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/reporting\/report_runs\u00a0\u00a0\u00a0GET\u00a0\/v1\/reporting\/report_runs\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/reporting\/report_runs\n'''"},{"nl":"The Report Run objectAttributes id string Unique identifier for the object. parameters hash Parameters of this report run.Show child attributes report_type string The ID of the report type to run, such as \"balance.summary.1\". result hash The file object representing the result of the report run (populated when\n status=succeeded).Show child attributes status string Status of this report run. This will be pending when the run is initially created.\n When the run finishes, this will be set to succeeded and the result field will be populated.\n Rarely, we may encounter an error, at which point this will be set to failed and the error field will be populated.More attributesExpand all object string, value is \"reporting.report_run\" created timestamp error string livemode boolean succeeded_at timestamp","code":"'''The Report Run object {\n \"id\": \"frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"object\": \"reporting.report_run\",\n \"created\": 1614940206,\n \"error\": null,\n \"livemode\": false,\n \"parameters\": {\n \"columns\": [\n \"created\",\n \"reporting_category\",\n \"net\"\n ],\n \"interval_end\": 1580544000,\n \"interval_start\": 1577865600,\n \"timezone\": \"America\/Los_Angeles\"\n },\n \"report_type\": \"balance_change_from_activity.itemized.3\",\n \"result\": {\n \"id\": \"file_1IRavH2eZvKYlo2CKvrocByo\",\n \"object\": \"file\",\n \"created\": 1614940219,\n \"expires_at\": 1646476219,\n \"filename\": \"frr_1IRav42eZvKYlo2COAZmOkXO.csv\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo\"\n },\n \"purpose\": \"finance_report_run\",\n \"size\": 15053859,\n \"title\": \"FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"type\": \"csv\",\n \"url\": null\n },\n \"status\": \"succeeded\",\n \"succeeded_at\": 1614940219\n}\n'''"},{"nl":"Create a Report RunCreates a new object and begin running the report. (Certain report types require a live-mode API key.)Parameters report_type required The ID of the report type to run, such as \"balance.summary.1\". parameters optional dictionary Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the API Access to Reports documentation.Show child parametersReturnsReturns the new ReportRun object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.reporting.ReportRun.create(\n report_type=\"balance.summary.1\",\n parameters={\n \"interval_start\": 1522540800,\n \"interval_end\": 1525132800,\n },\n)\n'''Response {\n \"id\": \"frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"object\": \"reporting.report_run\",\n \"created\": 1614940206,\n \"error\": null,\n \"livemode\": false,\n \"parameters\": {\n \"interval_start\": 1522540800,\n \"interval_end\": 1525132800\n },\n \"report_type\": \"balance.summary.1\",\n \"result\": {\n \"id\": \"file_1IRavH2eZvKYlo2CKvrocByo\",\n \"object\": \"file\",\n \"created\": 1614940219,\n \"expires_at\": 1646476219,\n \"filename\": \"frr_1IRav42eZvKYlo2COAZmOkXO.csv\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo\"\n },\n \"purpose\": \"finance_report_run\",\n \"size\": 15053859,\n \"title\": \"FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"type\": \"csv\",\n \"url\": null\n },\n \"status\": \"succeeded\",\n \"succeeded_at\": 1614940219\n}'''"},{"nl":"Retrieve a Report RunRetrieves the details of an existing Report Run.ParametersNo parameters.ReturnsReturns the specified ReportRun object if found, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.reporting.ReportRun.retrieve(\n \"frr_1IRav42eZvKYlo2COAZmOkXO\",\n)\n'''Response {\n \"id\": \"frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"object\": \"reporting.report_run\",\n \"created\": 1614940206,\n \"error\": null,\n \"livemode\": false,\n \"parameters\": {\n \"columns\": [\n \"created\",\n \"reporting_category\",\n \"net\"\n ],\n \"interval_end\": 1580544000,\n \"interval_start\": 1577865600,\n \"timezone\": \"America\/Los_Angeles\"\n },\n \"report_type\": \"balance_change_from_activity.itemized.3\",\n \"result\": {\n \"id\": \"file_1IRavH2eZvKYlo2CKvrocByo\",\n \"object\": \"file\",\n \"created\": 1614940219,\n \"expires_at\": 1646476219,\n \"filename\": \"frr_1IRav42eZvKYlo2COAZmOkXO.csv\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo\"\n },\n \"purpose\": \"finance_report_run\",\n \"size\": 15053859,\n \"title\": \"FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"type\": \"csv\",\n \"url\": null\n },\n \"status\": \"succeeded\",\n \"succeeded_at\": 1614940219\n}'''"},{"nl":"List all Report RunsReturns a list of Report Runs, with the most recent appearing first.Parameters created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: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 Report\nRuns, starting after the argument starting_after if it is provided. Each entry in the array is a separate\nReportRun object. If no more Report Runs are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.reporting.ReportRun.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/reporting\/report_runs\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"object\": \"reporting.report_run\",\n \"created\": 1614940206,\n \"error\": null,\n \"livemode\": false,\n \"parameters\": {\n \"columns\": [\n \"created\",\n \"reporting_category\",\n \"net\"\n ],\n \"interval_end\": 1580544000,\n \"interval_start\": 1577865600,\n \"timezone\": \"America\/Los_Angeles\"\n },\n \"report_type\": \"balance_change_from_activity.itemized.3\",\n \"result\": {\n \"id\": \"file_1IRavH2eZvKYlo2CKvrocByo\",\n \"object\": \"file\",\n \"created\": 1614940219,\n \"expires_at\": 1646476219,\n \"filename\": \"frr_1IRav42eZvKYlo2COAZmOkXO.csv\",\n \"links\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo\"\n },\n \"purpose\": \"finance_report_run\",\n \"size\": 15053859,\n \"title\": \"FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO\",\n \"type\": \"csv\",\n \"url\": null\n },\n \"status\": \"succeeded\",\n \"succeeded_at\": 1614940219\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Report TypesThe Report Type resource corresponds to a particular type of report, such as\nthe \"Activity summary\" or \"Itemized payouts\" reports. These objects are\nidentified by an ID belonging to a set of enumerated values. See\nAPI Access to Reports documentation\nfor those Report Type IDs, along with required and optional parameters.Note that certain report types can only be run based on your live-mode data (not test-mode\ndata), and will error when queried without a live-mode API key","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/reporting\/report_types\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/reporting\/report_types\n'''"},{"nl":"The Report Type objectAttributes id string The ID of the Report Type, such as balance.summary.1. data_available_end timestamp Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. data_available_start timestamp Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. name string Human-readable name of the Report TypeMore attributesExpand all object string, value is \"reporting.report_type\" default_columns array containing strings livemode boolean updated timestamp version integer","code":"'''The Report Type object {\n \"id\": \"balance.summary.1\",\n \"object\": \"reporting.report_type\",\n \"data_available_end\": 1659441600,\n \"data_available_start\": 1385769600,\n \"default_columns\": [\n \"category\",\n \"description\",\n \"net_amount\",\n \"currency\"\n ],\n \"livemode\": true,\n \"name\": \"Balance summary\",\n \"updated\": 1659477712,\n \"version\": 1\n}\n'''"},{"nl":"Retrieve a Report TypeRetrieves the details of a Report Type. (Certain report types require a live-mode API key.)ParametersNo parameters.ReturnsReturns the specified ReportType object if found, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.reporting.ReportType.retrieve(\n \"balance.summary.1\",\n)\n'''Response {\n \"id\": \"balance.summary.1\",\n \"object\": \"reporting.report_type\",\n \"data_available_end\": 1659441600,\n \"data_available_start\": 1385769600,\n \"default_columns\": [\n \"category\",\n \"description\",\n \"net_amount\",\n \"currency\"\n ],\n \"livemode\": true,\n \"name\": \"Balance summary\",\n \"updated\": 1659477712,\n \"version\": 1\n}'''"},{"nl":"List all Report TypesReturns a full list of Report Types.ParametersNo parameters.ReturnsA dictionary with a data property that contains an array of Report Types.\nEach entry is a separate ReportType object. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.reporting.ReportType.list()\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/reporting\/report_types\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"balance.summary.1\",\n \"object\": \"reporting.report_type\",\n \"data_available_end\": 1659441600,\n \"data_available_start\": 1385769600,\n \"default_columns\": [\n \"category\",\n \"description\",\n \"net_amount\",\n \"currency\"\n ],\n \"livemode\": true,\n \"name\": \"Balance summary\",\n \"updated\": 1659477712,\n \"version\": 1\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"AccountsA Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/financial_connections\/accounts\/:id\u00a0\u00a0POST\u00a0\/v1\/financial_connections\/accounts\/:id\/refresh\u00a0\u00a0POST\u00a0\/v1\/financial_connections\/accounts\/:id\/disconnect\u00a0\u00a0\u00a0GET\u00a0\/v1\/financial_connections\/accounts\n'''"},{"nl":"The Account objectAttributes id string Unique identifier for the object. object string, value is \"financial_connections.account\" String representing the object\u2019s type. Objects of the same type share the same value. account_holder hash The account holder that this account belongs to.Show child attributes balance hash The most recent information about the account\u2019s balance.Show child attributes balance_refresh hash The state of the most recent attempt to refresh the account balance.Show child attributes category enum The type of the account. Account category is further divided in subcategory.Possible enum valuescash The account represents real funds held by the institution (e.g. a checking or savings account).credit The account represents credit extended by the institution (e.g. a credit card or mortgage).investment The account represents investments, or any account where there are funds of unknown liquidity.other The account does not fall under the other categories. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. display_name string A human-readable name that has been assigned to this account, either by the account holder or by the institution. institution_name string The name of the institution that holds this account. last4 string The last 4 digits of the account number. If present, this will be 4 numeric characters. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. ownership string expandable The most recent information about the account\u2019s owners. ownership_refresh hash The state of the most recent attempt to refresh the account owners.Show child attributes permissions array of enum values The list of permissions granted by this account.Possible enum valuespayment_method Allows the creation of a payment method from the account.balances Allows accessing balance data from the account.transactions Allows accessing transactions data from the account.ownership Allows accessing ownership data from the account. status enum The status of the link to the account.Possible enum valuesactive Stripe is able to retrieve data from the Account without issues.inactive Stripe cannot retrieve data from the Account.disconnected Account connection has been terminated. subcategory enum If category is cash, one of:\n\nchecking\nsavings\nother\n\nIf category is credit, one of:\n\nmortgage\nline_of_credit\ncredit_card\nother\n\nIf category is investment or other, this will be other.Possible enum valueschecking The account is a checking account.savings The account is a savings account.mortgage The account represents a mortgage.line_of_credit The account represents a line of credit.credit_card The account represents a credit card.other The account does not fall under any of the other subcategories. supported_payment_method_types array of enum values The PaymentMethod type(s) that can be created from this account.Possible enum valuesus_bank_account A us_bank_account PaymentMethod can be created.link A link PaymentMethod can be created","code":"'''The Account object {\n \"id\": \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n \"object\": \"linked_account\",\n \"accountholder\": {\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"type\": \"customer\"\n },\n \"balance\": null,\n \"balance_refresh\": null,\n \"category\": \"cash\",\n \"created\": 1659519824,\n \"display_name\": \"Sample Checking Account\",\n \"institution_name\": \"StripeBank\",\n \"last4\": \"6789\",\n \"livemode\": false,\n \"ownership\": null,\n \"ownership_refresh\": null,\n \"permissions\": [],\n \"status\": \"active\",\n \"subcategory\": \"checking\",\n \"supported_payment_method_types\": [\n \"us_bank_account\"\n ]\n}\n'''"},{"nl":"Retrieve an AccountRetrieves the details of an Financial Connections Account.ParametersNo parameters.ReturnsReturns an Account object if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Account.retrieve(\n \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n)\n'''Response {\n \"id\": \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n \"object\": \"linked_account\",\n \"accountholder\": {\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"type\": \"customer\"\n },\n \"balance\": null,\n \"balance_refresh\": null,\n \"category\": \"cash\",\n \"created\": 1659519824,\n \"display_name\": \"Sample Checking Account\",\n \"institution_name\": \"StripeBank\",\n \"last4\": \"6789\",\n \"livemode\": false,\n \"ownership\": null,\n \"ownership_refresh\": null,\n \"permissions\": [],\n \"status\": \"active\",\n \"subcategory\": \"checking\",\n \"supported_payment_method_types\": [\n \"us_bank_account\"\n ]\n}'''"},{"nl":"Refresh Account dataRefreshes the data associated with a Financial Connections Account.Parameters features required The list of account features that you would like to refresh. Either: balance or ownership.Possible enum valuesbalance ownership ReturnsReturns an Account object if a valid identifier was provided and if you have sufficient permissions to that account. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Account.refresh_account(\n \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n features = ['balance'],\n)\n'''Response {\n \"id\": \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n \"object\": \"linked_account\",\n \"accountholder\": {\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"type\": \"customer\"\n },\n \"balance\": null,\n \"balance_refresh\": {\n \"status\": \"pending\",\n \"last_attempted_at\": 1625337296\n },\n \"category\": \"cash\",\n \"created\": 1659519824,\n \"display_name\": \"Sample Checking Account\",\n \"institution_name\": \"StripeBank\",\n \"last4\": \"6789\",\n \"livemode\": false,\n \"ownership\": null,\n \"ownership_refresh\": null,\n \"permissions\": [\n \"balance\"\n ],\n \"status\": \"active\",\n \"subcategory\": \"checking\",\n \"supported_payment_method_types\": [\n \"us_bank_account\"\n ]\n}'''"},{"nl":"Disconnect an AccountDisables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).ParametersNo parameters.ReturnsReturns an Account object if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Account.disconnect(\n \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n)\n'''Response {\n \"id\": \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n \"object\": \"linked_account\",\n \"accountholder\": {\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"type\": \"customer\"\n },\n \"balance\": null,\n \"balance_refresh\": null,\n \"category\": \"cash\",\n \"created\": 1659519824,\n \"display_name\": \"Sample Checking Account\",\n \"institution_name\": \"StripeBank\",\n \"last4\": \"6789\",\n \"livemode\": false,\n \"ownership\": null,\n \"ownership_refresh\": null,\n \"permissions\": [],\n \"status\": \"disconnected\",\n \"subcategory\": \"checking\",\n \"supported_payment_method_types\": [\n \"us_bank_account\"\n ]\n}'''"},{"nl":"List AccountsReturns a list of Financial Connections Account objects.Parameters account_holder optional dictionary If present, only return accounts that belong to the specified account holder. account_holder[customer] and account_holder[account] are mutually exclusive.Show child parameters session optional If present, only return accounts that were collected as part of the given session.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 Account objects, starting after account starting_after. Each entry in the array is a separate Account object. If no more accounts are available, the resulting array will be empty. This request will raise an error if more than one of account_holder[account], account_holder[customer], or session is specified","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Account.list(\n account_holder={\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n },\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/financial_connections\/accounts\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n \"object\": \"linked_account\",\n \"accountholder\": {\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n \"type\": \"customer\"\n },\n \"balance\": null,\n \"balance_refresh\": null,\n \"category\": \"cash\",\n \"created\": 1659519824,\n \"display_name\": \"Sample Checking Account\",\n \"institution_name\": \"StripeBank\",\n \"last4\": \"6789\",\n \"livemode\": false,\n \"ownership\": null,\n \"ownership_refresh\": null,\n \"permissions\": [],\n \"status\": \"active\",\n \"subcategory\": \"checking\",\n \"supported_payment_method_types\": [\n \"us_bank_account\"\n ]\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Account OwnershipDescribes a snapshot of the owners of an account at a particular point in time","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/financial_connections\/accounts\/:id\/owners?ownership=:ownership_id\n'''"},{"nl":"The Account Ownership objectAttributes id string Unique identifier for the object. object string, value is \"financial_connections.account_ownership\" String representing the object\u2019s 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. owners list A paginated list of owners for this account.Show child attribute","code":"'''The Account Ownership object {\n \"id\": \"fcaowns_1LSe7A2eZvKYlo2CDGvNm8um\",\n \"object\": \"linked_account_ownership\",\n \"created\": 1659519824,\n \"owners\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/linked_accounts\/fca_1LSe7A2eZvKYlo2CzqWwcrM6\/owners?ownership=fcaowns_1LSe7A2eZvKYlo2CDGvNm8um\"\n }\n}\n'''"},{"nl":"The Account Owner objectAttributes id string Unique identifier for the object. object string, value is \"financial_connections.account_owner\" String representing the object\u2019s type. Objects of the same type share the same value. email string The email address of the owner. name string The full name of the owner. ownership string The ownership object that this owner belongs to. phone string The raw phone number of the owner. raw_address string The raw physical address of the owner. refreshed_at timestamp The timestamp of the refresh that updated this owner","code":"'''The Account Owner object {\n \"id\": \"fcaown_1LSe7A2eZvKYlo2CXP9t2eeP\",\n \"object\": \"linked_account_owner\",\n \"email\": \"nobody+janesmith@stripe.com\",\n \"name\": \"Jane Smith\",\n \"ownership\": \"fcaowns_1LSe7A2eZvKYlo2C6pLwS2ZD\",\n \"phone\": \"+1 555-555-5555\",\n \"raw_address\": \"123 Main Street, Everytown USA\",\n \"refreshed_at\": null\n}\n'''"},{"nl":"List Account OwnersLists all owners for a given AccountParameters ownership required The ID of the ownership object to fetch owners from.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 owners for a given account, starting after owner starting_after. Each entry in the array is a separate owner object. If no more owners are available, the resulting array will be empty","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Account.list_owners(\n \"fca_1LSe7A2eZvKYlo2CR4Zo8ewO\",\n limit=3,\n ownership=\"fcaowns_1LSe7A2eZvKYlo2CDGvNm8um\",\n)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/financial_connections\/accounts\/fca_1LSe7A2eZvKYlo2CR4Zo8ewO\/owners\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"fcaown_1LSe7A2eZvKYlo2CXP9t2eeP\",\n \"object\": \"linked_account_owner\",\n \"email\": \"nobody+janesmith@stripe.com\",\n \"name\": \"Jane Smith\",\n \"ownership\": \"fcaowns_1LSe7A2eZvKYlo2C6pLwS2ZD\",\n \"phone\": \"+1 555-555-5555\",\n \"raw_address\": \"123 Main Street, Everytown USA\",\n \"refreshed_at\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"SessionA Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/financial_connections\/sessions\u00a0\u00a0\u00a0GET\u00a0\/v1\/financial_connections\/sessions\/:id\n'''"},{"nl":"The Session objectAttributes id string Unique identifier for the object. object string, value is \"financial_connections.session\" String representing the object\u2019s type. Objects of the same type share the same value. account_holder hash The account holder for whom accounts are collected in this session.Show child attributes accounts list The accounts that were collected as part of this Session.Show child attributes client_secret string A value that will be passed to the client to launch the authentication flow. filters hash Filters applied to this session that restrict the kinds of accounts to collect.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. permissions array of enum values Permissions requested for accounts collected during this session.Possible enum valuespayment_method Requests permission for the creation of a payment method from an account collected in this session.balances Requests access for balance data on accounts collected in this session.transactions Requests access for transaction data on accounts collected in this session.ownership Requests access for ownership data on accounts collected in this session. return_url string For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app","code":"'''The Session object {\n \"id\": \"fcsess_1LE8to2eZvKYlo2CeCL5ftCO\",\n \"object\": \"link_account_session\",\n \"accountholder\": {\n \"account\": \"acct_1KdUF8RhmIBPIfCO\",\n \"type\": \"account\"\n },\n \"client_secret\": \"fcsess_client_secret_PZri8EdhlStQTdnecntKdjnx\",\n \"filters\": {\n \"countries\": [\n \"US\"\n ]\n },\n \"linked_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/linked_accounts\"\n },\n \"livemode\": false,\n \"permissions\": [\n \"ownership\",\n \"payment_method\"\n ]\n}\n'''"},{"nl":"Create a SessionTo launch the Financial Connections authorization flow, create a Session. The session\u2019s client_secret can be used to launch the flow using Stripe.js.Parameters account_holder required The account holder to link accounts for.Show child parameters permissions required List of data features that you would like to request access to.\nPossible values are balances, transactions, ownership, and payment_method. filters optional dictionary Filters to restrict the kinds of accounts to collect.Show child parametersReturnsReturns the Session object","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Session.create(\n account_holder={\n \"type\": \"customer\",\n \"customer\": \"cus_8TEMHVY5moxIPI\",\n },\n permissions=[\"payment_method\", \"balances\"],\n filters={\"countries\": [\"US\"]},\n)\n'''Response {\n \"id\": \"fcsess_1LE8to2eZvKYlo2CeCL5ftCO\",\n \"object\": \"link_account_session\",\n \"accountholder\": {\n \"account\": \"acct_1KdUF8RhmIBPIfCO\",\n \"type\": \"account\"\n },\n \"client_secret\": \"fcsess_client_secret_PZri8EdhlStQTdnecntKdjnx\",\n \"filters\": {\n \"countries\": [\n \"US\"\n ]\n },\n \"linked_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/linked_accounts\"\n },\n \"livemode\": false,\n \"permissions\": [\n \"ownership\",\n \"payment_method\"\n ]\n}'''"},{"nl":"Retrieve a SessionRetrieves the details of a Financial Connections SessionParametersNo parameters.ReturnsReturns a Session object if a valid identifier was provided, and raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.financial_connections.Session.retrieve(\n \"fcsess_1LE8to2eZvKYlo2CeCL5ftCO\",\n)\n'''Response {\n \"id\": \"fcsess_1LE8to2eZvKYlo2CeCL5ftCO\",\n \"object\": \"link_account_session\",\n \"accountholder\": {\n \"account\": \"acct_1KdUF8RhmIBPIfCO\",\n \"type\": \"account\"\n },\n \"client_secret\": \"fcsess_client_secret_PZri8EdhlStQTdnecntKdjnx\",\n \"filters\": {\n \"countries\": [\n \"US\"\n ]\n },\n \"linked_accounts\": {\n \"object\": \"list\",\n \"data\": [],\n \"has_more\": false,\n \"url\": \"\/v1\/linked_accounts\"\n },\n \"livemode\": false,\n \"permissions\": [\n \"ownership\",\n \"payment_method\"\n ]\n}'''"},{"nl":"VerificationSessionA VerificationSession guides you through the process of collecting and verifying the identities\nof your users. It contains details about the type of verification, such as what verification\ncheck to perform. Only create one VerificationSession for\neach verification in your system.A VerificationSession transitions through multiple\nstatuses throughout its lifetime as it progresses through\nthe verification flow. The VerificationSession contains the user\u2019s verified data after\nverification checks are complete.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/identity\/verification_sessions\u00a0\u00a0\u00a0GET\u00a0\/v1\/identity\/verification_sessions\u00a0\u00a0\u00a0GET\u00a0\/v1\/identity\/verification_sessions\/:id\u00a0\u00a0POST\u00a0\/v1\/identity\/verification_sessions\/:id\u00a0\u00a0POST\u00a0\/v1\/identity\/verification_sessions\/:id\/cancel\u00a0\u00a0POST\u00a0\/v1\/identity\/verification_sessions\/:id\/redact\n'''"},{"nl":"The VerificationSession objectAttributes id string Unique identifier for the object. object string, value is \"identity.verification_session\" String representing the object\u2019s type. Objects of the same type share the same value. client_secret string The short-lived client secret used by Stripe.js to show a verification modal inside your app. This client secret expires after 24 hours and can only be used once. Don\u2019t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on passing the client secret to the frontend to learn more. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. last_error hash If present, this property tells you the last error encountered when processing the verification.Show child attributes last_verification_report string expandable ID of the most recent VerificationReport. Learn more about accessing detailed verification results. livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. 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. options hash A set of options for the session\u2019s verification checks.Show child attributes redaction hash Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.Show child attributes status enum Status of this VerificationSession. Learn more about the lifecycle of sessions.Possible enum valuesrequires_input Requires user input before processing can continue.processing The session has been submitted and is being processed. Most verification checks are processed in less than 1 minute.verified Processing of all the verification checks are complete and successfully verified.canceled The VerificationSession has been invalidated for future submission attempts. type enum The type of verification check to be performed.Possible enum valuesdocument Document check.id_number ID number check. url string The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don\u2019t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on verifying identity documents to learn how to redirect users to Stripe. verified_outputs hash expandable The user\u2019s verified data. This field is not included by default. To include it in the response, expand the verified_outputs field.Show child attribute","code":"'''The VerificationSession object {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": null,\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": \"vr_MAzX55QFjfyYotTJPvuHG7Wk\",\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"document\": {\n \"require_matching_selfie\": true\n }\n },\n \"redaction\": null,\n \"status\": \"verified\",\n \"type\": \"document\",\n \"url\": null\n}\n'''"},{"nl":"Create a VerificationSessionCreates a VerificationSession object.\nAfter the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session\u2019s url.\nIf your API key is in test mode, verification checks won\u2019t actually process, though everything else will occur as if in live mode.\n","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationSession.create(\n type=\"document\",\n)\n'''Response {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": \"...\",\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"document\": {}\n },\n \"redaction\": null,\n \"status\": \"requires_input\",\n \"type\": \"document\",\n \"url\": \"...\"\n}'''"},{"nl":"List VerificationSessionsReturns a list of VerificationSessionsParameters created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:Show child parameters status optional enum Only return VerificationSessions with this status. Learn more about the lifecycle of sessions.Possible enum valuesrequires_input Requires user input before processing can continue.processing The session has been submitted and is being processed. Most verification checks are processed in less than 1 minute.verified Processing of all the verification checks are complete and successfully verified.canceled The VerificationSession has been invalidated for future submission attempts.More parametersExpand all ending_before optional limit optional starting_after optional ReturnsList of VerificationSession objects that match the provided filter criteria","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationSession.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/identity\/verification_sessions\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": null,\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": \"vr_MAzX31XR0i6q8kNUbK4ddFQj\",\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"document\": {\n \"require_matching_selfie\": true\n }\n },\n \"redaction\": null,\n \"status\": \"verified\",\n \"type\": \"document\",\n \"url\": null\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Retrieve a VerificationSessionRetrieves the details of a VerificationSession that was previously created.\nWhen the session status is requires_input, you can use this method to retrieve a valid\nclient_secret or url to allow re-submission.ParametersNo parameters.ReturnsReturns a VerificationSession objec","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationSession.retrieve(\n \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n)\n'''Response {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": null,\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": \"vr_MAzX31XR0i6q8kNUbK4ddFQj\",\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"document\": {\n \"require_matching_selfie\": true\n }\n },\n \"redaction\": null,\n \"status\": \"verified\",\n \"type\": \"document\",\n \"url\": null\n}'''"},{"nl":"Update a VerificationSessionUpdates a VerificationSession object.\nWhen the session status is requires_input, you can use this method to update the\nverification check and options.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. options optional dictionary A set of options for the session\u2019s verification checks.Show child parameters type optional enum The type of verification check to be performed.Possible enum valuesdocument Document check.id_number ID number check.ReturnsReturns the updated VerificationSession objec","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationSession.modify(\n \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n type=\"id_number\",\n)\n'''Response {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": \"...\",\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"id_number\": {}\n },\n \"redaction\": null,\n \"status\": \"requires_input\",\n \"type\": \"id_number\",\n \"url\": \"...\"\n}'''"},{"nl":"Cancel a VerificationSessionA VerificationSession object can be canceled when it is in requires_input status.\nOnce canceled, future submission attempts are disabled. This cannot be undone. Learn more.ParametersNo parameters.ReturnsReturns the canceled VerificationSession objec","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationSession.cancel(\n \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n)\n'''Response {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": null,\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": null,\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"document\": {}\n },\n \"redaction\": null,\n \"status\": \"canceled\",\n \"type\": \"document\",\n \"url\": null\n}'''"},{"nl":"Redact a VerificationSessionRedact a VerificationSession to remove all collected information from Stripe. This will redact\nthe VerificationSession and all objects related to it, including VerificationReports, Events,\nrequest logs, etc.\nA VerificationSession object can be redacted when it is in requires_input or verified\nstatus. Redacting a VerificationSession in requires_action\nstate will automatically cancel it.\nThe redaction process may take up to four days. When the redaction process is in progress, the\nVerificationSession\u2019s redaction.status field will be set to processing; when the process is\nfinished, it will change to redacted and an identity.verification_session.redacted event\nwill be emitted.\nRedaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the\nfields that contain personal data will be replaced by the string [redacted] or a similar\nplaceholder. The metadata field will also be erased. Redacted objects cannot be updated or\nused for any purpose.\nLearn more.ParametersNo parameters.ReturnsReturns the redacted VerificationSession objec","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationSession.redact(\n \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n)\n'''Response {\n \"id\": \"vs_1LSdYV2eZvKYlo2CdYlGh92T\",\n \"object\": \"identity.verification_session\",\n \"client_secret\": null,\n \"created\": 1659517675,\n \"last_error\": null,\n \"last_verification_report\": \"vr_MAzX31XR0i6q8kNUbK4ddFQj\",\n \"livemode\": false,\n \"metadata\": {},\n \"options\": {\n \"document\": {\n \"require_matching_selfie\": true\n }\n },\n \"redaction\": {\n \"status\": \"processing\"\n },\n \"status\": \"verified\",\n \"type\": \"document\",\n \"url\": null\n}'''"},{"nl":"VerificationReportA VerificationReport is the result of an attempt to collect and verify data from a user.\nThe collection of verification checks performed is determined from the type and options\nparameters used. You can find the result of each verification check performed in the\nappropriate sub-resource: document, id_number, selfie.Each VerificationReport contains a copy of any data collected by the user as well as\nreference IDs which can be used to access collected images through the FileUpload\nAPI. To configure and create VerificationReports, use the\nVerificationSession API.","code":"'''Endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/identity\/verification_reports\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/identity\/verification_reports\n'''"},{"nl":"The VerificationReport objectAttributes id string Unique identifier for the object. object string, value is \"identity.verification_report\" String representing the object\u2019s 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. document hash Result of the document check for this report.Show child attributes id_number hash Result of the id number check for this report.Show child attributes livemode boolean Has the value true if the object exists in live mode or the value false if the object exists in test mode. options hash Configuration options for this report.Show child attributes selfie hash Result of the selfie check for this report.Show child attributes type enum Type of report.Possible enum valuesdocument Perform a document check.id_number Perform an ID number check. verification_session string ID of the VerificationSession that created this report","code":"'''The VerificationReport object {\n \"id\": \"vr_1LSdvO2eZvKYlo2CKubuJ1MK\",\n \"object\": \"identity.verification_report\",\n \"created\": 1659519094,\n \"livemode\": false,\n \"options\": {\n \"document\": {}\n },\n \"type\": \"document\",\n \"verification_session\": \"vs_MAzvbl4eUa617QogGOrqnbUE\",\n \"document\": {\n \"status\": \"verified\",\n \"error\": null,\n \"first_name\": \"Jenny\",\n \"last_name\": \"Rosen\",\n \"address\": {\n \"line1\": \"1234 Main St.\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94111\",\n \"country\": \"US\"\n },\n \"type\": \"driving_license\",\n \"files\": [\n \"file_MAzv5z8hA1qrUYGyGlqcdxzi\",\n \"file_MAzvXvOnOwDleDjoXrBZTLXi\"\n ],\n \"expiration_date\": {\n \"month\": 12,\n \"day\": 1,\n \"year\": 2025\n },\n \"issued_date\": {\n \"month\": 12,\n \"day\": 1,\n \"year\": 2020\n },\n \"issuing_country\": \"US\"\n }\n}\n'''"},{"nl":"Retrieve a VerificationReportRetrieves an existing VerificationReportParametersNo parameters.ReturnsReturns a VerificationReport objec","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationReport.retrieve(\n \"vr_1LSdvO2eZvKYlo2CKubuJ1MK\",\n)\n'''Response {\n \"id\": \"vr_1LSdvO2eZvKYlo2CKubuJ1MK\",\n \"object\": \"identity.verification_report\",\n \"created\": 1659519094,\n \"livemode\": false,\n \"options\": {\n \"document\": {}\n },\n \"type\": \"document\",\n \"verification_session\": \"vs_MAzvbl4eUa617QogGOrqnbUE\",\n \"document\": {\n \"status\": \"verified\",\n \"error\": null,\n \"first_name\": \"Jenny\",\n \"last_name\": \"Rosen\",\n \"address\": {\n \"line1\": \"1234 Main St.\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94111\",\n \"country\": \"US\"\n },\n \"type\": \"driving_license\",\n \"files\": [\n \"file_MAzvYbRStSMzZMfNcrOfkJPa\",\n \"file_MAzv1EPCNxQYzrEBc7gCBaxX\"\n ],\n \"expiration_date\": {\n \"month\": 12,\n \"day\": 1,\n \"year\": 2025\n },\n \"issued_date\": {\n \"month\": 12,\n \"day\": 1,\n \"year\": 2020\n },\n \"issuing_country\": \"US\"\n }\n}'''"},{"nl":"List VerificationReportsList all verification reports.Parameters created optional dictionary A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:Show child parameters type optional enum Only return VerificationReports of this typePossible enum valuesdocument Perform a document check.id_number Perform an ID number check. verification_session optional Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.More parametersExpand all ending_before optional limit optional starting_after optional ReturnsList of VerificationInent objects that match the provided filter criteria","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.identity.VerificationReport.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/identity\/verification_reports\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"vr_1LSdvO2eZvKYlo2CKubuJ1MK\",\n \"object\": \"identity.verification_report\",\n \"created\": 1659519094,\n \"livemode\": false,\n \"options\": {\n \"document\": {}\n },\n \"type\": \"document\",\n \"verification_session\": \"vs_MAzvbl4eUa617QogGOrqnbUE\",\n \"document\": {\n \"status\": \"verified\",\n \"error\": null,\n \"first_name\": \"Jenny\",\n \"last_name\": \"Rosen\",\n \"address\": {\n \"line1\": \"1234 Main St.\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\",\n \"zip\": \"94111\",\n \"country\": \"US\"\n },\n \"type\": \"driving_license\",\n \"files\": [\n \"file_MAzvYbRStSMzZMfNcrOfkJPa\",\n \"file_MAzv1EPCNxQYzrEBc7gCBaxX\"\n ],\n \"expiration_date\": {\n \"month\": 12,\n \"day\": 1,\n \"year\": 2025\n },\n \"issued_date\": {\n \"month\": 12,\n \"day\": 1,\n \"year\": 2020\n },\n \"issuing_country\": \"US\"\n }\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Webhook EndpointsYou can configure webhook endpoints via the API to be\nnotified about events that happen in your Stripe account or connected\naccounts.Most users configure webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints.","code":"'''Endpoints\u00a0\u00a0POST\u00a0\/v1\/webhook_endpoints\u00a0\u00a0\u00a0GET\u00a0\/v1\/webhook_endpoints\/:id\u00a0\u00a0POST\u00a0\/v1\/webhook_endpoints\/:id\u00a0\u00a0\u00a0GET\u00a0\/v1\/webhook_endpointsDELETE\u00a0\/v1\/webhook_endpoints\/:id\n'''"},{"nl":"The webhook endpoint objectAttributes id string Unique identifier for the object. api_version string The API version events are rendered as for this webhook endpoint. description string An optional description of what the webhook is used for. enabled_events array containing strings The list of events to enable for this endpoint. [\u2019*\u2019] indicates that all events are enabled, except those that require explicit selection. 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. secret string The endpoint\u2019s secret, used to generate webhook signatures. Only returned at creation. status string The status of the webhook. It can be enabled or disabled. url string The URL of the webhook endpoint.More attributesExpand all object string, value is \"webhook_endpoint\" application string created timestamp livemode boolean","code":"'''The webhook endpoint object {\n \"id\": \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n \"object\": \"webhook_endpoint\",\n \"api_version\": null,\n \"application\": null,\n \"created\": 1659518305,\n \"description\": \"This is my webhook, I like it a lot\",\n \"enabled_events\": [\n \"charge.failed\",\n \"charge.succeeded\"\n ],\n \"livemode\": false,\n \"metadata\": {},\n \"status\": \"enabled\",\n \"url\": \"https:\/\/example.com\/my\/webhook\/endpoint\"\n}\n'''"},{"nl":"Create a webhook endpointA webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.Parameters enabled_events required The list of events to enable for this endpoint. You may specify [\u2019*\u2019] to enable all events, except those that require explicit selection.Possible enum valuesaccount.updated Occurs whenever an account status or property has changed.account.application.authorized Occurs whenever a user authorizes an application. Sent to the related application only.account.application.deauthorized Occurs whenever a user deauthorizes an application. Sent to the related application only.account.external_account.created Occurs whenever an external account is created.account.external_account.deleted Occurs whenever an external account is deleted.account.external_account.updated Occurs whenever an external account is updated.application_fee.created Occurs whenever an application fee is created on a charge.Show 182 more url required The URL of the webhook endpoint. api_version optional Events sent to this endpoint will be generated with this Stripe Version instead of your account\u2019s default Stripe Version. description optional An optional description of what the webhook is used 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.More parametersExpand all connect optional ReturnsReturns the webhook endpoint object with the secret field populated","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.WebhookEndpoint.create(\n url=\"https:\/\/example.com\/my\/webhook\/endpoint\",\n enabled_events=[\n \"charge.failed\",\n \"charge.succeeded\",\n ],\n)\n'''Response {\n \"id\": \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n \"object\": \"webhook_endpoint\",\n \"api_version\": null,\n \"application\": null,\n \"created\": 1659518305,\n \"description\": \"This is my webhook, I like it a lot\",\n \"enabled_events\": [\n \"charge.failed\",\n \"charge.succeeded\"\n ],\n \"livemode\": false,\n \"metadata\": {},\n \"status\": \"enabled\",\n \"url\": \"https:\/\/example.com\/my\/webhook\/endpoint\",\n \"secret\": \"whsec_aKrkHBqtwVgxCtwNCqSSXwHR75MUvCEI\"\n}'''"},{"nl":"Retrieve a webhook endpointRetrieves the webhook endpoint with the given ID.ParametersNo parameters.ReturnsReturns a webhook endpoint if a valid webhook endpoint ID was provided. Raises an error otherwise","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.WebhookEndpoint.retrieve(\n \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n)\n'''Response {\n \"id\": \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n \"object\": \"webhook_endpoint\",\n \"api_version\": null,\n \"application\": null,\n \"created\": 1659518305,\n \"description\": \"This is my webhook, I like it a lot\",\n \"enabled_events\": [\n \"charge.failed\",\n \"charge.succeeded\"\n ],\n \"livemode\": false,\n \"metadata\": {},\n \"status\": \"enabled\",\n \"url\": \"https:\/\/example.com\/my\/webhook\/endpoint\"\n}'''"},{"nl":"Update a webhook endpointUpdates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.Parameters description optional An optional description of what the webhook is used for. enabled_events optional enum The list of events to enable for this endpoint. You may specify [\u2019*\u2019] to enable all events, except those that require explicit selection.Possible enum valuesaccount.updated Occurs whenever an account status or property has changed.account.application.authorized Occurs whenever a user authorizes an application. Sent to the related application only.account.application.deauthorized Occurs whenever a user deauthorizes an application. Sent to the related application only.account.external_account.created Occurs whenever an external account is created.account.external_account.deleted Occurs whenever an external account is deleted.account.external_account.updated Occurs whenever an external account is updated.application_fee.created Occurs whenever an application fee is created on a charge.Show 182 more 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. url optional The URL of the webhook endpoint.More parametersExpand all disabled optional ReturnsThe updated webhook endpoint object if successful. Otherwise, this call raises an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.WebhookEndpoint.modify(\n \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n url=\"https:\/\/example.com\/new_endpoint\",\n)\n'''Response {\n \"id\": \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n \"object\": \"webhook_endpoint\",\n \"api_version\": null,\n \"application\": null,\n \"created\": 1659518305,\n \"description\": \"This is my webhook, I like it a lot\",\n \"enabled_events\": [\n \"charge.failed\",\n \"charge.succeeded\"\n ],\n \"livemode\": false,\n \"metadata\": {},\n \"status\": \"enabled\",\n \"url\": \"https:\/\/example.com\/new_endpoint\"\n}'''"},{"nl":"List all webhook endpointsReturns a list of your webhook endpoints.ParametersExpand all ending_before optional limit optional starting_after optional ReturnsA dictionary with a data property that contains an array of up to limit webhook endpoints, starting after webhook endpoint starting_after. Each entry in the array is a separate webhook endpoint object. If no more webhook endpoints are available, the resulting array will be empty. This request should never raise an error","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.WebhookEndpoint.list(limit=3)\n'''Response {\n \"object\": \"list\",\n \"url\": \"\/v1\/webhook_endpoints\",\n \"has_more\": false,\n \"data\": [\n {\n \"id\": \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n \"object\": \"webhook_endpoint\",\n \"api_version\": null,\n \"application\": null,\n \"created\": 1659518305,\n \"description\": \"This is my webhook, I like it a lot\",\n \"enabled_events\": [\n \"charge.failed\",\n \"charge.succeeded\"\n ],\n \"livemode\": false,\n \"metadata\": {},\n \"status\": \"enabled\",\n \"url\": \"https:\/\/example.com\/my\/webhook\/endpoint\"\n },\n {...},\n {...}\n ]\n}'''"},{"nl":"Delete a webhook endpointYou can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.ParametersNo parameters.ReturnsAn object with the deleted webhook endpoints\u2019s ID. Otherwise, this call raises an error, such as if the webhook endpoint has already been deleted","code":"import stripe\nstripe.api_key = \"sk_test_your_key\"\n\nstripe.WebhookEndpoint.delete(\n \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n)\n'''Response {\n \"id\": \"we_1LSdif2eZvKYlo2CBeXfpCQI\",\n \"object\": \"webhook_endpoint\",\n \"deleted\": true\n}'''"}]