public class

StripeApplicationFeeClient

extends Object
java.lang.Object
   ↳ com.wsl.modules.stripe.client.StripeApplicationFeeClient

Class Overview

Encapsulates Application Fee-related Stripe API calls.

Summary

Public Constructors
StripeApplicationFeeClient()
Public Methods
ApplicationFee createApplicationFeeRefund(String id, int amount)
Create an Application Fee Refund Refunds an application fee that has previously been collected but not yet refunded.
FeeRefundCollection listAllApplicationFeeRefunds(String id, String endingBefore, int limit, String startingAfter)
List All Application Fee Refunds You can see a list of the refunds belonging to a specific application fee.
ApplicationFeeCollection listAllApplicationFees(String charge, String createdTimestamp, TimeRange created, String endingBefore, int limit, String startingAfter)
List all Application Fees
ApplicationFee retrieveApplicationFee(String id)
Retrieve an Application Fee
FeeRefund retrieveApplicationFeeRefund(String id, String fee)
Retrieve an Application Fee Refund By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
FeeRefund updateApplicationFeeRefund(String id, String fee, Map<String, Object> metadata)
Update an Application Fee Refund Updates the specified application fee refund by setting the values of the parameters passed.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StripeApplicationFeeClient ()

Public Methods

public ApplicationFee createApplicationFeeRefund (String id, int amount)

Create an Application Fee Refund Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account that the fee was originally collected from. You can optionally refund only part of an application fee. You can do so as many times as you wish until the entire fee has been refunded. Once entirely refunded, an application fee can't be refunded again. This method will throw an error when called on an already-refunded application fee, or when trying to refund more money than is left on an application fee.

Parameters
id The identifier of the application fee to be refunded.
amount A positive integer in cents representing how much of this fee to refund. Can only refund up to the unrefunded amount remaining of the fee.
Returns
  • Returns the application fee refund object if the refund succeeded. Throws an error if the fee has already been refunded or an invalid fee identifier was provided.
Throws
StripeConnectorException when there is a problem with the Connector

public FeeRefundCollection listAllApplicationFeeRefunds (String id, String endingBefore, int limit, String startingAfter)

List All Application Fee Refunds You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds

Parameters
id The ID of the application fee whose refunds will be retrieved.
endingBefore 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.
limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
startingAfter 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.
Returns
  • A Map with a data property that contains an array of up to limit refunds, starting after starting_after. Each entry in the array is a separate application fee refund object. If no more refunds are available, the resulting array will be empty. If you provide a non-existent application fee ID, this call throws an error.
Throws
StripeConnectorException when there is a problem with the Connector

public ApplicationFeeCollection listAllApplicationFees (String charge, String createdTimestamp, TimeRange created, String endingBefore, int limit, String startingAfter)

List all Application Fees

Parameters
charge Only return application fees for the charge specified by this charge ID.
createdTimestamp A filter on the list based on the created field. The value can be a string with an integer Unix timestamp,...
created Or it can be a dictionary with the following options: gt, gte, lt, lte
endingBefore 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.
limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
startingAfter 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.
Returns
  • Returns Application Fee
Throws
StripeConnectorException when there is a problem with the Connector

public ApplicationFee retrieveApplicationFee (String id)

Retrieve an Application Fee

Parameters
id The identifier of the fee to be retrieved.
Returns
  • Returns Application Fee
Throws
StripeConnectorException when there is a problem with the Connector

public FeeRefund retrieveApplicationFeeRefund (String id, String fee)

Retrieve an Application Fee Refund By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.

Parameters
id The ID of the refund to retrieve
fee ID of the Application Fee refunded
Returns
  • Returns the application fee refund object if the refund succeeded. Throws an error if the fee has already been refunded or an invalid fee identifier was provided.
Throws
StripeConnectorException when there is a problem with the Connector

public FeeRefund updateApplicationFeeRefund (String id, String fee, Map<String, Object> metadata)

Update an Application Fee Refund Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata as an argument.

Parameters
id The identifier of the refund.
fee The identifier of the Application Fee refunded
metadata A set of key/value pairs that you can attach to a refund object. It can be useful for storing additional information about the refund in a structured format. You can unset an individual key by setting its value to null and then saving.
Returns
  • Returns the application fee refund object if the refund succeeded. Throws an error if the fee has already been refunded or an invalid fee identifier was provided.
Throws
StripeConnectorException when there is a problem with the Connector