From 8549eab863a273c3e8a2098f4e0731448b09e3e4 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Mon, 19 Feb 2024 12:54:43 +0100 Subject: [PATCH] payment intent source docs --- models/staging/stripe/_stripe_sources.yml | 117 ++++++++++++--------- models/staging/stripe/stripe_doc_blocks.md | 12 +++ 2 files changed, 81 insertions(+), 48 deletions(-) diff --git a/models/staging/stripe/_stripe_sources.yml b/models/staging/stripe/_stripe_sources.yml index 0e8bee4..6950fed 100644 --- a/models/staging/stripe/_stripe_sources.yml +++ b/models/staging/stripe/_stripe_sources.yml @@ -135,10 +135,10 @@ sources: description: "Whether the charge has been disputed." - name: livemode data_type: boolean - description: "Has the value true if the object exists in live mode or the value false if the object exists in test mode." + description: "{{ doc('stripe_livemode_desc') }}" - name: metadata data_type: jsonb - description: "Additional properties supplied by Superhog." + description: "{{ doc('stripe_metadata_desc') }}" - name: refunded data_type: boolean description: "Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false." @@ -240,142 +240,163 @@ sources: description: "{{ doc('_airbyte_meta_desc') }}" - name: payment_intents identifier: payment_intents + description: | + A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session. + + A PaymentIntent transitions through multiple statuses throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge. + + You can read more about this object here: https://docs.stripe.com/api/payment_intents. columns: - name: id data_type: character varying - description: "" + description: "{{ doc('generic_id_desc') }}" - name: amount data_type: bigint - description: "" + description: "Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99)." - name: object data_type: character varying - description: "" + description: "Silly column. The value is always `payment_intent`." - name: review data_type: character varying - description: "" + description: "ID of the review associated with this PaymentIntent, if any." - name: source data_type: character varying - description: "" + description: "{{ doc('field_docs_na_desc') }}" - name: status data_type: character varying - description: "" + description: "Status of this PaymentIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled, or succeeded. Read more about each PaymentIntent status." - name: charges data_type: jsonb - description: "" + description: "{{ doc('field_docs_na_desc') }}" - name: created data_type: bigint - description: "" + description: "{{ doc('stripe_created_desc') }}" - name: invoice data_type: character varying - description: "" + description: "ID of the invoice that created this PaymentIntent, if it exists." - name: updated data_type: bigint - description: "" + description: "{{ doc('stripe_created_desc')}}" - name: currency data_type: character varying - description: "" + description: "{{ doc('stripe_currency_desc') }}" - name: customer data_type: character varying - description: "" + description: | + "ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If present in combination with setup_future_usage, this PaymentIntent’s payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete." - name: livemode data_type: boolean - description: "" + description: "{{ doc('stripe_livemode_desc') }}" - name: metadata data_type: jsonb - description: "" + description: "{{ doc('stripe_metadata_desc') }}" - name: shipping data_type: jsonb - description: "" + description: "Shipping information for the charge." - name: processing data_type: jsonb - description: "" + description: "If present, this property tells you about the processing state of the payment." - name: application data_type: character varying - description: "" + description: "ID of the Connect application that created the PaymentIntent." - name: canceled_at data_type: bigint - description: "" + description: "Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch." - name: description data_type: character varying - description: "" + description: "An arbitrary string attached to the object. Often useful for displaying to users." - name: next_action data_type: jsonb - description: "" + description: "If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source." - name: on_behalf_of data_type: character varying - description: "" + description: "The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details." - name: client_secret data_type: character varying - description: "" + description: | + "The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. + + The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + + Refer to our docs to accept a payment and learn about how client_secret should be handled." - name: latest_charge data_type: character varying - description: "" + description: "The latest charge created by this PaymentIntent." - name: receipt_email data_type: character varying - description: "" + description: "Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings." - name: transfer_data data_type: jsonb - description: "" + description: "The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for connected accounts." - name: amount_details data_type: jsonb - description: "" + description: "Details about items that the amount includes." - name: capture_method data_type: character varying - description: "" + description: "Controls when the funds will be captured from the customer’s account. One of: automatic, automatic_async, manual." - name: payment_method data_type: character varying - description: "" + description: "ID of the payment method used in this PaymentIntent." - name: transfer_group data_type: character varying - description: "" + description: "A string that identifies the resulting payment as part of a group. Learn more about the use case for connected accounts." - name: amount_received data_type: bigint - description: "" + description: "Amount that this PaymentIntent collects." - name: amount_capturable data_type: bigint - description: "" + description: "Amount that can be captured from this PaymentIntent." - name: last_payment_error data_type: jsonb - description: "" + description: "The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason." - name: setup_future_usage data_type: character varying - description: "" + description: | + "Indicates that you intend to make future payments with this PaymentIntent’s payment method. + + Providing this parameter will attach the payment method to the PaymentIntent’s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes. + + When processing card payments, Stripe also uses setup_future_usage to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA." - name: cancellation_reason data_type: character varying - description: "" + description: "Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic)." - name: confirmation_method data_type: character varying - description: "" + description: "Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment." - name: payment_method_types data_type: jsonb - description: "" + description: "The list of payment method types (e.g. card) that this PaymentIntent is allowed to use." - name: statement_descriptor data_type: character varying - description: "" + description: "For card charges, use statement_descriptor_suffix. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. It must contain at least one letter and be 1–22 characters long." - name: statement_description data_type: character varying - description: "" + description: "{{ doc('field_docs_na_desc') }}" - name: application_fee_amount data_type: bigint - description: "" + description: "The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner’s Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts." - name: payment_method_options data_type: jsonb - description: "" + description: "Payment method-specific configuration for this PaymentIntent." - name: automatic_payment_methods data_type: jsonb - description: "" + description: "When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent’s other parameters." - name: statement_descriptor_suffix data_type: character varying - description: "" + description: "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. The concatenated descriptor must contain 1-22 characters." - name: payment_method_configuration_details data_type: jsonb - description: "" + description: "{{ doc('field_docs_na_desc') }}" - name: _airbyte_raw_id data_type: character varying - description: "" + description: "{{ doc('_airbyte_raw_id_desc') }}" - name: _airbyte_extracted_at data_type: timestamp with time zone - description: "" + description: "{{ doc('_airbyte_extracted_at_desc') }}" - name: _airbyte_meta data_type: jsonb - description: "" \ No newline at end of file + description: "{{ doc('_airbyte_meta_desc') }}" \ No newline at end of file diff --git a/models/staging/stripe/stripe_doc_blocks.md b/models/staging/stripe/stripe_doc_blocks.md index 44a63b4..a8c073c 100644 --- a/models/staging/stripe/stripe_doc_blocks.md +++ b/models/staging/stripe/stripe_doc_blocks.md @@ -15,3 +15,15 @@ Time at which the object was last updated. Measured in seconds since the Unix ep Three-letter ISO currency code, in lowercase. Must be a supported currency. {% enddocs %} + +{% docs stripe_livemode_desc %} + +Has the value true if the object exists in live mode or the value false if the object exists in test mode." + +{% enddocs %} + +{% docs stripe_metadata_desc %} + +Additional properties supplied by Superhog. + +{% enddocs %}