Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Get started with Connect
Integration fundamentals
Example integrations
Account management
Onboard accounts
Configure account Dashboards
Work with connected account types
Payment processing
Accept payments
    Create a charge
      Direct charges
        Fee configurations for connected accounts
        Reports for direct charge payment fees
        Share payment methods across multiple accounts
      Destination charges
      Separate charges and transfers
    Set statement descriptors
    Set MCCs
    Handle multiple currencies
    Create payment links with Connect
    Use Radar with Connect
    Disputes on Connect
    Create subscriptions
    Create invoices
    Multiple payment method configurations
    Embed the payment method settings component
    Account balance
Pay out to accounts
Platform administration
Manage your Connect platform
Tax forms for your Connect platform
HomePlatforms and marketplacesAccept paymentsCreate a charge

Create direct charges

Create charges directly on the connected account and collect fees.

Create direct charges when customers transact directly with a connected account, often unaware of your platform’s existence. With direct charges:

  • The payment appears as a charge on the connected account, not your platform’s account.
  • The connected account’s balance increases with every charge.
  • Your account balance increases with application fees from every charge.

This charge type is best suited for platforms providing software as a service. For example, Shopify provides tools for building online storefronts, and Thinkific enables educators to sell online courses.

Note

We recommend using direct charges for connected accounts that have access to the full Stripe Dashboard.

Integrate Stripe’s pre-built payment UI into the checkout of your Android app with the PaymentSheet class.

Set up Stripe
Server-side
Client-side

First, you need a Stripe account. Register now.

Server-side

This integration requires endpoints on your server that talk to the Stripe API. Use the official libraries for access to the Stripe API from your server:

Command Line
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
# Available as a gem sudo gem install stripe
Gemfile
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
# If you use bundler, you can add this line to your Gemfile gem 'stripe'

Client-side

The Stripe Android SDK is open source and fully documented.

To install the SDK, add stripe-android to the dependencies block of your app/build.gradle file:

