class Stripe::RefundsApi
- Stripe::RefundsApi
- Reference
- Object
Defined in:
stripe/api/refunds_api.crConstant Summary
-
GET_REFUNDS_MAX_LENGTH_FOR_PAYMENT_INTENT =
5000
-
POST_REFUNDS_MAX_LENGTH_FOR_CHARGE =
5000
-
POST_REFUNDS_MAX_LENGTH_FOR_CUSTOMER =
5000
-
POST_REFUNDS_MAX_LENGTH_FOR_PAYMENT_INTENT =
5000
-
POST_REFUNDS_MAX_LENGTH_FOR_REASON =
5000
-
POST_REFUNDS_VALID_VALUES_FOR_ORIGIN =
String.static_array("customer_balance")
-
POST_REFUNDS_VALID_VALUES_FOR_REASON =
String.static_array("duplicate", "fraudulent", "requested_by_customer")
Constructors
Instance Method Summary
- #api_client : ApiClient
- #api_client=(api_client : ApiClient)
-
#build_api_request_for_get_refunds(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, payment_intent : String | Nil = nil, charge : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_get_refunds_refund(*, refund : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_refunds(*, amount : Int64 | Nil = nil, charge : String | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, expand : Array(String) | Nil = nil, instructions_email : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, origin : String | Nil = nil, payment_intent : String | Nil = nil, reason : String | Nil = nil, refund_application_fee : Bool | Nil = nil, reverse_transfer : Bool | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_refunds_refund(*, refund : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Crest::Request
@return Crest::Request
- #client_side_validation?(*args, **options)
- #client_side_validation?(*args, **options, &)
- #debugging?(*args, **options)
- #debugging?(*args, **options, &)
-
#get_refunds(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, payment_intent : String | Nil = nil, charge : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::ApiMethodRefundList
Returns a list of all refunds you created.
-
#get_refunds(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, payment_intent : String | Nil = nil, charge : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Returns a list of all refunds you created.
-
#get_refunds_refund(*, refund : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Refund
Retrieves the details of an existing refund.
@required @param refund [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. -
#get_refunds_refund(*, refund : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Retrieves the details of an existing refund.</p> @required @param refund [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
-
#get_refunds_refund_with_http_info(*, refund : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Refund, Int32, Hash(String, Array(String) | String))
<p>Retrieves the details of an existing refund.</p> @required @param refund [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
-
#get_refunds_with_http_info(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, payment_intent : String | Nil = nil, charge : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::ApiMethodRefundList, Int32, Hash(String, Array(String) | String))
<p>Returns a list of all refunds you created.
-
#post_refunds(*, amount : Int64 | Nil = nil, charge : String | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, expand : Array(String) | Nil = nil, instructions_email : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, origin : String | Nil = nil, payment_intent : String | Nil = nil, reason : String | Nil = nil, refund_application_fee : Bool | Nil = nil, reverse_transfer : Bool | Nil = nil) : Stripe::Refund
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
Creating a new refund will refund a charge that has previously been created but not yet refunded.
-
#post_refunds(*, amount : Int64 | Nil = nil, charge : String | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, expand : Array(String) | Nil = nil, instructions_email : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, origin : String | Nil = nil, payment_intent : String | Nil = nil, reason : String | Nil = nil, refund_application_fee : Bool | Nil = nil, reverse_transfer : Bool | Nil = nil, &block : Crest::Response -> ) : Nil
<p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.</p> <p>Creating a new refund will refund a charge that has previously been created but not yet refunded.
-
#post_refunds_refund(*, refund : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Stripe::Refund
Updates the refund that you specify by setting the values of the passed parameters.
-
#post_refunds_refund(*, refund : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Updates the refund that you specify by setting the values of the passed parameters.
-
#post_refunds_refund_with_http_info(*, refund : String | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil) : Tuple(Stripe::Refund, Int32, Hash(String, Array(String) | String))
<p>Updates the refund that you specify by setting the values of the passed parameters.
-
#post_refunds_with_http_info(*, amount : Int64 | Nil = nil, charge : String | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, expand : Array(String) | Nil = nil, instructions_email : String | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, origin : String | Nil = nil, payment_intent : String | Nil = nil, reason : String | Nil = nil, refund_application_fee : Bool | Nil = nil, reverse_transfer : Bool | Nil = nil) : Tuple(Stripe::Refund, Int32, Hash(String, Array(String) | String))
<p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.</p> <p>Creating a new refund will refund a charge that has previously been created but not yet refunded.
Constructor Detail
Instance Method Detail
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.
@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 payment_intent [String?] Only return refunds for the PaymentIntent specified by this ID. @optional @param charge [String?] Only return refunds for the charge specified by this charge ID. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return refunds that were created during the given date interval. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::ApiMethodRefundList]<p>Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.</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 payment_intent [String?] Only return refunds for the PaymentIntent specified by this ID.
@optional @param charge [String?] Only return refunds for the charge specified by this charge ID.
@optional @param created [Stripe::GetAccountsCreatedParameter?] Only return refunds that were created during the given date interval.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return nil
Retrieves the details of an existing refund.
@required @param refund [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Refund]<p>Retrieves the details of an existing refund.</p> @required @param refund [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
<p>Retrieves the details of an existing refund.</p> @required @param refund [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Refund, Integer, Hash)] Stripe::Refund, response status code and response headers
<p>Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.</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 payment_intent [String?] Only return refunds for the PaymentIntent specified by this ID.
@optional @param charge [String?] Only return refunds for the charge specified by this charge ID.
@optional @param created [Stripe::GetAccountsCreatedParameter?] Only return refunds that were created during the given date interval.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::ApiMethodRefundList, Integer, Hash)] Stripe::ApiMethodRefundList, response status code and response headers
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.
You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.
Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.
@optional @param amount [Int32?] @optional @param charge [String?] The identifier of the charge to refund. @optional @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 customer [String?] Customer whose customer balance to refund from. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param instructions_email [String?] For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param origin [String?] Origin of the refund @optional @param payment_intent [String?] The identifier of the PaymentIntent to refund. @optional @param reason [String?] String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. @optional @param refund_application_fee [Bool?] Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. @optional @param reverse_transfer [Bool?] Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).A transfer can be reversed only by the application that created the charge. @return [Stripe::Refund]
<p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.</p> <p>Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.</p> <p>You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.</p> <p>Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.</p>
@optional @param amount [Int32?]
@optional @param charge [String?] The identifier of the charge to refund.
@optional @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency.
@optional @param customer [String?] Customer whose customer balance to refund from.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param instructions_email [String?] For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param origin [String?] Origin of the refund
@optional @param payment_intent [String?] The identifier of the PaymentIntent to refund.
@optional @param reason [String?] String indicating the reason for the refund. If set, possible values are duplicate
, fraudulent
, and requested_by_customer
. If you believe the charge to be fraudulent, specifying fraudulent
as the reason will add the associated card and email to your block lists, and will also help us improve our fraud detection algorithms.
@optional @param refund_application_fee [Bool?] Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
@optional @param reverse_transfer [Bool?] Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
@return nil
Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.
This request only accepts metadata
as an argument.
<p>Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.</p> <p>This request only accepts <code>metadata</code> as an argument.</p> @required @param refund [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return nil
<p>Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.</p> <p>This request only accepts <code>metadata</code> as an argument.</p> @required @param refund [String?] @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @return [Tuple(Stripe::Refund, Integer, Hash)] Stripe::Refund, response status code and response headers
<p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.</p> <p>Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.</p> <p>You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.</p> <p>Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.</p>
@optional @param amount [Int32?]
@optional @param charge [String?] The identifier of the charge to refund.
@optional @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency.
@optional @param customer [String?] Customer whose customer balance to refund from.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param instructions_email [String?] For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param origin [String?] Origin of the refund
@optional @param payment_intent [String?] The identifier of the PaymentIntent to refund.
@optional @param reason [String?] String indicating the reason for the refund. If set, possible values are duplicate
, fraudulent
, and requested_by_customer
. If you believe the charge to be fraudulent, specifying fraudulent
as the reason will add the associated card and email to your block lists, and will also help us improve our fraud detection algorithms.
@optional @param refund_application_fee [Bool?] Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
@optional @param reverse_transfer [Bool?] Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
@return [Tuple(Stripe::Refund, Integer, Hash)] Stripe::Refund, response status code and response headers