List all application fees
GET/v1/application_fees
Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
Query parameters
chargestringOnly return application fees for the charge specified by this charge ID.
createdobject | integerOnly return applications fees that were created during the given date interval.
Show 4 child parameters
gtintegergteintegerltintegerlteinteger
ending_beforestringA cursor for use in pagination.
ending_beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withobj_bar, your subsequent call can includeending_before=obj_barin order to fetch the previous page of the list.expandarray of stringsSpecifies which fields in the response should be expanded.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterstringA cursor for use in pagination.
starting_afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withobj_foo, your subsequent call can includestarting_after=obj_fooin order to fetch the next page of the list.
Returns
A list of application_fee objects.
curl -G https://api.knoxapi.com/v1/application_fees \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
--data-urlencode limit=3const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/application_fees', {
limit: 3,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/application_fees", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/application_fees', {
limit: 3,
}){
"object": "list",
"url": "/v1/application_fees",
"has_more": false,
"data": [
{
"account": "acct_1PgafTB7WZ01zgkW",
"amount": 100,
"amount_refunded": 0,
"application": "ca_QXhWOVlWX7KFerjnWFSGuGR21sZjCeji",
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
"created": 1234567890,
"currency": "usd",
"fee_source": {
"charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
"type": "charge"
},
"id": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"livemode": false,
"object": "application_fee",
"originating_transaction": null,
"refunded": false,
"refunds": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refunds"
}
}
]
}Retrieve an application fee
GET/v1/application_fees/{id}
Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
Path parameters
idstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The application_fee object.
curl https://api.knoxapi.com/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m'){
"account": "acct_1PgafTB7WZ01zgkW",
"amount": 100,
"amount_refunded": 0,
"application": "ca_QXhWOVlWX7KFerjnWFSGuGR21sZjCeji",
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
"created": 1234567890,
"currency": "usd",
"fee_source": {
"charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
"type": "charge"
},
"id": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"livemode": false,
"object": "application_fee",
"originating_transaction": null,
"refunded": false,
"refunds": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refunds"
}
}POST /v1/application_fees/{id}/refund
POST/v1/application_fees/{id}/refund
Path parameters
idstringRequired
Body parameters
amountintegerdirectivestringexpandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The application_fee object.
curl -X POST https://api.knoxapi.com/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refund \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refund');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refund")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refund'){
"account": "acct_1PgafTB7WZ01zgkW",
"amount": 100,
"amount_refunded": 0,
"application": "ca_QXhWOVlWX7KFerjnWFSGuGR21sZjCeji",
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
"created": 1234567890,
"currency": "usd",
"fee_source": {
"charge": "ch_1PgafuB7WZ01zgkWXYmPNZs8",
"type": "charge"
},
"id": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"livemode": false,
"object": "application_fee",
"originating_transaction": null,
"refunded": false,
"refunds": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/application_fees/fee_1Pgc6zB7WZ01zgkWOMh2at1m/refunds"
}
}Create an application fee refund
POST/v1/application_fees/{id}/refunds
Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected. You can optionally refund only part of an application fee. You can do so multiple times, until the entire fee has been refunded. Once entirely refunded, an application fee can’t be refunded again. This method will raise an error when called on an already-refunded application fee, or when trying to refund more money than is left on an application fee.
Path parameters
idstringRequired
Body parameters
amountintegerA positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
expandarray of stringsSpecifies which fields in the response should be expanded.
metadataobjectSet 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.
Returns
The fee_refund object.
curl -X POST https://api.knoxapi.com/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds'){
"amount": 100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"fee": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"id": "fr_1Pgc70B7WZ01zgkWSr1ANtFu",
"metadata": {},
"object": "fee_refund"
}List all application fee refunds
GET/v1/application_fees/{id}/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.
Path parameters
idstringRequired
Query parameters
ending_beforestringA cursor for use in pagination.
ending_beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withobj_bar, your subsequent call can includeending_before=obj_barin order to fetch the previous page of the list.expandarray of stringsSpecifies which fields in the response should be expanded.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterstringA cursor for use in pagination.
starting_afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withobj_foo, your subsequent call can includestarting_after=obj_fooin order to fetch the next page of the list.
Returns
A list of fee_refund objects.
curl -G https://api.knoxapi.com/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
--data-urlencode limit=3const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds', {
limit: 3,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/application_fees/fr_1Pgc70B7WZ01zgkWSr1ANtFu/refunds', {
limit: 3,
}){
"object": "list",
"url": "/v1/application_fees",
"has_more": false,
"data": [
{
"amount": 100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"fee": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"id": "fr_1Pgc70B7WZ01zgkWSr1ANtFu",
"metadata": {},
"object": "fee_refund"
}
]
}Update an application fee refund
POST/v1/application_fees/{fee}/refunds/{id}
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.
Path parameters
feestringRequiredidstringRequired
Body parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
metadataobjectSet 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.
Returns
The fee_refund object.
curl https://api.knoxapi.com/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d "metadata[order_id]=6735"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu', {
metadata: {
order_id: '6735',
},
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu", metadata={
"order_id": "6735",
})require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu', {
metadata: {
order_id: '6735',
},
}){
"amount": 100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"fee": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"id": "fr_1Pgc70B7WZ01zgkWSr1ANtFu",
"metadata": {},
"object": "fee_refund"
}Retrieve an application fee refund
GET/v1/application_fees/{fee}/refunds/{id}
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.
Path parameters
feestringRequiredidstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The fee_refund object.
curl https://api.knoxapi.com/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/application_fees/fee_123/refunds/fr_1Pgc70B7WZ01zgkWSr1ANtFu'){
"amount": 100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"fee": "fee_1Pgc6zB7WZ01zgkWOMh2at1m",
"id": "fr_1Pgc70B7WZ01zgkWSr1ANtFu",
"metadata": {},
"object": "fee_refund"
}Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.