class Stripe::PayoutsApi

Defined in:

stripe/api/payouts_api.cr

Constant Summary

GET_PAYOUTS_MAX_LENGTH_FOR_ENDING_BEFORE = 5000
GET_PAYOUTS_MAX_LENGTH_FOR_STARTING_AFTER = 5000
GET_PAYOUTS_MAX_LENGTH_FOR_STATUS = 5000
GET_PAYOUTS_PAYOUT_MAX_LENGTH_FOR_PAYOUT = 5000
POST_PAYOUTS_MAX_LENGTH_FOR_DESCRIPTION = 5000
POST_PAYOUTS_MAX_LENGTH_FOR_METHOD = 5000
POST_PAYOUTS_MAX_LENGTH_FOR_SOURCE_TYPE = 5000
POST_PAYOUTS_MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR = 22
POST_PAYOUTS_PAYOUT_CANCEL_MAX_LENGTH_FOR_PAYOUT = 5000
POST_PAYOUTS_PAYOUT_MAX_LENGTH_FOR_PAYOUT = 5000
POST_PAYOUTS_PAYOUT_REVERSE_MAX_LENGTH_FOR_PAYOUT = 5000
POST_PAYOUTS_VALID_VALUES_FOR_METHOD = String.static_array("instant", "standard")
POST_PAYOUTS_VALID_VALUES_FOR_SOURCE_TYPE = String.static_array("bank_account", "card", "fpx")

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : Stripe::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_get_payouts(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, arrival_date : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil, destination : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_payouts_payout(*, payout : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_payouts(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, destination : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil, method : String | Nil = nil, source_type : String | Nil = nil, statement_descriptor : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_payouts_payout(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_payouts_payout_cancel(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_post_payouts_payout_reverse(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation?(*args, **options) #

[View source]
def client_side_validation?(*args, **options, &) #

[View source]
def debugging?(*args, **options) #

[View source]
def debugging?(*args, **options, &) #

[View source]
def get_payouts(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, arrival_date : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil, destination : String | Nil = nil) : Stripe::PayoutList #

Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.

@optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param arrival_date [Stripe::GetAccountsCreatedParameter?] Only return payouts that are expected to arrive during the given date interval. @optional @param status [String?] Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return payouts that were created during the given date interval. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @optional @param destination [String?] The ID of an external account - only return payouts sent to this external account. @return [Stripe::PayoutList]

[View source]
def get_payouts(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, arrival_date : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil, destination : String | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.</p> @optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param arrival_date [Stripe::GetAccountsCreatedParameter?] Only return payouts that are expected to arrive during the given date interval. @optional @param status [String?] Only return payouts that have the given status: pending, paid, failed, or canceled. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return payouts that were created during the given date interval. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @optional @param destination [String?] The ID of an external account - only return payouts sent to this external account. @return nil


[View source]
def get_payouts_payout(*, payout : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Payout #

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.

@required @param payout [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Payout]

[View source]
def get_payouts_payout(*, payout : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.</p> @required @param payout [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil


[View source]
def get_payouts_payout_with_http_info(*, payout : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Payout, Int32, Hash(String, Array(String) | String)) #

<p>Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.</p> @required @param payout [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Payout, Integer, Hash)] Stripe::Payout, response status code and response headers


[View source]
def get_payouts_with_http_info(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, arrival_date : Stripe::GetAccountsCreatedParameter | Nil = nil, status : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil, destination : String | Nil = nil) : Tuple(Stripe::PayoutList, Int32, Hash(String, Array(String) | String)) #

<p>Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.</p> @optional @param ending_before [String?] A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param arrival_date [Stripe::GetAccountsCreatedParameter?] Only return payouts that are expected to arrive during the given date interval. @optional @param status [String?] Only return payouts that have the given status: pending, paid, failed, or canceled. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return payouts that were created during the given date interval. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @optional @param destination [String?] The ID of an external account - only return payouts sent to this external account. @return [Tuple(Stripe::PayoutList, Integer, Hash)] Stripe::PayoutList, response status code and response headers


[View source]
def post_payouts(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, destination : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil, method : String | Nil = nil, source_type : String | Nil = nil, statement_descriptor : String | Nil = nil) : Stripe::Payout #

To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.

If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.

If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The balance object details available and pending amounts by source type.

@required @param amount [Int32?] A positive integer in cents representing how much to payout. @required @param currency [String?] Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param destination [String?] The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Hash(String, String)?] @optional @param method [String?] The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). @optional @param source_type [String?] The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. @optional @param statement_descriptor [String?] A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. @return [Stripe::Payout]

[View source]
def post_payouts(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, destination : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil, method : String | Nil = nil, source_type : String | Nil = nil, statement_descriptor : String | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>To send funds to your own bank account, create a new payout object. Your <a href=&quot;#balance&quot;>Stripe balance</a> must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.</p> <p>If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.</p> <p>If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The <a href=&quot;#balance_object&quot;>balance object</a> details available and pending amounts by source type.</p> @required @param amount [Int32?] A positive integer in cents representing how much to payout. @required @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency. @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param destination [String?] The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Hash(String, String)?] @optional @param method [String?] The method used to send this payout, which is standard or instant. We support instant for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts. @optional @param source_type [String?] The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of bank_account, card, or fpx. @optional @param statement_descriptor [String?] A string that displays on the recipient's bank or card statement (up to 22 characters). A statement_descriptor that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. @return nil


[View source]
def post_payouts_payout(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Stripe::Payout #

Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.

@required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return [Stripe::Payout]

[View source]
def post_payouts_payout(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.</p> @required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return nil


[View source]
def post_payouts_payout_cancel(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil) : Stripe::Payout #

You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.

@required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Stripe::Payout]

[View source]
def post_payouts_payout_cancel(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>You can cancel a previously created payout if its status is <code>pending</code>. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.</p> @required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return nil


[View source]
def post_payouts_payout_cancel_with_http_info(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil) : Tuple(Stripe::Payout, Int32, Hash(String, Array(String) | String)) #

<p>You can cancel a previously created payout if its status is <code>pending</code>. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.</p> @required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Payout, Integer, Hash)] Stripe::Payout, response status code and response headers


[View source]
def post_payouts_payout_reverse(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil) : Stripe::Payout #

Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead.

By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.

@required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Hash(String, String)?] @return [Stripe::Payout]

[View source]
def post_payouts_payout_reverse(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil, &block : Crest::Response -> ) : Nil #

<p>Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the <code>pending</code> status, use <code>/v1/payouts/:id/cancel</code> instead.</p> <p>By requesting a reversal through <code>/v1/payouts/:id/reverse</code>, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.</p> @required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Hash(String, String)?] @return nil


[View source]
def post_payouts_payout_reverse_with_http_info(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil) : Tuple(Stripe::Payout, Int32, Hash(String, Array(String) | String)) #

<p>Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the <code>pending</code> status, use <code>/v1/payouts/:id/cancel</code> instead.</p> <p>By requesting a reversal through <code>/v1/payouts/:id/reverse</code>, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.</p> @required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Hash(String, String)?] @return [Tuple(Stripe::Payout, Integer, Hash)] Stripe::Payout, response status code and response headers


[View source]
def post_payouts_payout_with_http_info(*, payout : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Tuple(Stripe::Payout, Int32, Hash(String, Array(String) | String)) #

<p>Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.</p> @required @param payout [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return [Tuple(Stripe::Payout, Integer, Hash)] Stripe::Payout, response status code and response headers


[View source]
def post_payouts_with_http_info(*, amount : Int64 | Nil = nil, currency : String | Nil = nil, description : String | Nil = nil, destination : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Hash(String, String) | Nil = nil, method : String | Nil = nil, source_type : String | Nil = nil, statement_descriptor : String | Nil = nil) : Tuple(Stripe::Payout, Int32, Hash(String, Array(String) | String)) #

<p>To send funds to your own bank account, create a new payout object. Your <a href=&quot;#balance&quot;>Stripe balance</a> must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.</p> <p>If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.</p> <p>If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The <a href=&quot;#balance_object&quot;>balance object</a> details available and pending amounts by source type.</p> @required @param amount [Int32?] A positive integer in cents representing how much to payout. @required @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency. @optional @param description [String?] An arbitrary string attached to the object. Often useful for displaying to users. @optional @param destination [String?] The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Hash(String, String)?] @optional @param method [String?] The method used to send this payout, which is standard or instant. We support instant for payouts to debit cards and bank accounts in certain countries. Learn more about bank support for Instant Payouts. @optional @param source_type [String?] The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of bank_account, card, or fpx. @optional @param statement_descriptor [String?] A string that displays on the recipient's bank or card statement (up to 22 characters). A statement_descriptor that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. @return [Tuple(Stripe::Payout, Integer, Hash)] Stripe::Payout, response status code and response headers


[View source]