text
stringlengths
129
11.9k
'''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 ''''''Endpoints  POST /v1/treasury/outbound_transfers  POST /v1/treasury/outbound_transfers/:id/cancel   GET /v1/treasury/outbound_transfers/:id   GET /v1/treasury/outbound_transfers  POST /v1/test_helpers/treasury/outbound_transfers/:id/post  POST /v1/test_helpers/treasury/outbound_transfers/:id/return  POST /v1/test_helpers/treasury/outbound_transfers/:id/fail '''
'''The OutboundTransfer objectAttributes id string Unique identifier for the object. object string, value is "treasury.outbound_transfer" String representing the object’s 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’s 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 “confirmed” 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 ''''''The OutboundTransfer object { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgatCqHoDNk6NpO0hL06uxupTC911B5-fw2twm0hGwib1IN-bZ4pIvQZkXHzIrnOUZ-sw4rDyltPKFiZTMZMNg", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.create( financial_account="fa_1LSe792eZvKYlo2C9eJvA4u8", destination_payment_method="pm_1234567890", amount=500, currency="usd", description="OutboundTransfer to my external bank account", ) '''Response { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 500, "cancelable": true, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1234567890", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.cancel( "obt_1LSe792eZvKYlo2CdMy15utm", ) '''Response { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": false, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "canceled", "status_transitions": { "posted_at": null, "failed_at": null, "canceled_at": 1659519823, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.retrieve( "obt_1LSe792eZvKYlo2CdMy15utm", ) '''Response { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.list( financial_account="fa_1LSe792eZvKYlo2C9eJvA4u8", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/outbound_transfers", "has_more": false, "data": [ { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }, {...}, {...} ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.TestHelpers.post( "obt_1LSe792eZvKYlo2CdMy15utm", ) '''Response { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": false, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "posted", "status_transitions": { "posted_at": 1659519823, "failed_at": null, "canceled_at": null, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.TestHelpers.return( "obt_1LSe792eZvKYlo2CdMy15utm", code="declined", ) '''Response { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": false, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": { "code": "declined", "transaction": "trxn_1LSe792eZvKYlo2CePGIY5b0" }, "statement_descriptor": "transfer", "status": "returned", "status_transitions": { "returned_at": 1659519823, "failed_at": null, "canceled_at": null, "posted_at": 1659519823 }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundTransfer.TestHelpers.fail( "obt_1LSe792eZvKYlo2CdMy15utm", ) '''Response { "id": "obt_1LSe792eZvKYlo2CdMy15utm", "object": "treasury.outbound_transfer", "amount": 10000, "cancelable": false, "created": 1659519823, "currency": "usd", "description": "OutboundTransfer to my external bank account", "destination_payment_method": "pm_1LSe792eZvKYlo2CYRFX7vAt", "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSe792eZvKYlo2C9eJvA4u8", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKM-GqZcGMgacppvJxXs6NpMfXNDMpZXG_jXiATgBLFGs0BdvKk8aMzoZSlLUgNUa53XhGCFXPHKLb1p2owqSLBHgeIheXQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "transfer", "status": "failed", "status_transitions": { "failed_at": 1659519823, "canceled_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSe792eZvKYlo2CQfSsp6IB" }'''
'''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 ''''''Endpoints  POST /v1/treasury/outbound_payments  POST /v1/treasury/outbound_payments/:id/cancel   GET /v1/treasury/outbound_payments/:id   GET /v1/treasury/outbound_payments  POST /v1/test_helpers/treasury/outbound_payments/:id/post  POST /v1/test_helpers/treasury/outbound_payments/:id/return  POST /v1/test_helpers/treasury/outbound_payments/:id/fail '''
'''The OutboundPayment objectAttributes id string Unique identifier for the object. object string, value is "treasury.outbound_payment" String representing the object’s 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’s 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 “confirmed” 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 ''''''The OutboundPayment object { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": true, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "individual", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtz", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYIfE7sQl46NpMxcTQbWWqOs69ZGHCUCY6vernHtBxDzhTaa6ALrs8bZ0gHZlwaHa4PRo0ix3lglY4se2fPEQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.create( financial_account="fa_1LSdi72eZvKYlo2CAwKTB33F", amount=10000, currency="usd", customer="cus_8TEMHVY5moxIPI", destination_payment_method="pm_1LSdi72eZvKYlo2CNRgK5HVh", description="OutboundPayment to a 3rd party", ) '''Response { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": true, "created": 1659518271, "currency": "usd", "customer": "cus_8TEMHVY5moxIPI", "description": "OutboundPayment to a 3rd party", "destination_payment_method": "pm_1LSdi72eZvKYlo2CMbBhphCr", "destination_payment_method_details": { "type": "us_bank_account", "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm" }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.cancel( "obp_1LSdi72eZvKYlo2C9qeS9ZNt", ) '''Response { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": false, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "individual", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtz", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYIfE7sQl46NpMxcTQbWWqOs69ZGHCUCY6vernHtBxDzhTaa6ALrs8bZ0gHZlwaHa4PRo0ix3lglY4se2fPEQ", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "canceled", "status_transitions": { "posted_at": null, "failed_at": null, "canceled_at": 1659518271, "returned_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.retrieve( "obp_1LSdi72eZvKYlo2C9qeS9ZNt", ) '''Response { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": true, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "type": "us_bank_account", "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm" }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.list( financial_account="fa_1LSdi72eZvKYlo2CAwKTB33F", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/outbound_payments", "has_more": false, "data": [ { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": true, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "type": "us_bank_account", "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm" }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "processing", "status_transitions": { "canceled_at": null, "failed_at": null, "posted_at": null, "returned_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }, {...}, {...} ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.TestHelpers.post( "obp_1LSdi72eZvKYlo2C9qeS9ZNt", ) '''Response { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": false, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "type": "us_bank_account", "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm" }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "posted", "status_transitions": { "failed_at": null, "posted_at": 1659518271, "returned_at": null, "canceled_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.TestHelpers.return( "obp_1LSdi72eZvKYlo2C9qeS9ZNt", return_details={"code": "account_closed"}, ) '''Response { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": false, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "type": "us_bank_account", "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm" }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A", "livemode": false, "metadata": {}, "returned_details": { "code": "account_closed", "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }, "statement_descriptor": "payment", "status": "returned", "status_transitions": { "failed_at": null, "posted_at": 1659518271, "returned_at": 1659518272, "canceled_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.OutboundPayment.TestHelpers.fail( "obp_1LSdi72eZvKYlo2C9qeS9ZNt", ) '''Response { "id": "obp_1LSdi72eZvKYlo2C9qeS9ZNt", "object": "treasury.outbound_payment", "amount": 10000, "cancelable": false, "created": 1659518271, "currency": "usd", "customer": null, "description": "OutboundPayment to a 3rd party", "destination_payment_method": null, "destination_payment_method_details": { "type": "us_bank_account", "destination": "ba_1LSdi12eZvKYlo2CVq3qRggm" }, "end_user_details": { "ip_address": null, "present": false }, "expected_arrival_date": 1659657600, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgaKzIm6p9U6NpMIFX6Z41G-0ACLNEW9jnhve0uQimfkLh2g45Xc2btzNmDdc6XVj8erzScQlsZVgupkIgE80A", "livemode": false, "metadata": {}, "returned_details": null, "statement_descriptor": "payment", "status": "failed", "status_transitions": { "failed_at": 1659518271, "posted_at": null, "returned_at": null, "canceled_at": null }, "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 ''''''Endpoints  POST /v1/treasury/inbound_transfers  POST /v1/treasury/inbound_transfers/:id/cancel   GET /v1/treasury/inbound_transfers/:id   GET /v1/treasury/inbound_transfers  POST /v1/test_helpers/treasury/inbound_transfers/:id/fail  POST /v1/test_helpers/treasury/inbound_transfers/:id/return  POST /v1/test_helpers/treasury/inbound_transfers/:id/succeed '''
'''The InboundTransfer objectAttributes id string Unique identifier for the object. object string, value is "treasury.inbound_transfer" String representing the object’s 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’s 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’s 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 “confirmed” 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 ''''''The InboundTransfer object { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbzM0ep4jk6NpM68_p9jIuRS7LURzy58hzMDKXiGggTX80CYXkE-0ZQmnLX5lVap43-6D0B7G3t6PGwmOi1lA", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "failed_at": null, "succeeded_at": null }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" } '''
'''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’ 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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.create( financial_account="fa_1LSe2F2eZvKYlo2C7GbabeHc", amount=10000, currency="usd", origin_payment_method="pm_1KMDdkGPnV27VyGeAgGz8bsi", description="InboundTransfer from my bank account", ) '''Response { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1KMDdkGPnV27VyGeAgGz8bsi", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "failed_at": null, "succeeded_at": null }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }'''
'''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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.cancel( "ibt_1LSe2F2eZvKYlo2CipojuKFw", ) '''Response { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": false, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "canceled", "status_transitions": { "posted_at": null, "failed_at": null, "canceled_at": 1659519519, "returned_at": null }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }'''
'''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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.retrieve( "ibt_1LSe2F2eZvKYlo2CipojuKFw", ) '''Response { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "failed_at": null, "succeeded_at": null }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }'''
'''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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.list( financial_account="fa_1LSe2F2eZvKYlo2C7GbabeHc", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/inbound_transfers", "has_more": false, "data": [ { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "processing", "status_transitions": { "failed_at": null, "succeeded_at": null }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }, {...}, {...} ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.TestHelpers.fail( "ibt_1LSe2F2eZvKYlo2CipojuKFw", failure_details={"code": "insufficient_funds"}, ) '''Response { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": { "code": "insufficient_funds" }, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "failed", "status_transitions": { "failed_at": 1659519519, "succeeded_at": null }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }'''
'''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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.TestHelpers.return( "ibt_1LSe2F2eZvKYlo2CipojuKFw", ) '''Response { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": "rd_1LSe2F2eZvKYlo2Co2KflmTB" }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": true, "statement_descriptor": "transfer", "status": "succeeded", "status_transitions": { "failed_at": null, "succeeded_at": 1659519519 }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }'''
'''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 '''import stripe stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc" stripe.treasury.InboundTransfer.TestHelpers.succeed( "ibt_1LSe2F2eZvKYlo2CipojuKFw", ) '''Response { "id": "ibt_1LSe2F2eZvKYlo2CipojuKFw", "object": "treasury.inbound_transfer", "amount": 10000, "cancelable": true, "created": 1659519519, "currency": "usd", "description": "InboundTransfer from my external bank account", "failure_details": null, "financial_account": "fa_1LSe2F2eZvKYlo2C7GbabeHc", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJ-EqZcGMgbjs2dANsU6NpM-Z_Wbb535boyhCYzG4DhrinMWpdiubSmtMlSJzonQDPqAlVKgTwpcZ5o7sqEqJxr8AeQ25g", "linked_flows": { "received_debit": null }, "livemode": false, "metadata": {}, "origin_payment_method": "pm_1LSe2F2eZvKYlo2CEsB36N9Z", "origin_payment_method_details": { "billing_details": { "address": { "city": "San Francisco", "country": "US", "line1": "1234 Fake Street", "line2": null, "postal_code": "94102", "state": "CA" }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "company", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "fingerprint": "1JWtPxqbdX5Gamtc", "last4": "6789", "network": "ach", "routing_number": "110000000" } }, "returned": false, "statement_descriptor": "transfer", "status": "succeeded", "status_transitions": { "failed_at": null, "succeeded_at": 1659519519 }, "transaction": "trxn_1LSe2F2eZvKYlo2CJLeUtWAK" }'''
'''ReceivedCreditsReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount ''''''Endpoints   GET /v1/treasury/received_credits/:id   GET /v1/treasury/received_credits  POST /v1/test_helpers/treasury/received_credits '''
'''The ReceivedCredit objectAttributes id string Unique identifier for the object. object string, value is "treasury.received_credit" String representing the object’s 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’t be sent to a closed FinancialAccount.account_frozen Funds can’t be sent to a frozen FinancialAccount.other Funds can’t 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’s 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 ''''''The ReceivedCredit object { "id": "rc_1LSdi72eZvKYlo2CX3M5Bpl3", "object": "treasury.received_credit", "amount": 1234, "created": 1659518271, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgb1mHFieUQ6NpMBSliWlUzu3NAo-x_OOJVfT6YwtZSA-s6HlK-G-39UTTUEIpml4aMWxHL6oej3l7MwHuH1aQ", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "credit_reversal": null, "issuing_authorization": null, "issuing_transaction": null, "source_flow": null, "source_flow_type": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.ReceivedCredit.retrieve( "rc_1LSdi72eZvKYlo2CX3M5Bpl3", ) '''Response { "id": "rc_1LSdi72eZvKYlo2CX3M5Bpl3", "object": "treasury.received_credit", "amount": 1234, "created": 1659518271, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYwhGXwARM6NpPX_oYm0NdRfmg4HF7gER7Hua24GXefNx5zWfk8CkG0CKVp64QeoSTZ8fN_tV6X1ggNfIQxRw", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "credit_reversal": null, "issuing_authorization": null, "issuing_transaction": null, "source_flow": null, "source_flow_type": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.ReceivedCredit.list( financial_account="fa_1LSdi72eZvKYlo2CAwKTB33F", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/received_credits", "has_more": false, "data": [ { "id": "rc_1LSdi72eZvKYlo2CX3M5Bpl3", "object": "treasury.received_credit", "amount": 1234, "created": 1659518271, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYwhGXwARM6NpPX_oYm0NdRfmg4HF7gER7Hua24GXefNx5zWfk8CkG0CKVp64QeoSTZ8fN_tV6X1ggNfIQxRw", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "credit_reversal": null, "issuing_authorization": null, "issuing_transaction": null, "source_flow": null, "source_flow_type": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }, {...}, {...} ] }'''
'''Test mode: Create a ReceivedCreditUse this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t 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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.ReceivedCredit.TestHelpers.create( amount=1000, currency="usd", financial_account="fa_1LSdi72eZvKYlo2CAwKTB33F", network="ach", ) '''Response { "id": "rc_1LSdi72eZvKYlo2CX3M5Bpl3", "object": "treasury.received_credit", "amount": 1000, "created": 1659518271, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdi72eZvKYlo2CAwKTB33F", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKL_6qJcGMgYwhGXwARM6NpPX_oYm0NdRfmg4HF7gER7Hua24GXefNx5zWfk8CkG0CKVp64QeoSTZ8fN_tV6X1ggNfIQxRw", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "credit_reversal": null, "issuing_authorization": null, "issuing_transaction": null, "source_flow": null, "source_flow_type": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdi72eZvKYlo2CQiyepd8w" }'''
'''ReceivedDebitsReceivedDebits represent funds pulled from a FinancialAccount. These are not initiated from the FinancialAccount ''''''Endpoints   GET /v1/treasury/received_debits/:id   GET /v1/treasury/received_debits  POST /v1/test_helpers/treasury/received_debits '''
'''The ReceivedDebit objectAttributes id string Unique identifier for the object. object string, value is "treasury.received_debit" String representing the object’s 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’t have sufficient funds, is closed, or is frozen.Possible enum valuesaccount_closed Funds can’t be pulled from a closed FinancialAccount.account_frozen Funds can’t be pulled from a frozen FinancialAccount.insufficient_funds The FinancialAccount doesn’t have a sufficient balance.other Funds can’t 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’s 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 ''''''The ReceivedDebit object { "id": "rd_1LSdrp2eZvKYlo2CAfX8P6F5", "object": "treasury.received_debit", "amount": 54321, "created": 1659518873, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYFTnTgAxg6NpPjdc9B8NawI7Du99aZ0x45UKMXLhp50gN23Z0p3lkPc_ZM6dFvd0egWFAW28Nav9I5CsdfAg", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "debit_reversal": null, "inbound_transfer": null, "issuing_authorization": null, "issuing_transaction": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" } '''
'''Retrieve a ReceivedDebitRetrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit listParametersNo parameters.ReturnsReturns a ReceivedDebit object '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.ReceivedDebit.retrieve( "rd_1LSdrp2eZvKYlo2CAfX8P6F5", ) '''Response { "id": "rd_1LSdrp2eZvKYlo2CAfX8P6F5", "object": "treasury.received_debit", "amount": 54321, "created": 1659518873, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgZe7u3Vdm86NpNdI31c4uzzYctFwmmhFEp2rNxE0bGKLi1E94PI7N1ZcRqXe_E8lSVa_eemN2Zv_GwsPhK1eg", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "debit_reversal": null, "inbound_transfer": null, "issuing_authorization": null, "issuing_transaction": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.ReceivedDebit.list( financial_account="fa_1LSdro2eZvKYlo2CWVkCW1Pl", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/received_debits", "has_more": false, "data": [ { "id": "rd_1LSdrp2eZvKYlo2CAfX8P6F5", "object": "treasury.received_debit", "amount": 54321, "created": 1659518873, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgZe7u3Vdm86NpNdI31c4uzzYctFwmmhFEp2rNxE0bGKLi1E94PI7N1ZcRqXe_E8lSVa_eemN2Zv_GwsPhK1eg", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "debit_reversal": null, "inbound_transfer": null, "issuing_authorization": null, "issuing_transaction": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }, {...}, {...} ] }'''
'''Test mode: Create a ReceivedDebitUse this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t 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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.ReceivedDebit.TestHelpers.create( amount=1000, currency="usd", financial_account="fa_1LSdro2eZvKYlo2CWVkCW1Pl", network="ach", ) '''Response { "id": "rd_1LSdrp2eZvKYlo2CAfX8P6F5", "object": "treasury.received_debit", "amount": 1000, "created": 1659518873, "currency": "usd", "description": "Stripe Test", "failure_code": null, "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgZe7u3Vdm86NpNdI31c4uzzYctFwmmhFEp2rNxE0bGKLi1E94PI7N1ZcRqXe_E8lSVa_eemN2Zv_GwsPhK1eg", "initiating_payment_method_details": { "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "Jane Austen" }, "type": "us_bank_account", "us_bank_account": { "bank_name": "STRIPE TEST BANK", "last4": "6789", "routing_number": "110000000" } }, "linked_flows": { "debit_reversal": null, "inbound_transfer": null, "issuing_authorization": null, "issuing_transaction": null }, "livemode": false, "network": "ach", "reversal_details": { "deadline": 1659657600, "restricted_reason": null }, "status": "succeeded", "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }'''
'''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 ''''''Endpoints  POST /v1/treasury/credit_reversals   GET /v1/treasury/credit_reversals/:id   GET /v1/treasury/credit_reversals '''
'''The CreditReversal objectAttributes id string Unique identifier for the object. object string, value is "treasury.credit_reversal" String representing the object’s 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’s 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 “held” 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 ''''''The CreditReversal object { "id": "credrev_1LSdrp2eZvKYlo2CSJ0201zO", "object": "treasury.credit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgbx2ZP1ZBE6NpPtUveUtOlCrt6dfjze6lgPYAoWm1XcL_9e6ZCPADUu2kHwwiqBXCZ-gQj61Zwt9-zkOvT6Lg", "livemode": false, "metadata": {}, "network": "ach", "received_credit": "rc_1LSdrp2eZvKYlo2C0tawQb1y", "status": "processing", "status_transitions": { "posted_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.CreditReversal.create( received_credit="rc_1LSdrp2eZvKYlo2C0tawQb1y", ) '''Response { "id": "credrev_1LSdrp2eZvKYlo2CSJ0201zO", "object": "treasury.credit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYHS9NYj7Q6NpPuY0UuEPSTQxO3DPFGtDNDQjVNpIbZoX5kIkvqyeeJ5sfFJLxascVMn_jUgKJEg_H4rEb70g", "livemode": false, "metadata": {}, "network": "ach", "received_credit": "rc_1LSdrp2eZvKYlo2C0tawQb1y", "status": "processing", "status_transitions": { "posted_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.CreditReversal.retrieve( "credrev_1LSdrp2eZvKYlo2CSJ0201zO", ) '''Response { "id": "credrev_1LSdrp2eZvKYlo2CSJ0201zO", "object": "treasury.credit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYHS9NYj7Q6NpPuY0UuEPSTQxO3DPFGtDNDQjVNpIbZoX5kIkvqyeeJ5sfFJLxascVMn_jUgKJEg_H4rEb70g", "livemode": false, "metadata": {}, "network": "ach", "received_credit": "rc_1LSdrp2eZvKYlo2C0tawQb1y", "status": "processing", "status_transitions": { "posted_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }'''
'''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 “held” 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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.CreditReversal.list( financial_account="fa_1LSdro2eZvKYlo2CWVkCW1Pl", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/credit_reversals", "has_more": false, "data": [ { "id": "credrev_1LSdrp2eZvKYlo2CSJ0201zO", "object": "treasury.credit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYHS9NYj7Q6NpPuY0UuEPSTQxO3DPFGtDNDQjVNpIbZoX5kIkvqyeeJ5sfFJLxascVMn_jUgKJEg_H4rEb70g", "livemode": false, "metadata": {}, "network": "ach", "received_credit": "rc_1LSdrp2eZvKYlo2C0tawQb1y", "status": "processing", "status_transitions": { "posted_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }, {...}, {...} ] }'''
'''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 ''''''Endpoints  POST /v1/treasury/debit_reversals   GET /v1/treasury/debit_reversals/:id   GET /v1/treasury/debit_reversals '''
'''The DebitReversal objectAttributes id string Unique identifier for the object. object string, value is "treasury.debit_reversal" String representing the object’s 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’s 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 ''''''The DebitReversal object { "id": "debrev_1LSdrp2eZvKYlo2CNrjqDeij", "object": "treasury.debit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgbpdRHelzw6NpMxbecKleY1ygMxayiZhUsY9yAfcelVM8CmALzpkEQNxEWcAD5IMf5K6kn9ZZ5bez1nYUKAfw", "linked_flows": null, "livemode": false, "metadata": {}, "network": "ach", "received_debit": "rd_1LSdrp2eZvKYlo2CsgwhiPIX", "status": "processing", "status_transitions": { "completed_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.DebitReversal.create( received_debit="rd_1LSdrp2eZvKYlo2CsgwhiPIX", ) '''Response { "id": "debrev_1LSdrp2eZvKYlo2CNrjqDeij", "object": "treasury.debit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYOBKehoKU6NpNo8ikrdX5QwuBSMAeRH_1Px31_1fLNkBZWyJ5dI3IrYAiez5qNV2o1A5FYIIITYSTdHuik-w", "linked_flows": null, "livemode": false, "metadata": {}, "network": "ach", "received_debit": "rd_1LSdrp2eZvKYlo2CsgwhiPIX", "status": "processing", "status_transitions": { "completed_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }'''
'''Retrieve a DebitReversalRetrieves a DebitReversal object.ParametersNo parameters.ReturnsReturns a DebitReversal object '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.DebitReversal.retrieve( "debrev_1LSdrp2eZvKYlo2CNrjqDeij", ) '''Response { "id": "debrev_1LSdrp2eZvKYlo2CNrjqDeij", "object": "treasury.debit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYOBKehoKU6NpNo8ikrdX5QwuBSMAeRH_1Px31_1fLNkBZWyJ5dI3IrYAiez5qNV2o1A5FYIIITYSTdHuik-w", "linked_flows": null, "livemode": false, "metadata": {}, "network": "ach", "received_debit": "rd_1LSdrp2eZvKYlo2CsgwhiPIX", "status": "processing", "status_transitions": { "completed_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.treasury.DebitReversal.list( financial_account="fa_1LSdro2eZvKYlo2CWVkCW1Pl", limit=3, ) '''Response { "object": "list", "url": "/v1/treasury/debit_reversals", "has_more": false, "data": [ { "id": "debrev_1LSdrp2eZvKYlo2CNrjqDeij", "object": "treasury.debit_reversal", "amount": 1000, "currency": "usd", "financial_account": "fa_1LSdro2eZvKYlo2CWVkCW1Pl", "hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKJn_qJcGMgYOBKehoKU6NpNo8ikrdX5QwuBSMAeRH_1Px31_1fLNkBZWyJ5dI3IrYAiez5qNV2o1A5FYIIITYSTdHuik-w", "linked_flows": null, "livemode": false, "metadata": {}, "network": "ach", "received_debit": "rd_1LSdrp2eZvKYlo2CsgwhiPIX", "status": "processing", "status_transitions": { "completed_at": null }, "transaction": "trxn_1LSdro2eZvKYlo2Cdo11cZOl" }, {...}, {...} ] }'''
'''OrdersAn Order describes a purchase being made by a customer, including the products & quantities being purchased, the order status, the payment information, and the billing/shipping details. ''''''Endpoints  POST /v1/orders   GET /v1/orders/:id  POST /v1/orders/:id  POST /v1/orders/:id/submit  POST /v1/orders/:id/reopen  POST /v1/orders/:id/cancel   GET /v1/orders  POST /v1/orders/:id/line_items '''
'''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 ¥100, 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. The 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. Refer 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’s products cannot be updated at this stage.processing Once the order is processing, it stays in this state until payment is complete. The order’s 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 ''''''The order object { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 0, "amount_total": 0, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": null, "created": 1659519115, "currency": "usd", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": {}, "payment": { "payment_intent": null, "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": false }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null }, "status": null }, "shipping_cost": null, "shipping_details": null, "status": "open", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 } } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.Order.create( currency="bdt", line_items=[ { "product": "4-4-L-new", "quantity": 10, }, ], expand=["line_items"], ) '''Response { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 14990, "amount_total": 14990, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": {}, "payment": { "payment_intent": null, "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null }, "status": null }, "shipping_cost": null, "shipping_details": null, "status": "open", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" } }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.Order.retrieve( 'order_1LSdvj2eZvKYlo2Cj5Xm8Raw', ) '''Response { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 14990, "amount_total": 14990, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": {}, "payment": { "payment_intent": null, "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null }, "status": null }, "shipping_cost": null, "shipping_details": null, "status": "open", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" } }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.Order.modify( "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", metadata={"reference_number": "183782710"}, ) '''Response { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 14990, "amount_total": 14990, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": { "reference_number": "183782710" }, "payment": { "payment_intent": null, "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null }, "status": null }, "shipping_cost": null, "shipping_details": null, "status": "open", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" } }'''
'''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’s amount_total field. If they don’t match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order.ReturnsReturns the order object '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.stripe_object.StripeObject().request('post', '/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/submit', { "expected_total": 2998 }) '''Response { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 2998, "amount_total": 2998, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": { "reference_number": "183782710" }, "payment": { "status": "requires_payment_method", "payment_intent": "pi_1DrPsv2eZvKYlo2CEDzqXfPH", "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null } }, "shipping_cost": null, "shipping_details": null, "status": "processing", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" }, "tax_details": { "tax_exempt": "none", "tax_ids": [] } }'''
'''Reopen an orderReopens a submitted order.ParametersNo parameters.ReturnsReturns the open order object '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.stripe_object.StripeObject().request('post', '/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/reopen', { }) '''Response { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 14990, "amount_total": 14990, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": { "reference_number": "183782710" }, "payment": { "status": null, "payment_intent": null, "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null } }, "shipping_cost": null, "shipping_details": null, "status": "open", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" } }'''
'''Cancel an orderCancels the order as well as the payment intent if one is attached.ParametersNo parameters.ReturnsReturns the canceled order object '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.stripe_object.StripeObject().request('post', '/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/cancel', { }) '''Response { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 14990, "amount_total": 14990, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": { "reference_number": "183782710" }, "payment": { "status": "canceled", "payment_intent": "pi_1DrPsv2eZvKYlo2CEDzqXfPH", "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null } }, "shipping_cost": null, "shipping_details": null, "status": "canceled", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" } }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.Order.list(limit=3) '''Response { "object": "list", "url": "/v1/orders", "has_more": false, "data": [ { "id": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw", "object": "order", "amount_subtotal": 14990, "amount_total": 14990, "application": null, "automatic_tax": { "enabled": false, "status": null }, "billing_details": null, "client_secret": "order_1LSdvj2eZvKYlo2Cj5Xm8Raw_secret_ifLHrzvrIcUNsNIxjXLdzu9nC7cnVWEeCVg", "created": 1659519115, "currency": "bdt", "customer": null, "description": null, "discounts": [], "ip_address": null, "livemode": false, "metadata": { "reference_number": "183782710" }, "payment": { "payment_intent": null, "settings": { "application_fee_amount": null, "automatic_payment_methods": { "enabled": true }, "payment_method_options": null, "payment_method_types": [ "card" ], "return_url": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "transfer_data": null }, "status": null }, "shipping_cost": null, "shipping_details": null, "status": "open", "total_details": { "amount_discount": 0, "amount_shipping": 0, "amount_tax": 0 }, "line_items": { "object": "list", "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 14990, "amount_tax": 0, "amount_total": 14990, "currency": "bdt", "description": "UV PULLOVER HOODIE The Earthy Blanks DRIFTWOOD L", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "bdt", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "4-4-L-new", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 1499, "unit_amount_decimal": "1499" }, "quantity": 10 } ], "has_more": false, "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items" } }, {...}, {...} ] }'''
'''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. '''import stripe stripe.api_key = "sk_test_your_key" stripe.api_version = "2019-02-19; orders_beta=v4" stripe.stripe_object.StripeObject().request('get', '/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items', { "limit": 3 }) '''Response { "object": "list", "url": "/v1/orders/order_1LSdvj2eZvKYlo2Cj5Xm8Raw/line_items", "has_more": false, "data": [ { "id": "li_1LSdvh2eZvKYlo2Cq9UwPz2D", "object": "item", "amount_discount": 0, "amount_subtotal": 0, "amount_tax": 0, "amount_total": 0, "currency": "usd", "description": "auto topup addtional_viewer", "price": { "id": "price_1LScCX2eZvKYlo2C1Z9zPyXF", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1659512469, "currency": "usd", "custom_unit_amount": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_MAy8UvSA0uRRju", "recurring": null, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "one_time", "unit_amount": 300, "unit_amount_decimal": "300" }, "quantity": 1 }, {...}, {...} ] }'''
'''Scheduled QueriesIf you have scheduled a Sigma query, you'll receive a sigma.scheduled_query_run.created webhook each time the query runs. The webhook contains a ScheduledQueryRun object, which you can use to retrieve the query results ''''''Endpoints   GET /v1/sigma/scheduled_query_runs/:id   GET /v1/sigma/scheduled_query_runs '''
'''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’s 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 ''''''The scheduled query run object { "id": "sqr_1LSdvj2eZvKYlo2CEjKaLGzN", "object": "scheduled_query_run", "created": 1659519115, "data_load_time": 1659312000, "file": { "id": "file_1BE4yZ2eZvKYlo2C9MeXgqcB", "object": "file", "created": 1508284799, "expires_at": null, "filename": "path", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB" }, "purpose": "sigma_scheduled_query", "size": 500, "title": null, "type": "csv", "url": "https://files.stripe.com/v1/files/file_1BE4yZ2eZvKYlo2C9MeXgqcB/contents" }, "livemode": false, "result_available_until": 1691020800, "sql": "SELECT count(*) from charges", "status": "completed", "title": "Count all charges" } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.sigma.ScheduledQueryRun.retrieve( "sqr_1LSdvj2eZvKYlo2CEjKaLGzN", ) '''Response { "id": "sqr_1LSdvj2eZvKYlo2CEjKaLGzN", "object": "scheduled_query_run", "created": 1659519115, "data_load_time": 1659312000, "file": { "id": "file_1BE4yZ2eZvKYlo2C9MeXgqcB", "object": "file", "created": 1508284799, "expires_at": null, "filename": "path", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB" }, "purpose": "sigma_scheduled_query", "size": 500, "title": null, "type": "csv", "url": "https://files.stripe.com/v1/files/file_1BE4yZ2eZvKYlo2C9MeXgqcB/contents" }, "livemode": false, "result_available_until": 1691020800, "sql": "SELECT count(*) from charges", "status": "completed", "title": "Count all charges" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.sigma.ScheduledQueryRun.list(limit=3) '''Response { "object": "list", "url": "/v1/sigma/scheduled_query_runs", "has_more": false, "data": [ { "id": "sqr_1LSdvj2eZvKYlo2CEjKaLGzN", "object": "scheduled_query_run", "created": 1659519115, "data_load_time": 1659312000, "file": { "id": "file_1BE4yZ2eZvKYlo2C9MeXgqcB", "object": "file", "created": 1508284799, "expires_at": null, "filename": "path", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1BE4yZ2eZvKYlo2C9MeXgqcB" }, "purpose": "sigma_scheduled_query", "size": 500, "title": null, "type": "csv", "url": "https://files.stripe.com/v1/files/file_1BE4yZ2eZvKYlo2C9MeXgqcB/contents" }, "livemode": false, "result_available_until": 1691020800, "sql": "SELECT count(*) from charges", "status": "completed", "title": "Count all charges" }, {...}, {...} ] }'''
'''Report RunsThe Report Run object represents an instance of a report type generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. For an overview, see API Access to Reports.Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a live-mode API key ''''''Endpoints  POST /v1/reporting/report_runs   GET /v1/reporting/report_runs/:id   GET /v1/reporting/report_runs '''
'''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 status=succeeded).Show child attributes status string Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. 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 ''''''The Report Run object { "id": "frr_1IRav42eZvKYlo2COAZmOkXO", "object": "reporting.report_run", "created": 1614940206, "error": null, "livemode": false, "parameters": { "columns": [ "created", "reporting_category", "net" ], "interval_end": 1580544000, "interval_start": 1577865600, "timezone": "America/Los_Angeles" }, "report_type": "balance_change_from_activity.itemized.3", "result": { "id": "file_1IRavH2eZvKYlo2CKvrocByo", "object": "file", "created": 1614940219, "expires_at": 1646476219, "filename": "frr_1IRav42eZvKYlo2COAZmOkXO.csv", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo" }, "purpose": "finance_report_run", "size": 15053859, "title": "FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO", "type": "csv", "url": null }, "status": "succeeded", "succeeded_at": 1614940219 } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.reporting.ReportRun.create( report_type="balance.summary.1", parameters={ "interval_start": 1522540800, "interval_end": 1525132800, }, ) '''Response { "id": "frr_1IRav42eZvKYlo2COAZmOkXO", "object": "reporting.report_run", "created": 1614940206, "error": null, "livemode": false, "parameters": { "interval_start": 1522540800, "interval_end": 1525132800 }, "report_type": "balance.summary.1", "result": { "id": "file_1IRavH2eZvKYlo2CKvrocByo", "object": "file", "created": 1614940219, "expires_at": 1646476219, "filename": "frr_1IRav42eZvKYlo2COAZmOkXO.csv", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo" }, "purpose": "finance_report_run", "size": 15053859, "title": "FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO", "type": "csv", "url": null }, "status": "succeeded", "succeeded_at": 1614940219 }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.reporting.ReportRun.retrieve( "frr_1IRav42eZvKYlo2COAZmOkXO", ) '''Response { "id": "frr_1IRav42eZvKYlo2COAZmOkXO", "object": "reporting.report_run", "created": 1614940206, "error": null, "livemode": false, "parameters": { "columns": [ "created", "reporting_category", "net" ], "interval_end": 1580544000, "interval_start": 1577865600, "timezone": "America/Los_Angeles" }, "report_type": "balance_change_from_activity.itemized.3", "result": { "id": "file_1IRavH2eZvKYlo2CKvrocByo", "object": "file", "created": 1614940219, "expires_at": 1646476219, "filename": "frr_1IRav42eZvKYlo2COAZmOkXO.csv", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo" }, "purpose": "finance_report_run", "size": 15053859, "title": "FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO", "type": "csv", "url": null }, "status": "succeeded", "succeeded_at": 1614940219 }'''
'''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 Runs, starting after the argument starting_after if it is provided. Each entry in the array is a separate ReportRun object. If no more Report Runs are available, the resulting array will be empty '''import stripe stripe.api_key = "sk_test_your_key" stripe.reporting.ReportRun.list(limit=3) '''Response { "object": "list", "url": "/v1/reporting/report_runs", "has_more": false, "data": [ { "id": "frr_1IRav42eZvKYlo2COAZmOkXO", "object": "reporting.report_run", "created": 1614940206, "error": null, "livemode": false, "parameters": { "columns": [ "created", "reporting_category", "net" ], "interval_end": 1580544000, "interval_start": 1577865600, "timezone": "America/Los_Angeles" }, "report_type": "balance_change_from_activity.itemized.3", "result": { "id": "file_1IRavH2eZvKYlo2CKvrocByo", "object": "file", "created": 1614940219, "expires_at": 1646476219, "filename": "frr_1IRav42eZvKYlo2COAZmOkXO.csv", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1IRavH2eZvKYlo2CKvrocByo" }, "purpose": "finance_report_run", "size": 15053859, "title": "FinanceReportRun frr_1IRav42eZvKYlo2COAZmOkXO", "type": "csv", "url": null }, "status": "succeeded", "succeeded_at": 1614940219 }, {...}, {...} ] }'''
'''Report TypesThe Report Type resource corresponds to a particular type of report, such as the "Activity summary" or "Itemized payouts" reports. These objects are identified by an ID belonging to a set of enumerated values. See API Access to Reports documentation for 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 data), and will error when queried without a live-mode API key ''''''Endpoints   GET /v1/reporting/report_types/:id   GET /v1/reporting/report_types '''
'''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 ''''''The Report Type object { "id": "balance.summary.1", "object": "reporting.report_type", "data_available_end": 1659441600, "data_available_start": 1385769600, "default_columns": [ "category", "description", "net_amount", "currency" ], "livemode": true, "name": "Balance summary", "updated": 1659477712, "version": 1 } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.reporting.ReportType.retrieve( "balance.summary.1", ) '''Response { "id": "balance.summary.1", "object": "reporting.report_type", "data_available_end": 1659441600, "data_available_start": 1385769600, "default_columns": [ "category", "description", "net_amount", "currency" ], "livemode": true, "name": "Balance summary", "updated": 1659477712, "version": 1 }'''
'''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. Each entry is a separate ReportType object. This request should never raise an error '''import stripe stripe.api_key = "sk_test_your_key" stripe.reporting.ReportType.list() '''Response { "object": "list", "url": "/v1/reporting/report_types", "has_more": false, "data": [ { "id": "balance.summary.1", "object": "reporting.report_type", "data_available_end": 1659441600, "data_available_start": 1385769600, "default_columns": [ "category", "description", "net_amount", "currency" ], "livemode": true, "name": "Balance summary", "updated": 1659477712, "version": 1 }, {...}, {...} ] }'''
'''AccountsA Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access ''''''Endpoints   GET /v1/financial_connections/accounts/:id  POST /v1/financial_connections/accounts/:id/refresh  POST /v1/financial_connections/accounts/:id/disconnect   GET /v1/financial_connections/accounts '''
'''The Account objectAttributes id string Unique identifier for the object. object string, value is "financial_connections.account" String representing the object’s 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’s 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’s 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: checking savings other If category is credit, one of: mortgage line_of_credit credit_card other If 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 ''''''The Account object { "id": "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", "object": "linked_account", "accountholder": { "customer": "cus_8TEMHVY5moxIPI", "type": "customer" }, "balance": null, "balance_refresh": null, "category": "cash", "created": 1659519824, "display_name": "Sample Checking Account", "institution_name": "StripeBank", "last4": "6789", "livemode": false, "ownership": null, "ownership_refresh": null, "permissions": [], "status": "active", "subcategory": "checking", "supported_payment_method_types": [ "us_bank_account" ] } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Account.retrieve( "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", ) '''Response { "id": "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", "object": "linked_account", "accountholder": { "customer": "cus_8TEMHVY5moxIPI", "type": "customer" }, "balance": null, "balance_refresh": null, "category": "cash", "created": 1659519824, "display_name": "Sample Checking Account", "institution_name": "StripeBank", "last4": "6789", "livemode": false, "ownership": null, "ownership_refresh": null, "permissions": [], "status": "active", "subcategory": "checking", "supported_payment_method_types": [ "us_bank_account" ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Account.refresh_account( "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", features = ['balance'], ) '''Response { "id": "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", "object": "linked_account", "accountholder": { "customer": "cus_8TEMHVY5moxIPI", "type": "customer" }, "balance": null, "balance_refresh": { "status": "pending", "last_attempted_at": 1625337296 }, "category": "cash", "created": 1659519824, "display_name": "Sample Checking Account", "institution_name": "StripeBank", "last4": "6789", "livemode": false, "ownership": null, "ownership_refresh": null, "permissions": [ "balance" ], "status": "active", "subcategory": "checking", "supported_payment_method_types": [ "us_bank_account" ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Account.disconnect( "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", ) '''Response { "id": "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", "object": "linked_account", "accountholder": { "customer": "cus_8TEMHVY5moxIPI", "type": "customer" }, "balance": null, "balance_refresh": null, "category": "cash", "created": 1659519824, "display_name": "Sample Checking Account", "institution_name": "StripeBank", "last4": "6789", "livemode": false, "ownership": null, "ownership_refresh": null, "permissions": [], "status": "disconnected", "subcategory": "checking", "supported_payment_method_types": [ "us_bank_account" ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Account.list( account_holder={ "customer": "cus_8TEMHVY5moxIPI", }, ) '''Response { "object": "list", "url": "/v1/financial_connections/accounts", "has_more": false, "data": [ { "id": "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", "object": "linked_account", "accountholder": { "customer": "cus_8TEMHVY5moxIPI", "type": "customer" }, "balance": null, "balance_refresh": null, "category": "cash", "created": 1659519824, "display_name": "Sample Checking Account", "institution_name": "StripeBank", "last4": "6789", "livemode": false, "ownership": null, "ownership_refresh": null, "permissions": [], "status": "active", "subcategory": "checking", "supported_payment_method_types": [ "us_bank_account" ] }, {...}, {...} ] }'''
'''Account OwnershipDescribes a snapshot of the owners of an account at a particular point in time ''''''Endpoints   GET /v1/financial_connections/accounts/:id/owners?ownership=:ownership_id '''
'''The Account Ownership objectAttributes id string Unique identifier for the object. object string, value is "financial_connections.account_ownership" String representing the object’s type. Objects of the same type share the same value. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. owners list A paginated list of owners for this account.Show child attribute ''''''The Account Ownership object { "id": "fcaowns_1LSe7A2eZvKYlo2CDGvNm8um", "object": "linked_account_ownership", "created": 1659519824, "owners": { "object": "list", "data": [], "has_more": false, "url": "/v1/linked_accounts/fca_1LSe7A2eZvKYlo2CzqWwcrM6/owners?ownership=fcaowns_1LSe7A2eZvKYlo2CDGvNm8um" } } '''
'''The Account Owner objectAttributes id string Unique identifier for the object. object string, value is "financial_connections.account_owner" String representing the object’s 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 ''''''The Account Owner object { "id": "fcaown_1LSe7A2eZvKYlo2CXP9t2eeP", "object": "linked_account_owner", "email": "nobody+janesmith@stripe.com", "name": "Jane Smith", "ownership": "fcaowns_1LSe7A2eZvKYlo2C6pLwS2ZD", "phone": "+1 555-555-5555", "raw_address": "123 Main Street, Everytown USA", "refreshed_at": null } '''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Account.list_owners( "fca_1LSe7A2eZvKYlo2CR4Zo8ewO", limit=3, ownership="fcaowns_1LSe7A2eZvKYlo2CDGvNm8um", ) '''Response { "object": "list", "url": "/v1/financial_connections/accounts/fca_1LSe7A2eZvKYlo2CR4Zo8ewO/owners", "has_more": false, "data": [ { "id": "fcaown_1LSe7A2eZvKYlo2CXP9t2eeP", "object": "linked_account_owner", "email": "nobody+janesmith@stripe.com", "name": "Jane Smith", "ownership": "fcaowns_1LSe7A2eZvKYlo2C6pLwS2ZD", "phone": "+1 555-555-5555", "raw_address": "123 Main Street, Everytown USA", "refreshed_at": null }, {...}, {...} ] }'''
'''SessionA Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts ''''''Endpoints  POST /v1/financial_connections/sessions   GET /v1/financial_connections/sessions/:id '''
'''The Session objectAttributes id string Unique identifier for the object. object string, value is "financial_connections.session" String representing the object’s 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 ''''''The Session object { "id": "fcsess_1LE8to2eZvKYlo2CeCL5ftCO", "object": "link_account_session", "accountholder": { "account": "acct_1KdUF8RhmIBPIfCO", "type": "account" }, "client_secret": "fcsess_client_secret_PZri8EdhlStQTdnecntKdjnx", "filters": { "countries": [ "US" ] }, "linked_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/linked_accounts" }, "livemode": false, "permissions": [ "ownership", "payment_method" ] } '''
'''Create a SessionTo launch the Financial Connections authorization flow, create a Session. The session’s 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. Possible 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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Session.create( account_holder={ "type": "customer", "customer": "cus_8TEMHVY5moxIPI", }, permissions=["payment_method", "balances"], filters={"countries": ["US"]}, ) '''Response { "id": "fcsess_1LE8to2eZvKYlo2CeCL5ftCO", "object": "link_account_session", "accountholder": { "account": "acct_1KdUF8RhmIBPIfCO", "type": "account" }, "client_secret": "fcsess_client_secret_PZri8EdhlStQTdnecntKdjnx", "filters": { "countries": [ "US" ] }, "linked_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/linked_accounts" }, "livemode": false, "permissions": [ "ownership", "payment_method" ] }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.financial_connections.Session.retrieve( "fcsess_1LE8to2eZvKYlo2CeCL5ftCO", ) '''Response { "id": "fcsess_1LE8to2eZvKYlo2CeCL5ftCO", "object": "link_account_session", "accountholder": { "account": "acct_1KdUF8RhmIBPIfCO", "type": "account" }, "client_secret": "fcsess_client_secret_PZri8EdhlStQTdnecntKdjnx", "filters": { "countries": [ "US" ] }, "linked_accounts": { "object": "list", "data": [], "has_more": false, "url": "/v1/linked_accounts" }, "livemode": false, "permissions": [ "ownership", "payment_method" ] }'''
'''VerificationSessionA VerificationSession guides you through the process of collecting and verifying the identities of your users. It contains details about the type of verification, such as what verification check to perform. Only create one VerificationSession for each verification in your system.A VerificationSession transitions through multiple statuses throughout its lifetime as it progresses through the verification flow. The VerificationSession contains the user’s verified data after verification checks are complete. ''''''Endpoints  POST /v1/identity/verification_sessions   GET /v1/identity/verification_sessions   GET /v1/identity/verification_sessions/:id  POST /v1/identity/verification_sessions/:id  POST /v1/identity/verification_sessions/:id/cancel  POST /v1/identity/verification_sessions/:id/redact '''
'''The VerificationSession objectAttributes id string Unique identifier for the object. object string, value is "identity.verification_session" String representing the object’s 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’t 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’s 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’t 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’s verified data. This field is not included by default. To include it in the response, expand the verified_outputs field.Show child attribute ''''''The VerificationSession object { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": null, "created": 1659517675, "last_error": null, "last_verification_report": "vr_MAzX55QFjfyYotTJPvuHG7Wk", "livemode": false, "metadata": {}, "options": { "document": { "require_matching_selfie": true } }, "redaction": null, "status": "verified", "type": "document", "url": null } '''
'''Create a VerificationSessionCreates a VerificationSession object. After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session’s url. If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode. '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationSession.create( type="document", ) '''Response { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": "...", "created": 1659517675, "last_error": null, "last_verification_report": null, "livemode": false, "metadata": {}, "options": { "document": {} }, "redaction": null, "status": "requires_input", "type": "document", "url": "..." }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationSession.list(limit=3) '''Response { "object": "list", "url": "/v1/identity/verification_sessions", "has_more": false, "data": [ { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": null, "created": 1659517675, "last_error": null, "last_verification_report": "vr_MAzX31XR0i6q8kNUbK4ddFQj", "livemode": false, "metadata": {}, "options": { "document": { "require_matching_selfie": true } }, "redaction": null, "status": "verified", "type": "document", "url": null }, {...}, {...} ] }'''
'''Retrieve a VerificationSessionRetrieves the details of a VerificationSession that was previously created. When the session status is requires_input, you can use this method to retrieve a valid client_secret or url to allow re-submission.ParametersNo parameters.ReturnsReturns a VerificationSession objec '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationSession.retrieve( "vs_1LSdYV2eZvKYlo2CdYlGh92T", ) '''Response { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": null, "created": 1659517675, "last_error": null, "last_verification_report": "vr_MAzX31XR0i6q8kNUbK4ddFQj", "livemode": false, "metadata": {}, "options": { "document": { "require_matching_selfie": true } }, "redaction": null, "status": "verified", "type": "document", "url": null }'''
'''Update a VerificationSessionUpdates a VerificationSession object. When the session status is requires_input, you can use this method to update the verification 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’s 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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationSession.modify( "vs_1LSdYV2eZvKYlo2CdYlGh92T", type="id_number", ) '''Response { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": "...", "created": 1659517675, "last_error": null, "last_verification_report": null, "livemode": false, "metadata": {}, "options": { "id_number": {} }, "redaction": null, "status": "requires_input", "type": "id_number", "url": "..." }'''
'''Cancel a VerificationSessionA VerificationSession object can be canceled when it is in requires_input status. Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.ParametersNo parameters.ReturnsReturns the canceled VerificationSession objec '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationSession.cancel( "vs_1LSdYV2eZvKYlo2CdYlGh92T", ) '''Response { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": null, "created": 1659517675, "last_error": null, "last_verification_report": null, "livemode": false, "metadata": {}, "options": { "document": {} }, "redaction": null, "status": "canceled", "type": "document", "url": null }'''
'''Redact a VerificationSessionRedact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc. A VerificationSession object can be redacted when it is in requires_input or verified status. Redacting a VerificationSession in requires_action state will automatically cancel it. The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession’s redaction.status field will be set to processing; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted. Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose. Learn more.ParametersNo parameters.ReturnsReturns the redacted VerificationSession objec '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationSession.redact( "vs_1LSdYV2eZvKYlo2CdYlGh92T", ) '''Response { "id": "vs_1LSdYV2eZvKYlo2CdYlGh92T", "object": "identity.verification_session", "client_secret": null, "created": 1659517675, "last_error": null, "last_verification_report": "vr_MAzX31XR0i6q8kNUbK4ddFQj", "livemode": false, "metadata": {}, "options": { "document": { "require_matching_selfie": true } }, "redaction": { "status": "processing" }, "status": "verified", "type": "document", "url": null }'''
'''VerificationReportA VerificationReport is the result of an attempt to collect and verify data from a user. The collection of verification checks performed is determined from the type and options parameters used. You can find the result of each verification check performed in the appropriate sub-resource: document, id_number, selfie.Each VerificationReport contains a copy of any data collected by the user as well as reference IDs which can be used to access collected images through the FileUpload API. To configure and create VerificationReports, use the VerificationSession API. ''''''Endpoints   GET /v1/identity/verification_reports/:id   GET /v1/identity/verification_reports '''
'''The VerificationReport objectAttributes id string Unique identifier for the object. object string, value is "identity.verification_report" String representing the object’s type. Objects of the same type share the same value. created timestamp Time at which the object was created. Measured in seconds since the Unix epoch. 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 ''''''The VerificationReport object { "id": "vr_1LSdvO2eZvKYlo2CKubuJ1MK", "object": "identity.verification_report", "created": 1659519094, "livemode": false, "options": { "document": {} }, "type": "document", "verification_session": "vs_MAzvbl4eUa617QogGOrqnbUE", "document": { "status": "verified", "error": null, "first_name": "Jenny", "last_name": "Rosen", "address": { "line1": "1234 Main St.", "city": "San Francisco", "state": "CA", "zip": "94111", "country": "US" }, "type": "driving_license", "files": [ "file_MAzv5z8hA1qrUYGyGlqcdxzi", "file_MAzvXvOnOwDleDjoXrBZTLXi" ], "expiration_date": { "month": 12, "day": 1, "year": 2025 }, "issued_date": { "month": 12, "day": 1, "year": 2020 }, "issuing_country": "US" } } '''
'''Retrieve a VerificationReportRetrieves an existing VerificationReportParametersNo parameters.ReturnsReturns a VerificationReport objec '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationReport.retrieve( "vr_1LSdvO2eZvKYlo2CKubuJ1MK", ) '''Response { "id": "vr_1LSdvO2eZvKYlo2CKubuJ1MK", "object": "identity.verification_report", "created": 1659519094, "livemode": false, "options": { "document": {} }, "type": "document", "verification_session": "vs_MAzvbl4eUa617QogGOrqnbUE", "document": { "status": "verified", "error": null, "first_name": "Jenny", "last_name": "Rosen", "address": { "line1": "1234 Main St.", "city": "San Francisco", "state": "CA", "zip": "94111", "country": "US" }, "type": "driving_license", "files": [ "file_MAzvYbRStSMzZMfNcrOfkJPa", "file_MAzv1EPCNxQYzrEBc7gCBaxX" ], "expiration_date": { "month": 12, "day": 1, "year": 2025 }, "issued_date": { "month": 12, "day": 1, "year": 2020 }, "issuing_country": "US" } }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.identity.VerificationReport.list(limit=3) '''Response { "object": "list", "url": "/v1/identity/verification_reports", "has_more": false, "data": [ { "id": "vr_1LSdvO2eZvKYlo2CKubuJ1MK", "object": "identity.verification_report", "created": 1659519094, "livemode": false, "options": { "document": {} }, "type": "document", "verification_session": "vs_MAzvbl4eUa617QogGOrqnbUE", "document": { "status": "verified", "error": null, "first_name": "Jenny", "last_name": "Rosen", "address": { "line1": "1234 Main St.", "city": "San Francisco", "state": "CA", "zip": "94111", "country": "US" }, "type": "driving_license", "files": [ "file_MAzvYbRStSMzZMfNcrOfkJPa", "file_MAzv1EPCNxQYzrEBc7gCBaxX" ], "expiration_date": { "month": 12, "day": 1, "year": 2025 }, "issued_date": { "month": 12, "day": 1, "year": 2020 }, "issuing_country": "US" } }, {...}, {...} ] }'''
'''Webhook EndpointsYou can configure webhook endpoints via the API to be notified about events that happen in your Stripe account or connected accounts.Most users configure webhooks from the dashboard, which provides a user interface for registering and testing your webhook endpoints. ''''''Endpoints  POST /v1/webhook_endpoints   GET /v1/webhook_endpoints/:id  POST /v1/webhook_endpoints/:id   GET /v1/webhook_endpointsDELETE /v1/webhook_endpoints/:id '''
'''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. [’*’] 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’s 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 ''''''The webhook endpoint object { "id": "we_1LSdif2eZvKYlo2CBeXfpCQI", "object": "webhook_endpoint", "api_version": null, "application": null, "created": 1659518305, "description": "This is my webhook, I like it a lot", "enabled_events": [ "charge.failed", "charge.succeeded" ], "livemode": false, "metadata": {}, "status": "enabled", "url": "https://example.com/my/webhook/endpoint" } '''
'''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 [’*’] 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’s 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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.WebhookEndpoint.create( url="https://example.com/my/webhook/endpoint", enabled_events=[ "charge.failed", "charge.succeeded", ], ) '''Response { "id": "we_1LSdif2eZvKYlo2CBeXfpCQI", "object": "webhook_endpoint", "api_version": null, "application": null, "created": 1659518305, "description": "This is my webhook, I like it a lot", "enabled_events": [ "charge.failed", "charge.succeeded" ], "livemode": false, "metadata": {}, "status": "enabled", "url": "https://example.com/my/webhook/endpoint", "secret": "whsec_aKrkHBqtwVgxCtwNCqSSXwHR75MUvCEI" }'''
'''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 '''import stripe stripe.api_key = "sk_test_your_key" stripe.WebhookEndpoint.retrieve( "we_1LSdif2eZvKYlo2CBeXfpCQI", ) '''Response { "id": "we_1LSdif2eZvKYlo2CBeXfpCQI", "object": "webhook_endpoint", "api_version": null, "application": null, "created": 1659518305, "description": "This is my webhook, I like it a lot", "enabled_events": [ "charge.failed", "charge.succeeded" ], "livemode": false, "metadata": {}, "status": "enabled", "url": "https://example.com/my/webhook/endpoint" }'''