API reference
Transfers
A Transfer object is created when you move funds between Stripe accounts as part of Connect. Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout object, with corresponding payout endpoints. For more information, read about the transfer/payout split. Related guide: Creating separate charges and transfers
Create a transfer
POST/v1/transfers
To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
Body parameters
currencystringRequiredThree-letter ISO code for currency in lowercase. Must be a supported currency.
destinationstringRequiredThe ID of a connected Stripe account. See the Connect documentation for details.
amountintegerA positive integer in cents (or local equivalent) representing how much to transfer.
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
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.source_transactionstringYou can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. See the Connect documentation for details.
source_typestringThe source balance to use for this transfer. One of
bank_account,card, orfpx. For most users, this will default tocard.Possible valuesbank_accountcardfpx
transfer_groupstringA string that identifies this transaction as part of a group. See the Connect documentation for details.
Returns
The transfer object.
curl https://api.knoxapi.com/v1/transfers \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d currency=usd \
-d destination=acct_1PgafTB7WZ01zgkWconst Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/transfers', {
currency: 'usd',
destination: 'acct_1PgafTB7WZ01zgkW',
});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/transfers", currency="usd", destination="acct_1PgafTB7WZ01zgkW")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/transfers', {
currency: 'usd',
destination: 'acct_1PgafTB7WZ01zgkW',
}){
"amount": 1100,
"amount_reversed": 0,
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"created": 1234567890,
"currency": "usd",
"description": null,
"destination": "acct_1PgafTB7WZ01zgkW",
"destination_payment": "py_QXhWZR8SdWquhf",
"id": "tr_1Pgc7BB7WZ01zgkWVJfE40RX",
"livemode": false,
"metadata": {},
"object": "transfer",
"reversals": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals"
},
"reversed": false,
"source_transaction": null,
"source_type": "card",
"transfer_group": null
}List all transfers
GET/v1/transfers
Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
Query parameters
createdobject | integerOnly return transfers that were created during the given date interval.
Show 4 child parameters
gtintegergteintegerltintegerlteinteger
destinationstringOnly return transfers for the destination specified by this account ID.
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.transfer_groupstringOnly return transfers with the specified transfer group.
Returns
A list of transfer objects.
curl -G https://api.knoxapi.com/v1/transfers \
-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/transfers', {
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/transfers", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/transfers', {
limit: 3,
}){
"object": "list",
"url": "/v1/transfers",
"has_more": false,
"data": [
{
"amount": 1100,
"amount_reversed": 0,
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"created": 1234567890,
"currency": "usd",
"description": null,
"destination": "acct_1PgafTB7WZ01zgkW",
"destination_payment": "py_QXhWZR8SdWquhf",
"id": "tr_1Pgc7BB7WZ01zgkWVJfE40RX",
"livemode": false,
"metadata": {},
"object": "transfer",
"reversals": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals"
},
"reversed": false,
"source_transaction": null,
"source_type": "card",
"transfer_group": null
}
]
}Update a transfer
POST/v1/transfers/{transfer}
Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only metadata as an argument.
Path parameters
transferstringRequired
Body parameters
descriptionstringAn arbitrary string attached to the object. Often useful for displaying to users.
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 transfer object.
curl https://api.knoxapi.com/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX \
-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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX', {
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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX", 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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX', {
metadata: {
order_id: '6735',
},
}){
"amount": 1100,
"amount_reversed": 0,
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"created": 1234567890,
"currency": "usd",
"description": null,
"destination": "acct_1PgafTB7WZ01zgkW",
"destination_payment": "py_QXhWZR8SdWquhf",
"id": "tr_1Pgc7BB7WZ01zgkWVJfE40RX",
"livemode": false,
"metadata": {},
"object": "transfer",
"reversals": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals"
},
"reversed": false,
"source_transaction": null,
"source_type": "card",
"transfer_group": null
}Retrieve a transfer
GET/v1/transfers/{transfer}
Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.
Path parameters
transferstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The transfer object.
curl https://api.knoxapi.com/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX \
-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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX');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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX'){
"amount": 1100,
"amount_reversed": 0,
"balance_transaction": "txn_1PgaxNB7WZ01zgkWEV3TLf40",
"created": 1234567890,
"currency": "usd",
"description": null,
"destination": "acct_1PgafTB7WZ01zgkW",
"destination_payment": "py_QXhWZR8SdWquhf",
"id": "tr_1Pgc7BB7WZ01zgkWVJfE40RX",
"livemode": false,
"metadata": {},
"object": "transfer",
"reversals": {
"data": [],
"has_more": false,
"object": "list",
"url": "/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals"
},
"reversed": false,
"source_transaction": null,
"source_type": "card",
"transfer_group": null
}Create a transfer reversal
POST/v1/transfers/{id}/reversals
When you create a new reversal, you must specify a transfer to create it on. When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.
Path parameters
idstringRequired
Body parameters
amountintegerA positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.
descriptionstringAn arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value.
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.refund_application_feebooleanBoolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.
Returns
The transfer_reversal object.
curl -X POST https://api.knoxapi.com/v1/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals \
-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/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals');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/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals'){
"amount": 1100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"destination_payment_refund": null,
"id": "trr_1Pgc7BB7WZ01zgkWsU61ufNC",
"metadata": {},
"object": "transfer_reversal",
"source_refund": null,
"transfer": "tr_1Pgc7BB7WZ01zgkWVJfE40RX"
}List all reversals
GET/v1/transfers/{id}/reversals
You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer 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 reversals.
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 transfer_reversal objects.
curl -G https://api.knoxapi.com/v1/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals \
-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/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals', {
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/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/transfers/trr_1Pgc7BB7WZ01zgkWsU61ufNC/reversals', {
limit: 3,
}){
"object": "list",
"url": "/v1/transfers",
"has_more": false,
"data": [
{
"amount": 1100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"destination_payment_refund": null,
"id": "trr_1Pgc7BB7WZ01zgkWsU61ufNC",
"metadata": {},
"object": "transfer_reversal",
"source_refund": null,
"transfer": "tr_1Pgc7BB7WZ01zgkWVJfE40RX"
}
]
}Update a reversal
POST/v1/transfers/{transfer}/reversals/{id}
Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata and description as arguments.
Path parameters
idstringRequiredtransferstringRequired
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 transfer_reversal object.
curl https://api.knoxapi.com/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC \
-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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC', {
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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC", 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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC', {
metadata: {
order_id: '6735',
},
}){
"amount": 1100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"destination_payment_refund": null,
"id": "trr_1Pgc7BB7WZ01zgkWsU61ufNC",
"metadata": {},
"object": "transfer_reversal",
"source_refund": null,
"transfer": "tr_1Pgc7BB7WZ01zgkWVJfE40RX"
}Retrieve a reversal
GET/v1/transfers/{transfer}/reversals/{id}
By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.
Path parameters
idstringRequiredtransferstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The transfer_reversal object.
curl https://api.knoxapi.com/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC \
-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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC');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/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/transfers/tr_1Pgc7BB7WZ01zgkWVJfE40RX/reversals/trr_1Pgc7BB7WZ01zgkWsU61ufNC'){
"amount": 1100,
"balance_transaction": null,
"created": 1234567890,
"currency": "usd",
"destination_payment_refund": null,
"id": "trr_1Pgc7BB7WZ01zgkWsU61ufNC",
"metadata": {},
"object": "transfer_reversal",
"source_refund": null,
"transfer": "tr_1Pgc7BB7WZ01zgkWVJfE40RX"
}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.