build.gradle.kts
Kotlin
Groovy
No results
plugins { id("com.android.application") } android { ... } dependencies { // ... // Stripe Android SDK implementation("com.stripe:stripe-android:21.26.1") // Include the financial connections SDK to support US bank account as a payment method implementation("com.stripe:financial-connections:21.26.1") }

Note

For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.

Configure the SDK with your Stripe publishable key so that it can make requests to the Stripe API, such as in your Application subclass:

Kotlin
Java
No results
import com.stripe.android.PaymentConfiguration class MyApp : Application() { override fun onCreate() { super.onCreate() PaymentConfiguration.init( applicationContext,
"pk_test_TYooMQauvdEDq54NiTphI7jx"
) } }

Note

Use your test keys while you test and develop, and your live mode keys when you publish your app.

Add an endpoint
Server-side

Note

To display the PaymentSheet before you create a PaymentIntent, see Collect payment details before creating an Intent.

This integration uses three Stripe API objects:

  1. PaymentIntent: Stripe uses this to represent your intent to collect payment from a customer, tracking your charge attempts and payment state changes throughout the process.

  2. (Optional) Customer: To set up a payment method for future payments, you must attach it to a Customer. Create a Customer object when your customer creates an account with your business. If your customer is making a payment as a guest, you can create a Customer object before payment and associate it with your own internal representation of the customer’s account later.

  3. (Optional) Customer Ephemeral Key: Information on the Customer object is sensitive, and can’t be retrieved directly from an app. An ephemeral key grants the SDK temporary access to the Customer.

Note

If you never save cards to a Customer and don’t allow returning Customers to reuse saved cards, you can omit the Customer and Customer Ephemeral Key objects from your integration.

For security reasons, your app can’t create these objects. Instead, add an endpoint on your server that:

  1. Retrieves the Customer, or creates a new one.
  2. Creates an Ephemeral Key for the Customer.
  3. Creates a PaymentIntent with the amount, currency, and customer. You can also optionally include the automatic_payment_methods parameter. Stripe enables its functionality by default in the latest version of the API.
  4. Returns the Payment Intent’s client secret, the Ephemeral Key’s secret, the Customer’s id, and your publishable key to your app.

The payment methods shown to customers during the checkout process are also included on the PaymentIntent. You can let Stripe pull payment methods from your Dashboard settings or you can list them manually. Regardless of the option you choose, note that the currency passed in the PaymentIntent filters the payment methods shown to the customer. For example, if you pass eur on the PaymentIntent and have OXXO enabled in the Dashboard, OXXO won’t be shown to the customer because OXXO doesn’t support eur payments.

Unless your integration requires a code-based option for offering payment methods, Stripe recommends the automated option. This is because Stripe evaluates the currency, payment method restrictions, and other parameters to determine the list of supported payment methods. Payment methods that increase conversion and that are most relevant to the currency and customer’s location are prioritised.

Note

You can fork and deploy an implementation of this endpoint on CodeSandbox for testing.

You can manage payment methods from the Dashboard. Stripe handles the return of eligible payment methods based on factors such as the transaction’s amount, currency, and payment flow. The PaymentIntent is created using the payment methods you configured in the Dashboard. If you don’t want to use the Dashboard or if you want to specify payment methods manually, you can list them using the payment_method_types attribute.

Command Line
curl
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
# Create a Customer (use an existing Customer ID if this is a returning customer) curl https://api.stripe.com/v1/customers \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -X "POST" # Create an Ephemeral Key for the Customer curl https://api.stripe.com/v1/ephemeral_keys \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -H "Stripe-Version: 2025-08-27.basil" \ -X "POST" \ -d "customer"="{{CUSTOMER_ID}}" \ # Create a PaymentIntent curl https://api.stripe.com/v1/payment_intents \ -u
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
-X "POST" \ -d "customer"="{{CUSTOMER_ID}}" \ -d "amount"=1099 \ -d "currency"="eur" \ # In the latest version of the API, specifying the `automatic_payment_methods` parameter # is optional because Stripe enables its functionality by default. -d "automatic_payment_methods[enabled]"=true \ -d application_fee_amount="123" \

Integrate the payment sheet
Client-side

Before displaying the mobile Payment Element, your checkout page should:

  • Show the products being purchased and the total amount
  • Collect any required shipping information using the Address Element
  • Include a checkout button to present Stripe’s UI

Initialise a PaymentSheet instance inside onCreate of your checkout Activity, passing a method to handle the result.

import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import com.stripe.android.paymentsheet.PaymentSheet import com.stripe.android.paymentsheet.PaymentSheetResult @Composable fun App() { val paymentSheet = remember { PaymentSheet.Builder(::onPaymentSheetResult) }.build() } private fun onPaymentSheetResult(paymentSheetResult: PaymentSheetResult) { // implemented in the next steps }

Next, fetch the PaymentIntent client secret, Ephemeral Key secret, Customer ID, and publishable key from the endpoint you created in the previous step. Set the publishable key using PaymentConfiguration and store the others for use when you present the PaymentSheet.

import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue import androidx.compose.ui.platform.LocalContext import com.stripe.android.PaymentConfiguration import com.stripe.android.paymentsheet.PaymentSheet import com.stripe.android.paymentsheet.PaymentSheetResult @Composable fun App() { val paymentSheet = remember { PaymentSheet.Builder(::onPaymentSheetResult) }.build() val context = LocalContext.current var customerConfig by remember { mutableStateOf<PaymentSheet.CustomerConfiguration?>(null) } var paymentIntentClientSecret by remember { mutableStateOf<String?>(null) } LaunchedEffect(context) { // Make a request to your own server and retrieve payment configurations val networkResult = ... if (networkResult.isSuccess) { paymentIntentClientSecret = networkResult.paymentIntent customerConfig = PaymentSheet.CustomerConfiguration( id = networkResult.customer, ephemeralKeySecret = networkResult.ephemeralKey ) PaymentConfiguration.init(context, networkResult.publishableKey,
"{{CONNECTED_ACCOUNT_ID}}"
) } } } private fun onPaymentSheetResult(paymentSheetResult: PaymentSheetResult) { // implemented in the next steps }

When the customer taps your checkout button, call presentWithPaymentIntent to present the payment sheet. After the customer completes the payment, the sheet dismisses and the PaymentSheetResultCallback is called with a PaymentSheetResult.

import androidx.compose.material.Button import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.platform.LocalContext import com.stripe.android.PaymentConfiguration import com.stripe.android.paymentsheet.PaymentSheet import com.stripe.android.paymentsheet.PaymentSheetResult @OptIn(ExperimentalCustomerSessionApi::class) @Composable fun App() { val paymentSheet = remember { PaymentSheet.Builder(::onPaymentSheetResult) }.build() val context = LocalContext.current var customerConfig by remember { mutableStateOf<PaymentSheet.CustomerConfiguration?>(null) } var paymentIntentClientSecret by remember { mutableStateOf<String?>(null) } LaunchedEffect(context) { // Make a request to your own server and retrieve payment configurations val networkResult = ... if (networkResult.isSuccess) { paymentIntentClientSecret = networkResult.paymentIntent customerConfig = PaymentSheet.CustomerConfiguration( id = networkResult.customer, ephemeralKeySecret = networkResult.ephemeralKey ) PaymentConfiguration.init(context, networkResult.publishableKey,
"{{CONNECTED_ACCOUNT_ID}}"
) } } Button( onClick = { val currentConfig = customerConfig val currentClientSecret = paymentIntentClientSecret if (currentConfig != null && currentClientSecret != null) { presentPaymentSheet(paymentSheet, currentConfig, currentClientSecret) } } ) { Text("Checkout") } } private fun presentPaymentSheet( paymentSheet: PaymentSheet, customerConfig: PaymentSheet.CustomerConfiguration, paymentIntentClientSecret: String ) { paymentSheet.presentWithPaymentIntent( paymentIntentClientSecret, PaymentSheet.Configuration.Builder(merchantDisplayName = "My merchant name") .customer(customerConfig) // Set `allowsDelayedPaymentMethods` to true if your business handles // delayed notification payment methods like US bank accounts. .allowsDelayedPaymentMethods(true) .build() ) } private fun onPaymentSheetResult(paymentSheetResult: PaymentSheetResult) { when(paymentSheetResult) { is PaymentSheetResult.Canceled -> { print("Canceled") } is PaymentSheetResult.Failed -> { print("Error: ${paymentSheetResult.error}") } is PaymentSheetResult.Completed -> { // Display for example, an order confirmation screen print("Completed") } } }

Setting allowsDelayedPaymentMethods to true allows delayed notification payment methods like US bank accounts. For these payment methods, the final payment status isn’t known when the PaymentSheet completes, and instead succeeds or fails later. If you support these types of payment methods, inform the customer their order is confirmed and only fulfil their order (for example, ship their product) when the payment is successful.

Handle post-payment events
Server-side

Stripe sends a payment_intent.succeeded event when the payment completes. Use the Dashboard webhook tool or follow the webhook guide to receive these events and run actions, such as sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.

Listen for these events rather than waiting on a callback from the client. On the client, the customer could close the browser window or quit the app before the callback executes, and malicious clients could manipulate the response. Setting up your integration to listen for asynchronous events is what enables you to accept different types of payment methods with a single integration.

In addition to handling the payment_intent.succeeded event, we recommend handling these other events when collecting payments with the Payment Element:

EventDescriptionAction
payment_intent.succeededSent when a customer successfully completes a payment.Send the customer an order confirmation and fulfill their order.
payment_intent.processingSent when a customer successfully initiates a payment, but the payment has yet to complete. This event is most commonly sent when the customer initiates a bank debit. It’s followed by either a payment_intent.succeeded or payment_intent.payment_failed event in the future.Send the customer an order confirmation that indicates their payment is pending. For digital goods, you might want to fulfill the order before waiting for payment to complete.
payment_intent.payment_failedSent when a customer attempts a payment, but the payment fails.If a payment transitions from processing to payment_failed, offer the customer another attempt to pay.

Test the integration

Card numberScenarioHow to test
The card payment succeeds and doesn’t require authentication.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.
The card payment requires authentication.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.
The card is declined with a decline code like insufficient_funds.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.
The UnionPay card has a variable length of 13-19 digits.Fill in the credit card form using the credit card number with any expiry date, CVC, and postal code.

See Testing for additional information to test your integration.

OptionalEnable Google Pay

Set up your integration

To use Google Pay, first enable the Google Pay API by adding the following to the <application> tag of your AndroidManifest.xml:

AndroidManifest.xml
<application> ... <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" /> </application>

For more details, see Google Pay’s Set up Google Pay API for Android.

Add Google Pay

To add Google Pay to your integration, pass a PaymentSheet.GooglePayConfiguration with your Google Pay environment (production or test) and the country code of your business when initializing PaymentSheet.Configuration.

Kotlin
Java
No results
val googlePayConfiguration = PaymentSheet.GooglePayConfiguration( environment = PaymentSheet.GooglePayConfiguration.Environment.Test, countryCode = "US", currencyCode = "USD" // Required for Setup Intents, optional for Payment Intents ) val configuration = PaymentSheet.Configuration.Builder(merchantDisplayName = "My merchant name") .googlePay(googlePayConfiguration) .build()

Test Google Pay

Google allows you to make test payments through their Test card suite. The test suite supports using stripe test cards.

You can test Google Pay using a physical Android device. Make sure you have a device in a country where Google Pay is supported and log in to a Google account on your test device with a real card saved to Google Wallet.

OptionalCustomise the sheet

All customisation is configured using the PaymentSheet.Configuration object.

Appearance

Customise colours, fonts, and more to match the look and feel of your app by using the appearance API.

Payment method layout

Configure the layout of payment methods in the sheet using paymentMethodLayout. You can display them horizontally, vertically, or let Stripe optimise the layout automatically.

Kotlin
Java
No results
PaymentSheet.Configuration.Builder("Example, Inc.") .paymentMethodLayout(PaymentSheet.PaymentMethodLayout.Automatic) .build()

Collect users addresses

Collect local and international shipping or billing addresses from your customers using the Address Element.

Business display name

Specify a customer-facing business name by setting merchantDisplayName. By default, this is your app’s name.

Kotlin
Java
No results
PaymentSheet.Configuration.Builder( merchantDisplayName = "My app, Inc." ).build()

Dark mode

By default, PaymentSheet automatically adapts to the user’s system-wide appearance settings (light and dark mode). You can change this by setting light or dark mode on your app:

Kotlin
Java
No results
// force dark AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) // force light AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)

Default billing details

To set default values for billing details collected in the payment sheet, configure the defaultBillingDetails property. The PaymentSheet pre-populates its fields with the values that you provide.

Kotlin
Java
No results
val address = PaymentSheet.Address(country = "US") val billingDetails = PaymentSheet.BillingDetails( address = address, email = "foo@bar.com" ) val configuration = PaymentSheet.Configuration.Builder(merchantDisplayName = "Merchant, Inc.") .defaultBillingDetails(billingDetails) .build()

Configure collection of billing details

Use BillingDetailsCollectionConfiguration to specify how you want to collect billing details in the PaymentSheet.

You can collect your customer’s name, email, phone number, and address.

If you want to attach default billing details to the PaymentMethod object even when those fields aren’t collected in the UI, set billingDetailsCollectionConfiguration.attachDefaultsToPaymentMethod to true.

Kotlin
Java
No results
val billingDetails = PaymentSheet.BillingDetails( email = "foo@bar.com" ) val billingDetailsCollectionConfiguration = BillingDetailsCollectionConfiguration( attachDefaultsToPaymentMethod = true, name = BillingDetailsCollectionConfiguration.CollectionMode.Always, email = BillingDetailsCollectionConfiguration.CollectionMode.Never, address = BillingDetailsCollectionConfiguration.AddressCollectionMode.Full, ) val configuration = PaymentSheet.Configuration.Builder(merchantDisplayName = "Merchant, Inc.") .defaultBillingDetails(billingDetails) .billingDetailsCollectionConfiguration(billingDetailsCollectionConfiguration) .build()

Note

Consult with your legal counsel regarding laws that apply to collecting information. Only collect phone numbers if you need them for the transaction.

OptionalComplete payment in your UI

You can present Payment Sheet to only collect payment method details and complete the payment back in your app’s UI. This is useful if you have a custom buy button or require additional steps after payment details are collected.

Note

A sample integration is available on our GitHub.

  1. First, initialise PaymentSheet.FlowController instead of PaymentSheet using one of the Builder methods.
Android (Kotlin)
Android (Java)
No results
class CheckoutActivity : AppCompatActivity() { private lateinit var flowController: PaymentSheet.FlowController override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) flowController = PaymentSheet.FlowController.Builder( paymentResultCallback = ::onPaymentSheetResult, paymentOptionCallback = ::onPaymentOption, ).build(this) } }
  1. Next, call configureWithPaymentIntent with the Stripe object keys fetched from your back end and update your UI in the callback using getPaymentOption(). This contains an image and label representing the customer’s currently selected payment method.
Android (Kotlin)
Android (Java)
No results
flowController.configureWithPaymentIntent( paymentIntentClientSecret = paymentIntentClientSecret, configuration = PaymentSheet.Configuration.Builder("Example, Inc.") .customer(PaymentSheet.CustomerConfiguration( id = customerId, ephemeralKeySecret = ephemeralKeySecret )) .build() ) { isReady, error -> if (isReady) { // Update your UI using `flowController.getPaymentOption()` } else { // handle FlowController configuration failure } }
  1. Next, call presentPaymentOptions to collect payment details. When the customer finishes, the sheet is dismissed and calls the paymentOptionCallback passed earlier in create. Implement this method to update your UI with the returned paymentOption.
Android (Kotlin)
Android (Java)
No results
// ... flowController.presentPaymentOptions() // ... private fun onPaymentOption(paymentOption: PaymentOption?) { if (paymentOption != null) { paymentMethodButton.text = paymentOption.label paymentMethodButton.setCompoundDrawablesRelativeWithIntrinsicBounds( paymentOption.drawableResourceId, 0, 0, 0 ) } else { paymentMethodButton.text = "Select" paymentMethodButton.setCompoundDrawablesRelativeWithIntrinsicBounds( null, null, null, null ) } }
  1. Finally, call confirm to complete the payment. When the customer finishes, the sheet is dismissed and calls the paymentResultCallback passed earlier in create.
Android (Kotlin)
Android (Java)
No results
// ... flowController.confirmPayment() // ... private fun onPaymentSheetResult( paymentSheetResult: PaymentSheetResult ) { when (paymentSheetResult) { is PaymentSheetResult.Canceled -> { // Payment canceled } is PaymentSheetResult.Failed -> { // Payment Failed. See logcat for details or inspect paymentSheetResult.error } is PaymentSheetResult.Completed -> { // Payment Complete } } }

Setting allowsDelayedPaymentMethods to true allows delayed notification payment methods like US bank accounts. For these payment methods, the final payment status isn’t known when the PaymentSheet completes, and instead succeeds or fails later. If you support these types of payment methods, inform the customer their order is confirmed and only fulfil their order (for example, ship their product) when the payment is successful.

OptionalEnable additional payment methods

Navigate to Manage payment methods for your connected accounts in the Dashboard to configure which payment methods your connected accounts accept. Changes to default settings apply to all new and existing connected accounts.

Consult the following resources for payment method information:

  • A guide to payment methods to help you choose the correct payment methods for your platform.
  • Account capabilities to make sure your chosen payment methods work for your connected accounts.
  • Payment method and product support tables to make sure your chosen payment methods work for your Stripe products and payments flows.

For each payment method, you can select one of the following dropdown options:

On by defaultYour connected accounts accept this payment method during checkout. Some payment methods can only be off or blocked. This is because your connected accounts with access to the Stripe Dashboard must activate them in their settings page.
Off by defaultYour connected accounts don’t accept this payment method during checkout. If you allow your connected accounts with access to the Stripe Dashboard to manage their own payment methods, they have the ability to turn it on.
BlockedYour connected accounts don’t accept this payment method during checkout. If you allow your connected accounts with access to the Stripe Dashboard to manage their own payment methods, they don’t have the option to turn it on.
Dropdown options for payment methods, each showing an available option (blocked, on by default, off by default)

Payment method options

If you make a change to a payment method, you must click Review changes in the bottom bar of your screen and Save and apply to update your connected accounts.

Window that shows after clicking Save button with a list of what the user changed

Save window

Allow connected accounts to manage payment methods

Stripe recommends allowing your connected accounts to customise their own payment methods. This option allows each connected account with access to the Stripe Dashboard to view and update their Payment methods page. Only owners of the connected accounts can customise their payment methods. The Stripe Dashboard displays the set of payment method defaults you applied to all new and existing connected accounts. Your connected accounts can override these defaults, excluding payment methods you have blocked.

Tick the Account customisation tickbox to enable this option. You must click Review changes in the bottom bar of your screen and then select Save and apply to update this setting.

Screenshot of the tickbox to select when allowing connected owners to customise payment methods

Account customisation tickbox

Payment method capabilities

To allow your connected accounts to accept additional payment methods, you must make sure their connected accounts have active capabilities for each payment method. Most payment methods have the same verification requirements as the card_payments capability, with some restrictions and exceptions. The payment method capabilities table lists the payment methods that require additional verification over cards.

Navigate to the Connected account payment settings in the Dashboard to request capabilities on your new and existing connected accounts for each payment method and country combination.

Collect fees

When a payment is processed, your platform can take a portion of the transaction in the form of application fees. You can set application fee pricing in two ways:

  • Use the Platform Pricing Tool to set and test pricing rules. This no-code feature in the Stripe Dashboard is currently only available for platforms responsible for paying Stripe fees.
  • Set your pricing rules in-house, specifying application fees directly in a PaymentIntent. Fees set with this method override the pricing logic specified in the Platform Pricing Tool.

Your platform can take an application fee with the following limitations:

  • The value of application_fee_amount must be positive and less than the amount of the charge. The application fee collected is capped at the captured amount of the charge.
  • There are no additional Stripe fees on the application fee itself.
  • In line with Brazilian regulatory and compliance requirements, platforms based outside Brazil, with Brazilian connected accounts can’t collect application fees through Stripe.
  • The currency of application_fee_amount depends upon a few multiple currency factors.

The resulting charge’s balance transaction includes a detailed fee breakdown of both the Stripe and application fees. To provide a better reporting experience, an Application Fee is created after the fee is collected. Use the amount property on the application fee object for reporting. You can then access these objects with the Application Fees endpoint.

Earned application fees are added to your available account balance on the same schedule as funds from regular Stripe charges. Application fees are viewable in the Collected fees section of the Dashboard.

Caution

Application fees for direct charges are created asynchronously by default. If you expand the application_fee object in a charge creation request, the application fee is created synchronously as part of that request. Only expand the application_fee object if you must, because it increases the latency of the request.

To access the application fee objects for application fees that are created asynchronously, listen for the application_fee.created webhook event.

Flow of funds with fees

When you specify an application fee on a charge, the fee amount is transferred to your platform’s Stripe account. When processing a charge directly on the connected account, the charge amount—less the Stripe fees and application fee—is deposited into the connected account.

For example, if you make a charge of 10 USD with a 1.23 USD application fee (like in the previous example), 1.23 USD is transferred to your platform account. 8.18 USD (10 USD - 0.59 USD - 1.23 USD) is netted in the connected account (assuming standard US Stripe fees).

Flow of funds for a charge with an application fee

If you process payments in multiple currencies, read how currencies are handled in Connect.

Issue refunds

Just as platforms can create charges on connected accounts, they can also create refunds of charges on connected accounts. Create a refund using your platform’s secret key while authenticated as the connected account.

Application fees are not automatically refunded when issuing a refund. Your platform must explicitly refund the application fee or the connected account—the account on which the charge was created—loses that amount. You can refund an application fee by passing a refund_application_fee value of true in the refund request:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/refunds \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -H "Stripe-Account:
{{CONNECTED_ACCOUNT_ID}}
"
\ -d charge=
{{CHARGE_ID}}
\ -d refund_application_fee=true

By default, the entire charge is refunded, but you can create a partial refund by setting an amount value as a positive integer. If the refund results in the entire charge being refunded, the entire application fee is refunded. Otherwise, a proportional amount of the application fee is refunded. Alternatively, you can provide a refund_application_fee value of false and refund the application fee separately.

Connect embedded components

Connect embedded components support direct charges. By using the payments embedded component, you can let your connected accounts view payment information, capture charges, and manage disputes from within your site.

The following components display information for direct charges:

  • Payments component: Displays all of an account’s payments and disputes.

  • Payments details: Displays information for a specific payment.

  • Disputes list component: Displays all of an account’s disputes.

  • Disputes for a payment component: Displays the disputes for a single specified payment. You can use it to include dispute management functionality on a page with your payments UI.

See also

  • Working with multiple currencies
  • Statement descriptors with Connect
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Join our early access programme.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc