Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update stripe wrappers with more tables (#29141)

Joshen Lim9110cb827f37
diff --git a/apps/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts b/apps/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts
index ea2a797f080..aebebdeb0d4 100644
--- a/apps/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts
+++ b/apps/studio/components/interfaces/Database/Wrappers/Wrappers.constants.ts
@@ -239,6 +239,50 @@ export const WRAPPERS: WrapperMeta[] = [
},
],
},
+ {
+ label: 'Checkout Sessions',
+ description:
+ "Customer's session as they pay for one-time purchases or subscriptions through Checkout or Payment Links",
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'customer',
+ type: 'text',
+ },
+ {
+ name: 'payment_intent',
+ type: 'text',
+ },
+ {
+ name: 'subscription',
+ type: 'text',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'checkout/sessions',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ {
+ name: 'rowid_column',
+ label: 'Row ID Column',
+ defaultValue: 'id',
+ editable: true,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
{
label: 'Customers',
description: 'Customers on your Stripe account',
@@ -248,13 +292,479 @@ export const WRAPPERS: WrapperMeta[] = [
type: 'text',
},
{
- name: 'email',
+ name: 'email',
+ type: 'text',
+ },
+ {
+ name: 'name',
+ type: 'text',
+ },
+ {
+ name: 'description',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'customers',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ {
+ name: 'rowid_column',
+ label: 'Row ID Column',
+ defaultValue: 'id',
+ editable: true,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Disputes',
+ description: 'When a customer questions your charge with their card issuer',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'amount',
+ type: 'bigint',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'charge',
+ type: 'text',
+ },
+ {
+ name: 'payment_intent',
+ type: 'text',
+ },
+ {
+ name: 'reason',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'disputes',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Events',
+ description:
+ "Stripe's way of letting you know when something interesting happens in your account",
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'type',
+ type: 'text',
+ },
+ {
+ name: 'api_version',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'events',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Files',
+ description: "Files that are hosted on Stripe's servers",
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'filename',
+ type: 'text',
+ },
+ {
+ name: 'purpose',
+ type: 'text',
+ },
+ {
+ name: 'title',
+ type: 'text',
+ },
+ {
+ name: 'size',
+ type: 'bigint',
+ },
+ {
+ name: 'type',
+ type: 'text',
+ },
+ {
+ name: 'url',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'expires_at',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'files',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'File Links',
+ description: 'For sharing contents of a File object with non-Stripe users',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'file',
+ type: 'text',
+ },
+ {
+ name: 'url',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'expired',
+ type: 'bool',
+ },
+ {
+ name: 'expires_at',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'file_links',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Invoices',
+ description: 'Invoices on your Stripe account',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'customer',
+ type: 'text',
+ },
+ {
+ name: 'subscription',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'total',
+ type: 'bigint',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'period_start',
+ type: 'timestamp',
+ },
+ {
+ name: 'period_end',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'invoices',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Mandates',
+ description:
+ 'Records of the permission a customer has given you to debit their payment method',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'payment_method',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'type',
+ type: 'text',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'mandates',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Payment Intents',
+ description: 'Payment Intents on your Stripe account',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'customer',
+ type: 'text',
+ },
+ {
+ name: 'amount',
+ type: 'bigint',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'payment_method',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'payment_intents',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Payouts',
+ description:
+ 'Created when you receive funds from Stripe, or when you initiate a payout to either a bank account or debit card',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'amount',
+ type: 'bigint',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'arrival_date',
+ type: 'timestamp',
+ },
+ {
+ name: 'description',
+ type: 'text',
+ },
+ {
+ name: 'statement_descriptor',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'payouts',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Prices',
+ description:
+ 'A Price object is needed for all your products to facilitate multiple currencies and pricing options',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'active',
+ type: 'bool',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'product',
+ type: 'text',
+ },
+ {
+ name: 'unit_amount',
+ type: 'bigint',
+ },
+ {
+ name: 'type',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'prices',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Products',
+ description: 'Products on your Stripe account',
+ availableColumns: [
+ {
+ name: 'id',
type: 'text',
},
{
name: 'name',
type: 'text',
},
+ {
+ name: 'active',
+ type: 'bool',
+ },
+ {
+ name: 'default_price',
+ type: 'text',
+ },
{
name: 'description',
type: 'text',
@@ -263,6 +773,10 @@ export const WRAPPERS: WrapperMeta[] = [
name: 'created',
type: 'timestamp',
},
+ {
+ name: 'updated',
+ type: 'timestamp',
+ },
{
name: 'attrs',
type: 'jsonb',
@@ -271,7 +785,7 @@ export const WRAPPERS: WrapperMeta[] = [
options: [
{
name: 'object',
- defaultValue: 'customers',
+ defaultValue: 'products',
editable: false,
required: true,
type: 'text',
@@ -287,39 +801,40 @@ export const WRAPPERS: WrapperMeta[] = [
],
},
{
- label: 'Invoices',
- description: 'Invoices on your Stripe account',
+ label: 'Refunds',
+ description:
+ 'Allows you to refund a charge that has previously been created but not yet refunded',
availableColumns: [
{
name: 'id',
type: 'text',
},
{
- name: 'customer',
- type: 'text',
+ name: 'amount',
+ type: 'bigint',
},
{
- name: 'subscription',
+ name: 'currency',
type: 'text',
},
{
- name: 'status',
+ name: 'charge',
type: 'text',
},
{
- name: 'total',
- type: 'bigint',
+ name: 'payment_intent',
+ type: 'text',
},
{
- name: 'currency',
+ name: 'reason',
type: 'text',
},
{
- name: 'period_start',
- type: 'timestamp',
+ name: 'status',
+ type: 'text',
},
{
- name: 'period_end',
+ name: 'created',
type: 'timestamp',
},
{
@@ -330,7 +845,7 @@ export const WRAPPERS: WrapperMeta[] = [
options: [
{
name: 'object',
- defaultValue: 'invoices',
+ defaultValue: 'refunds',
editable: false,
required: true,
type: 'text',
@@ -338,29 +853,41 @@ export const WRAPPERS: WrapperMeta[] = [
],
},
{
- label: 'Payment Intents',
- description: 'Payment Intents on your Stripe account',
+ label: 'Setup Attempts',
+ description: 'Attempted confirmations of a SetupIntent, either successful or unsuccessful',
availableColumns: [
{
name: 'id',
type: 'text',
},
{
- name: 'customer',
+ name: 'application',
type: 'text',
},
{
- name: 'amount',
- type: 'bigint',
+ name: 'customer',
+ type: 'text',
},
{
- name: 'currency',
+ name: 'on_behalf_of',
type: 'text',
},
{
name: 'payment_method',
type: 'text',
},
+ {
+ name: 'setup_intent',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'usage',
+ type: 'text',
+ },
{
name: 'created',
type: 'timestamp',
@@ -373,7 +900,7 @@ export const WRAPPERS: WrapperMeta[] = [
options: [
{
name: 'object',
- defaultValue: 'payment_intents',
+ defaultValue: 'setup_attempts',
editable: false,
required: true,
type: 'text',
@@ -381,27 +908,36 @@ export const WRAPPERS: WrapperMeta[] = [
],
},
{
- label: 'Products',
- description: 'Products on your Stripe account',
+ label: 'Setup Intents',
+ description:
+ "Guides you through the process of setting up and saving a customer's payment credentials for future payments",
availableColumns: [
{
name: 'id',
type: 'text',
},
{
- name: 'name',
+ name: 'client_secret',
type: 'text',
},
{
- name: 'active',
- type: 'bool',
+ name: 'customer',
+ type: 'text',
},
{
- name: 'default_price',
+ name: 'description',
type: 'text',
},
{
- name: 'description',
+ name: 'payment_method',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'usage',
type: 'text',
},
{
@@ -409,7 +945,42 @@ export const WRAPPERS: WrapperMeta[] = [
type: 'timestamp',
},
{
- name: 'updated',
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'setup_intents',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Subscriptions',
+ description: 'Subscriptions on your Stripe account',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'customer',
+ type: 'text',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'current_period_start',
+ type: 'timestamp',
+ },
+ {
+ name: 'current_period_end',
type: 'timestamp',
},
{
@@ -420,7 +991,7 @@ export const WRAPPERS: WrapperMeta[] = [
options: [
{
name: 'object',
- defaultValue: 'products',
+ defaultValue: 'subscriptions',
editable: false,
required: true,
type: 'text',
@@ -436,8 +1007,9 @@ export const WRAPPERS: WrapperMeta[] = [
],
},
{
- label: 'Subscriptions',
- description: 'Subscriptions on your Stripe account',
+ label: 'Tokens',
+ description:
+ 'Tokenization is the process Stripe uses to collect sensitive card or bank account details in a secure manner',
availableColumns: [
{
name: 'id',
@@ -467,16 +1039,94 @@ export const WRAPPERS: WrapperMeta[] = [
options: [
{
name: 'object',
- defaultValue: 'subscriptions',
+ defaultValue: 'tokens',
editable: false,
required: true,
type: 'text',
},
+ ],
+ },
+ {
+ label: 'Top-ups',
+ description: 'To top up your Stripe balance',
+ availableColumns: [
{
- name: 'rowid_column',
- label: 'Row ID Column',
- defaultValue: 'id',
- editable: true,
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'amount',
+ type: 'bigint',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'description',
+ type: 'text',
+ },
+ {
+ name: 'status',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'topups',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Transfers',
+ description: 'When moving funds between Stripe accounts as part of Connect',
+ availableColumns: [
+ {
+ name: 'id',
+ type: 'text',
+ },
+ {
+ name: 'amount',
+ type: 'bigint',
+ },
+ {
+ name: 'currency',
+ type: 'text',
+ },
+ {
+ name: 'description',
+ type: 'text',
+ },
+ {
+ name: 'destination',
+ type: 'text',
+ },
+ {
+ name: 'created',
+ type: 'timestamp',
+ },
+ {
+ name: 'attrs',
+ type: 'jsonb',
+ },
+ ],
+ options: [
+ {
+ name: 'object',
+ defaultValue: 'transfers',
+ editable: false,
required: true,
type: 'text',
},