Merged
Conversation
Changed Files
|
jagan-jaya
requested changes
Sep 10, 2025
jagan-jaya
requested changes
Sep 10, 2025
jagan-jaya
requested changes
Sep 11, 2025
…into create-invoice-table
jagan-jaya
previously approved these changes
Sep 11, 2025
jagan-jaya
requested changes
Sep 18, 2025
jagan-jaya
requested changes
Sep 18, 2025
Contributor
|
We need an update interface for payment_intent_id as well @prajjwalkumar17 |
…into create-invoice-table
…into create-invoice-table
jarnura
requested changes
Sep 19, 2025
jarnura
requested changes
Sep 22, 2025
jarnura
approved these changes
Sep 22, 2025
jagan-jaya
approved these changes
Sep 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Description
This PR introduces the
invoicetable along with supporting models, queries, schema definitions, and storage interfaces.The goal is to enable subscription billing and payment tracking by storing invoices linked to merchants, customers, subscriptions, and connectors.
Key Features
Invoicetable with fields for subscription, connector, merchant, customer, amount, currency, status, and metadata.InvoiceStatusenum to represent invoice lifecycle stages (e.g.,PendingPayment,PaymentSucceeded,InvoicePaid, etc.).InvoiceNew,Invoice,InvoiceUpdate.InvoiceInterface).up.sql: createsinvoicetable and indexes (payment_intent_id,subscription_id,merchant_id + customer_id).down.sql: drops indexes and table.Motivation and Context
Schema Details
Table:
invoiceid(PK)subscription_idconnector_subscription_idmerchant_idprofile_idmerchant_connector_idpayment_intent_id(unique)payment_method_idcustomer_idamountcurrencystatusprovider_namemetadatacreated_atmodified_atIndexes
idx_payment_intent_ididx_subscription_ididx_merchant_customerHow did you test it?
This can't be tested as this is only creation of tables and their respective storage models.
Checklist
cargo +nightly fmt --allcargo clippy