ByteChef LogoByteChef

Stripe

Stripe is a payment processing platform that allows businesses to accept online payments and manage transactions securely.

Categories: Payment Processing

Type: stripe/v1


Connections

Version: 1

Bearer Token

Properties

NameLabelTypeDescriptionRequired
tokenTokenSTRINGtrue

Connection Setup

Find Token

  1. Navigate to Stripe dashboard.
  2. Click on Settings.
  3. Click on Developers.
  4. Click on Manage API Keys.
  5. Here you can se your API Key.
  6. Done 🚀.

Actions

Create Customer

Name: createCustomer

Creates a new customer.

Properties

NameLabelTypeDescriptionRequired
emailEmailSTRINGThe customer’s email address.false
nameNameSTRINGThe customer's full name.false
descriptionDescriptionSTRINGA description of the customer.false
phonePhoneSTRINGThe customer’s phone number.false
addressAddressOBJECT
Properties {STRING(city), STRING(country), STRING(line1), STRING(line2), STRING(postal_code), STRING(state)}
The customer's address.false

Example JSON Structure

{
  "label" : "Create Customer",
  "name" : "createCustomer",
  "parameters" : {
    "email" : "",
    "name" : "",
    "description" : "",
    "phone" : "",
    "address" : {
      "city" : "",
      "country" : "",
      "line1" : "",
      "line2" : "",
      "postal_code" : "",
      "state" : ""
    }
  },
  "type" : "stripe/v1/createCustomer"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGID of the customer.
descriptionSTRINGDescription of the customer.
emailSTRINGEmail address of the customer.
nameSTRINGThe customer's full name.
phoneSTRINGPhone number of the customer.
addressOBJECT
Properties {STRING(city), STRING(country), STRING(line1), STRING(line2), STRING(postal_code), STRING(state)}
Customer's address.

Output Example

{
  "id" : "",
  "description" : "",
  "email" : "",
  "name" : "",
  "phone" : "",
  "address" : {
    "city" : "",
    "country" : "",
    "line1" : "",
    "line2" : "",
    "postal_code" : "",
    "state" : ""
  }
}

Create Invoice

Name: createInvoice

Creates a new invoice.

Properties

NameLabelTypeDescriptionRequired
customerCustomer IDSTRINGID of the customer who will be billed.true
currencyCurrencySTRINGCurrency used for invoice.true
descriptionDescriptionSTRINGDescription for the invoice.false

Example JSON Structure

{
  "label" : "Create Invoice",
  "name" : "createInvoice",
  "parameters" : {
    "customer" : "",
    "currency" : "",
    "description" : ""
  },
  "type" : "stripe/v1/createInvoice"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGID of the invoice.
customerSTRINGID of the customer who will be billed.
currencySTRINGCurrency used for invoice.
descriptionSTRINGDescription for the invoice.

Output Example

{
  "id" : "",
  "customer" : "",
  "currency" : "",
  "description" : ""
}

Find Customer ID

To find the Customer ID, click here.

Create Payout

Name: createPayout

Create a payout.

Properties

NameLabelTypeDescriptionRequired
amountAmountINTEGERA positive integer in cents representing how much to payout.true
currencyCurrencySTRINGThree-letter ISO currency code in lowercase. Must be a currency supported by Stripe.true
methodMethodSTRING
Options instant, standard
The method used to send this payout, which is standard or instant.false
metadataMetadataOBJECT
Properties {}
Set 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.false

Example JSON Structure

{
  "label" : "Create Payout",
  "name" : "createPayout",
  "parameters" : {
    "amount" : 1,
    "currency" : "",
    "method" : "",
    "metadata" : { }
  },
  "type" : "stripe/v1/createPayout"
}

Output

Type: OBJECT

Properties

NameTypeDescription
amountINTEGERThe amount (in cents (or local equivalent)) that transfers to your bank account or debit card.
arrival_dateINTEGERDate that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.
automaticBOOLEAN
Options true, false
Returns true if the payout is created by an automated payout schedule and false if it's requested manually.
createdINTEGERTime at which the object was created.
currencySTRINGThree-letter ISO currency code in lowercase.
idSTRINGUnique identifier for the object.
livemodeBOOLEAN
Options true, false
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
methodSTRINGThe method used to send this payout, which can be standard or instant.
objectSTRINGString representing the object's type. Objects of the same type share the same value.
reconciliation_statusSTRINGIf completed, you can use the Balance Transactions API to list all balance transactions that are paid out in this payout.
source_typeSTRINGThe source balance this payout came from, which can be one of the following: card, fpx or bank_account.
statusSTRINGCurrent status of the payout.
typeSTRINGCan be bank_account or card.

Output Example

{
  "amount" : 1,
  "arrival_date" : 1,
  "automatic" : false,
  "created" : 1,
  "currency" : "",
  "id" : "",
  "livemode" : false,
  "method" : "",
  "object" : "",
  "reconciliation_status" : "",
  "source_type" : "",
  "status" : "",
  "type" : ""
}

Create Subscription

Name: createSubscription

Creates a new subscription.

Properties

NameLabelTypeDescriptionRequired
customerCustomer IDSTRINGID of the customer to subscribe.true
itemsItemsARRAY
Items [{STRING(price), STRING(coupon), INTEGER(quantity)}]
A list of up to 20 subscription items.true
collection_methodCollection MethodSTRING
Options charge_automatically, send_invoice
When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.false
days_until_dueDays Until DueINTEGERNumber of days a customer has to pay invoices generated by this subscription.true
default_payment_methodDefault Payment MethodSTRING
Depends On customer
ID of the default payment method for the subscription. It must belong to the customer associated with the subscription.false
metadatanullOBJECT
Properties {}
Set of key-value pairs that you can attach to an object.false

Example JSON Structure

{
  "label" : "Create Subscription",
  "name" : "createSubscription",
  "parameters" : {
    "customer" : "",
    "items" : [ {
      "price" : "",
      "coupon" : "",
      "quantity" : 1
    } ],
    "collection_method" : "",
    "days_until_due" : 1,
    "default_payment_method" : "",
    "metadata" : { }
  },
  "type" : "stripe/v1/createSubscription"
}

Output

Type: OBJECT

Properties

NameTypeDescription
automatic_taxOBJECT
Properties {}
Tax rates that apply to automatic tax calculations.
billing_cycle_anchorINTEGERThe reference point that aligns future billing cycle dates.
billing_modeOBJECT
Properties {}
Billing mode of the subscription.
cancel_at_period_endBOOLEAN
Options true, false
Whether this subscription is cancel at the end of the current billing period.
collection_methodSTRINGWhen charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.
createdINTEGERTime at which the object was created.
currencySTRINGThree-letter ISO currency code in lowercase.
customerSTRINGID of the customer who owns the subscription.
discountsARRAY
Items [STRING]
The discounts applied to the subscription.
idSTRINGUnique identifier for the object.
invoice_settingsOBJECT
Properties {}
Invoice settings for the subscription.
itemsOBJECT
Properties {[{}](data), BOOLEAN(has_more), STRING(object), STRING(url)}
List of subscription items, each with an attached price.
livemodeBOOLEAN
Options true, false
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
metadataOBJECT
Properties {}
Set of key-value pairs that you can attach to an object.
objectSTRINGString representing the object's type. Objects of the same type share the same value.
start_dateINTEGERDate when the subscription was first created.
statusSTRINGStatus of the subscription.

Output Example

{
  "automatic_tax" : { },
  "billing_cycle_anchor" : 1,
  "billing_mode" : { },
  "cancel_at_period_end" : false,
  "collection_method" : "",
  "created" : 1,
  "currency" : "",
  "customer" : "",
  "discounts" : [ "" ],
  "id" : "",
  "invoice_settings" : { },
  "items" : {
    "data" : [ { } ],
    "has_more" : false,
    "object" : "",
    "url" : ""
  },
  "livemode" : false,
  "metadata" : { },
  "object" : "",
  "start_date" : 1,
  "status" : ""
}

Find Customer ID

To find the Customer ID, click here.

Find Price ID

To find the Price ID, click here.

Find Coupon ID

To find the Coupon ID, click here.

Find Default Payment Method

To find the Default Payment Method, click here.

Update Subscription

Name: updateSubscription

Updates an existing subscription.

Properties

NameLabelTypeDescriptionRequired
customerCustomer IDSTRINGID of the customer to subscribe.true
subscriptionSubscription IDSTRING
Depends On customer
Unique identifier of the subscription to update.true
itemsItemsARRAY
Items [{STRING(price), STRING(coupon), INTEGER(quantity)}]
A list of up to 20 subscription items.false
collection_methodCollection MethodSTRING
Options charge_automatically, send_invoice
When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.false
days_until_dueDays Until DueINTEGERNumber of days a customer has to pay invoices generated by this subscription.true
default_payment_methodDefault Payment MethodSTRING
Depends On customer
ID of the default payment method for the subscription. It must belong to the customer associated with the subscription.false
metadatanullOBJECT
Properties {}
Set of key-value pairs that you can attach to an object.false

Example JSON Structure

{
  "label" : "Update Subscription",
  "name" : "updateSubscription",
  "parameters" : {
    "customer" : "",
    "subscription" : "",
    "items" : [ {
      "price" : "",
      "coupon" : "",
      "quantity" : 1
    } ],
    "collection_method" : "",
    "days_until_due" : 1,
    "default_payment_method" : "",
    "metadata" : { }
  },
  "type" : "stripe/v1/updateSubscription"
}

Output

Type: OBJECT

Properties

NameTypeDescription
automatic_taxOBJECT
Properties {}
Tax rates that apply to automatic tax calculations.
billing_cycle_anchorINTEGERThe reference point that aligns future billing cycle dates.
billing_modeOBJECT
Properties {}
Billing mode of the subscription.
cancel_at_period_endBOOLEAN
Options true, false
Whether this subscription is cancel at the end of the current billing period.
collection_methodSTRINGWhen charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active.
createdINTEGERTime at which the object was created.
currencySTRINGThree-letter ISO currency code in lowercase.
customerSTRINGID of the customer who owns the subscription.
discountsARRAY
Items [STRING]
The discounts applied to the subscription.
idSTRINGUnique identifier for the object.
invoice_settingsOBJECT
Properties {}
Invoice settings for the subscription.
itemsOBJECT
Properties {[{}](data), BOOLEAN(has_more), STRING(object), STRING(url)}
List of subscription items, each with an attached price.
livemodeBOOLEAN
Options true, false
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
metadataOBJECT
Properties {}
Set of key-value pairs that you can attach to an object.
objectSTRINGString representing the object's type. Objects of the same type share the same value.
start_dateINTEGERDate when the subscription was first created.
statusSTRINGStatus of the subscription.

Output Example

{
  "automatic_tax" : { },
  "billing_cycle_anchor" : 1,
  "billing_mode" : { },
  "cancel_at_period_end" : false,
  "collection_method" : "",
  "created" : 1,
  "currency" : "",
  "customer" : "",
  "discounts" : [ "" ],
  "id" : "",
  "invoice_settings" : { },
  "items" : {
    "data" : [ { } ],
    "has_more" : false,
    "object" : "",
    "url" : ""
  },
  "livemode" : false,
  "metadata" : { },
  "object" : "",
  "start_date" : 1,
  "status" : ""
}

Find Customer ID

To find the Customer ID, click here.

Find Subscription ID

To find the Subscription ID, click here.

Find Price ID

To find the Price ID, click here.

Find Coupon ID

To find the Coupon ID, click here.

Find Default Payment Method

To find the Default Payment Method, click here.

Triggers

New Customer

Name: newCustomer

Triggers when a new customer is created.

Type: DYNAMIC_WEBHOOK

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGID of the customer.
objectSTRINGValue is 'customer'.
descriptionSTRINGDescription of the customer.
emailSTRINGEmail of the customer.
nameSTRINGName of the customer.
phoneSTRINGPhone number of the customer.
addressOBJECT
Properties {STRING(city), STRING(country), STRING(line1), STRING(line2), STRING(postal_code), STRING(state)}
Address of the customer.

JSON Example

{
  "label" : "New Customer",
  "name" : "newCustomer",
  "type" : "stripe/v1/newCustomer"
}

New Invoice

Name: newInvoice

Triggers on a new invoice.

Type: DYNAMIC_WEBHOOK

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGID of the invoice.
objectSTRINGValue is 'invoice'.
currencySTRINGCurrency of the invoice.
customerSTRINGID of the customer who will be billed.
customer_nameSTRINGName of the customer who will be billed.
descriptionSTRINGDescription of the invoice.

JSON Example

{
  "label" : "New Invoice",
  "name" : "newInvoice",
  "type" : "stripe/v1/newInvoice"
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find Customer ID

  • Method 1: Via API

Use the GET /customers endpoint to retrieve a list of all customers and their IDs.

  • Method 2: Via UI

Open your Stripe dashboard and on the left bar your will find Customers. Open the customer you want and you can find Customer ID under Details on the right. If you see Account ID instead of Customer ID, you can click three dots next to the ID and there you have Copy customer ID button.

The Customer ID can also be found in the output of the following actions and triggers:

  • Create Customer
  • Create Invoice
  • Create Subscription
  • Update Subscription
  • New Customer trigger
  • New Invoice trigger

How to find Price ID

  • Method 1: Via API

Use the GET /prices endpoint to retrieve a list of all prices and their IDs.

  • Method 2: Via UI

Open your Stripe dashboard and on the left bar your will find Product catalog. There is an Export prices button that downloads a file with all prices.

How to find Coupon ID

  • Method 1: Via API

Use the GET /coupons endpoint to retrieve a list of all coupons and their IDs.

  • Method 2: Via UI

Open your Stripe dashboard and on the left bar your will find Product catalog. Below the title you will find a Coupons tab. Enter the coupon you want and you will ID under Details.

How to find Default Payment Method

  • Method 1: Via API

Use the GET /customers/CUSTOMER_ID/payment_methods endpoint to retrieve a list of all payment methods and their IDs.

  • Method 2: Via UI

Open your Stripe dashboard and on the left bar your will find Customers. Open the customer you want and under Payment methods you will find list of payment methods. Find the one you want to use, click on three dots on the right and there you will find a button Copy ID.

How to find Subscription ID

  • Method 1: Via API

Use the GET /subscriptions endpoint to retrieve a list of all subscriptions and their IDs.

  • Method 2: Via UI

Open your Stripe dashboard and on the left bar your will find Subscriptions. Open the subscription you want and you can find ID under Details on the right.

The Subscription ID can also be found in the output of the following actions:

  • Create Subscription
  • Update Subscription

How is this guide?

Last updated on

On this page