API Glossary

Brief explanation of each API call available on the Stripe Plugin

Fetch Account ID

Used to complete a Connect Session, you will need to use the workflow actions Stripe Connect Standard and SCA - Redirect before you use this one. Make sure you store the data outputted from this call as you need it later on.

Data variables: access_token, refresh_token, token_type, stripe_publishable_key, stripe_user_id, scope, livemode

Disconnect Account

Allows you to revoke access to a connected account. You can do that on the app's platform or any other stripe account connected apps by specifying Stripe-Account as a parameter.

Create a Card Token

Allows you to create a token for a card to be used at a later stage for payments, subscriptions or metered usage plans.

Recommended to use SCA Checkout Session to comply with new regulations across Europe.

Create a Payment Intent

Ability to create a charge to be used at a later stage for payments. Use off_session if you want to collect payments without the customer being online.

When confirm=true is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call.

Recommended to use SCA Checkout Session to comply with new regulations across Europe.

Confirm a Payment Intent

Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.

Capture Payment Intent

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

GET Balance

Retrieve the balance on a platform's connected account. The authorization key is dynamic, so you can target any account and it's connected apps. This call is available as an action and data workflow.

SCA - Checkout Session

Save payment details to charge your customers later.

The Checkout Session is in setup mode and doesn’t require a payment at this time. Use SCA Checkout Subscription if the Checkout Session includes at least one recurring price/plan item.

SCA - Checkout Session Subscription

Use this call for subscription plans with fixed price or metered usage. For fixed pricing, you will need to specify the quantity.

SCA - Checkout Session Payment

To be used for one-time payments. Support for Connected Accounts.

Create a Direct Subscription

To create a subscription that directly charges on a connected account for existing customers. Use this call to create subscriptions for existing customers. You can also create subscriptions without specifying the Stripe-Account, both methods are supported.

Read more here: https://stripe.com/docs/connect/subscriptions#direct

Create a Destination Subscription

Create charges on the platform instead of the connected account, giving you more control on the Customers and Subscription plans. The destination needs to be a Connected Stripe Account.

For this to work, both the customer and the price must be defined on the platform account, and the connected account token must be created using the platform’s publishable key. If charging a customer, the customer must exist within the platform account. When using automatic transfers, the platform is the business of record.

Read more here: https://stripe.com/docs/connect/subscriptions#transfer

Cancel a Subscription

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription. Optionally also supports Connected Accounts or any other account.

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

The canceled Subscription object. Its subscription status will be set to canceled.

Get a Subscription

Retrieves the subscription with the given ID. Supports Connected Accounts. Action & Data workflow available.

Create a Usage Record

Specifically for metered usage plans. You will need to generate a timestamp to make this work. The calculation can be done by calculating the difference between the Current data and time - Jan 01 1970 in seconds, the second value is an Arbitrary time value in Bubble.

Valid values are increment (default) or set. When using increment the specified quantity will be added to the usage at the specified timestamp. The set action will overwrite the usage quantity at that timestamp. If the subscription has billing thresholds, increment is the only allowed value.

Resetting the count only works if you store the timestamp for that record and by setting action to set instead of increment. Test this carefully before you go live.

Create a Customer

Supports address lines and shipping details.

https://stripe.com/docs/api/customers/create

Delete a Customer

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

Create an Invoice Item

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

Create an Invoice using Direct Charges

To create an invoice that directly charges on a connected account, create an invoice while authenticated as the connected account. For this to work, the customer must be defined on the connected account.

Application fee on Invoice

Each cycle, subscriptions create invoices and invoices create charges. For more information about subscription cycles, see the subscription lifecycle. To charge a flat or dynamic fee that can’t be automatically calculated with application_fee_percent, add an application_fee_amount directly on each invoice created by the subscription.

To automatically charge an application_fee_amount, create a webhook that listens for the invoice.created event. You can also do this manually by creating an invoice for pending invoice items, and setting an application fee on it.

The application_fee_amount set directly on an invoice overrides any application fee amount calculated with application_fee_percent, and is capped at the invoice’s final charge amount.

Finalize Invoice

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

Create a Transfer

A Transfer object is created when you move funds between Stripe accounts as part of Connect.

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.

Use source_payment to transfer funds from pending payments and also to avoid exceeding the original payment amount.

Read more here: https://stripe.com/docs/api/transfers/object

Express - Create a login Linm

Creates a single-use login link for an Express account to access their Stripe dashboard. Use external navigation to open in a new tab or Bubble's built in navigate to external link.

{
"object": "login_link",
"created": 1613816187,
"url": "https://connect.stripe.com/express/IRmakRJmz3Bf",
"id": "lael_IyqCNIxyQGWZc8"
}

Create an account

When a user (seller or service provider) signs up on your platform, create a user Account (referred to as a connected account) so you can accept payments and move funds to their bank account. Connected accounts represent your users in the Stripe API and help collect the information required to verify the user’s identity. In our home-rental example, the connected account represents the homeowner.

Create an account Link

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

Create a Price

Creates a new price for an existing product. The price can be recurring or one-time.

Create a File

Upload files to Stripe with optional support for Connected accounts. This is an object representing a file hosted on Stripe's servers. The file may have been uploaded by yourself using the create file request (for example, when uploading dispute evidence) or it may have been created by Stripe (for example, the results of a Sigma scheduled query).

Create a link if you wish to send the URL.

Retrieve a file

Retrieve the details for files on Stripe using the file's ID.

List a Customer's Payment Methods

Returns a list of PaymentMethods for a given Customer with optional support for connected accounts.

Attach a PaymentMethod to a Customer

Attaches a PaymentMethod object to a Customer with support for connected accounts.

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the /v1/payment_methods/:id/attach endpoint does not ensure that future payments can be made with the attached PaymentMethod. See Optimizing cards for future payments for more information about setting up future payments.

To use this PaymentMethod as the default for invoice or subscription payments, set invoice_settings.default_payment_method, on the Customer to the PaymentMethod’s ID.

Detach a PaymentMethod from a Customer

Detaches a PaymentMethod object from a Customer.

Create a Manual Payout

As long as there are sufficient funds in the balance for the specified currency, Stripe automatically converts the funds to the default bank account’s currency.

https://stripe.com/docs/connect/currencies#converting-balances

Update Destination Payment

With this call you can update charge objects or destination payment descriptions for connected payments to Sellers. This is crucial for marketplace environments to display description tags on destination payments.