├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── assets └── banner.png ├── composer.json ├── phpunit.xml ├── src └── Stripe.php └── tests ├── ArchitectureTest.php └── StripeTest.php /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: composer 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | timezone: Europe/London 8 | time: "09:00" 9 | open-pull-requests-limit: 5 10 | reviewers: 11 | - JonPurvis 12 | labels: 13 | - dependency 14 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: ['push', 'pull_request'] 4 | 5 | jobs: 6 | pest: 7 | runs-on: ubuntu-latest 8 | container: 9 | image: kirschbaumdevelopment/laravel-test-runner:8.2 10 | 11 | steps: 12 | - uses: actions/checkout@v1 13 | with: 14 | fetch-depth: 1 15 | 16 | - name: Install composer dependencies 17 | run: | 18 | composer install --no-scripts 19 | 20 | - name: Run Testsuite 21 | run: vendor/bin/pest -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | composer.lock 2 | vendor 3 | .idea 4 | .phpunit.cache -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 jp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![FakerPHP Stripe ID Provider Banner](assets/banner.png) 2 | 3 | # FakerPHP Stripe ID Provider 4 | 5 | ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jonpurvis/faker-stripe/ci.yml) 6 | ![GitHub last commit](https://img.shields.io/github/last-commit/jonpurvis/faker-stripe) 7 | ![Packagist PHP Version](https://img.shields.io/packagist/dependency-v/jonpurvis/faker-stripe/php) 8 | ![GitHub issues](https://img.shields.io/github/issues/jonpurvis/faker-stripe) 9 | ![GitHub](https://img.shields.io/github/license/jonpurvis/faker-stripe) 10 | ![Packagist Downloads](https://img.shields.io/packagist/dt/jonpurvis/faker-stripe) 11 | 12 | ## 👋 Introduction 13 | This package allows FakerPHP to generate fake IDs which have the same structure you can expect to be returned from 14 | Stripe. The wonderful [Pest](https://pestphp.com/) is used to run tests contained within this package, which requires 15 | a minimum PHP Version of 8.2. 16 | 17 | This package is listed on the [official FakerPHP website](https://fakerphp.org/third-party/) as a third party library. 18 | 19 | ## ✨Features 20 | This package can currently generate fake IDs for the following Stripe resources. To avoid any confusion, 21 | the names of resources _should_ match what's in this package. 22 | 23 | ### Core Resources 24 | 25 | | API Resource | Method | Example | 26 | |:-----------------------------------------------------------------------------------------|-----------------------------------------------------------|--------------------------------------------------------------------------| 27 | | [Balance Transactions](https://stripe.com/docs/api/balance_transactions) | `stripeCoreBalanceTransactionId()` | `txn_na40ulkbDvvegzALfY8w61udH` | 28 | | [Charges](https://stripe.com/docs/api/charges) | `stripeCoreChargeId()` | `ch_Dxy18EPyj6XXvqQiqApPQ8dA` | 29 | | [Customers](https://stripe.com/docs/api/customers) | `stripeCoreCustomerId()` | `cus_uW8qUwsTwKKtY3` | 30 | | [Disputes](https://stripe.com/docs/api/disputes) | `stripeCoreDisputeId()` | `dp_e3ZeEytdlpOxMtRg9M88RMcq` | 31 | | [Event Destinations](https://docs.stripe.com/api/v2/core/event_destinations) | `stripeCoreEventDestinationId()` | `ed_d1RhD6TdVjw78ZxrnkOt62mFS` | 32 | | [Events](https://stripe.com/docs/api/events) | `stripeCoreEventId()` | `evt_diyd59RDTVw8ZxrnkOt62mFS` | 33 | | [Files](https://stripe.com/docs/api/files) | `stripeCoreFileId()` | `file_qrbRTo7XbytwvE6w3SQU8QXK` | 34 | | [File Links](https://stripe.com/docs/api/file_links) | `stripeCoreFileLinkId()` | `link_Z5Tesn6zQYYdov5R3bCblM8A` | 35 | | [Mandates](https://stripe.com/docs/api/mandates) | `stripeCoreMandateId()` | `mandate_S4EbkGH8MFAOWUXivQqcV7wx` | 36 | | [PaymentIntents](https://stripe.com/docs/api/payment_intents) | `stripeCorePaymentIntentId()` | `pi_KiAjc3WFzvswIhq8IkCLXNBW` | 37 | | [PaymentIntents](https://stripe.com/docs/api/payment_intents) | `stripeCorePaymentIntentClientSecret()` | `pi_rZh1PKbBkmMFkHve9GKRKyg4_secret_dr3lRVfoKD8ew3BUmYZYuVONV` | 38 | | [SetupAttempts](https://stripe.com/docs/api/setup_attempts) | `stripeCoreSetupAttemptId()` | `setatt_JBHfYghz8HiScAnOcOKin75X` | 39 | | [SetupIntents](https://stripe.com/docs/api/setup_intents) | `stripeCoreSetupIntentId()` | `seti_yeYZcpT970pn6sBXlAkj8AbK` | 40 | | [SetupIntents](https://stripe.com/docs/api/setup_intents) | `stripeCoreSetupIntentClientSecret()` | `seti_xFyqGss1WNuKVCKf1KnXfD3b_secret_Yy5L7jzP4RuoQrCiIBqXn9FWuSvX3z6` | 41 | | [Payouts](https://stripe.com/docs/api/payouts) | `stripeCorePayoutId()` | `po_YqFWOxztWRuLCJezThbHktTP` | 42 | | [Refunds](https://stripe.com/docs/api/refunds) | `stripeCoreRefundId()` | `re_3BebPOs89OAgEtXAOG0c1eF4` | 43 | | [Confirmation Tokens](https://docs.stripe.com/api/confirmation_tokens) | `stripeCoreConfirmationTokenId()` | `ctoken_UDlKXzYnsCqEJvomcWWqCnTF` | 44 | | [Card Tokens](https://stripe.com/docs/api/tokens/create_card) | `stripeCoreTokenId()` | `tok_q1KiYddcC48Tqney3T8Vnkzu` | 45 | | [Bank Account Tokens](https://stripe.com/docs/api/tokens/create_bank_account) | `stripeCoreBankAccountTokenId()` | `btok_8RnxS6Y358qBuRRYS4el8LEo` | 46 | | [PII Tokens](https://stripe.com/docs/api/tokens/create_pii) | `stripeCorePersonallyIdentifiableInformationTokenId()` | `pii_uCbQpWwZu3tJEUm18GiQsKAa` | 47 | | [Account Tokens](https://stripe.com/docs/api/tokens/create_account) | `stripeCoreAccountTokenId()` | `ct_XPKqNZwOTjWJatx4A5zW2Myh` | 48 | | [Person Tokens](https://stripe.com/docs/api/tokens/create_person) | `stripeCorePersonTokenId()` | `cpt_MtqTlVzM2qmAIv0KhZJ0qV4g` | 49 | | [CVC Update Tokens](https://stripe.com/docs/api/tokens/create_cvc_update) | `stripeCoreCvcUpdateTokenId()` | `cvctok_wWV1bniJ16gsBjJlIMrN8T87` | 50 | 51 | ### Payment Methods 52 | | API Resource | Method | Example | 53 | |:-------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------| 54 | | [Payment Methods](https://stripe.com/docs/api/payment_methods) | `stripePaymentMethodId()` | `pm_jkztRiUi5yqTNqHJTzTAVolI` | 55 | | [Payment Method Configurations](https://stripe.com/docs/api/payment_method_configurations) | `stripePaymentMethodConfigurationId()` | `pmc_BS6va641BwHZCexJscZ9LNH8` | 56 | | [Payment Method Domains](https://stripe.com/docs/api/payment_method_domains) | `stripePaymentMethodDomainId()` | `pmd_FcObWHJ3gtwujiuUhVhWSe2c` | 57 | | [Bank Accounts](https://stripe.com/docs/api/customer_bank_accounts) | `stripePaymentMethodBankAccountId()` | `ba_gkcmh6gu31nALx6PJDJckqPn` | 58 | | [Cash Balance Transactions](https://docs.stripe.com/api/cash_balance_transactions) | `stripeCashBalanceTransactionId()` | `ccsbtxn_6sKoup9yicpuPC7MykObBsjq` | 59 | | [Cards](https://stripe.com/docs/api/cards) | `stripePaymentMethodCardId()` | `card_A56nkfbrHtdQ7bv8I9eeQOtW` | 60 | 61 | ### Products 62 | | API Resource | Method | Example | 63 | |:------------------------------------------------------------------------|----------------------------------|----------------------------------| 64 | | [Products](https://stripe.com/docs/api/products) | `stripeProductId()` | `prod_Kp7fBKUx6qs3FC` | 65 | | [Prices](https://stripe.com/docs/api/prices) | `stripeProductPriceId()` | `price_YhlhAgy0lHbLcOWwFZ596x1S` | 66 | | [Promotion Codes](https://stripe.com/docs/api/promotion_codes) | `stripeProductPromotionCodeId()` | `promo_7ADzsJ6WuQIsKsIj4T4MTeIX` | 67 | | [Discounts](https://stripe.com/docs/api/discounts) | `stripeProductDiscountId()` | `di_DleWj1FqYhsriqRSaQr6jCgs` | 68 | | [Tax Codes](https://stripe.com/docs/api/tax_codes) | `stripeProductTaxCodeId()` | `txcd_90766505` | 69 | | [Tax Rates](https://stripe.com/docs/api/tax_rates) | `stripeProductTaxRateId()` | `txr_nNePe3bTkOwlrAbsAxpXzWXy` | 70 | | [Shipping Rates](https://stripe.com/docs/api/shipping_rates) | `stripeProductShippingRateId()` | `shr_Sg2ZpoUCsfdAujoCc8U8MDba` | 71 | 72 | ### Checkout 73 | | API Resource | Method | Example | 74 | |:-------------------------------------------------------------------|-----------------------------|-----------------------------------------------------------------| 75 | | [Checkout Sessions](https://stripe.com/docs/api/checkout/sessions) | `stripeCheckoutSessionId()` | `cs_A1caKuWyEPOrovEkpYJLfId5uOpWzynW8ZunRYnA0J9RsPzdM6YeBfDG03` | 76 | 77 | ### Payment Links 78 | | API Resource | Method | Example | 79 | |--------------------------------------------------------------------------|-------------------------|----------------------------------| 80 | | [Payment Links](https://stripe.com/docs/api/payment_links/payment_links) | `stripePaymentLinkId()` | `plink_L85n1vZMv4QS0aYwj11TKjTy` | 81 | 82 | ### Billing 83 | | API Resource | Method | Example | 84 | |----------------------------------------------------------------------------------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 85 | | [Credit Balance Transactions](https://stripe.com/docs/api/billing/credit-balance-transaction) | `stripeBillingCreditBalanceTransactionId()` | `cbtxn_37b3DSyi5lc9uck2sp1hs0on` | 86 | | [Credit Grants](https://stripe.com/docs/api/billing/credit-grant) | `stripeBillingCreditGrantId()` | `credgr_37b9KW82CDhSi5lcuk1hs0on` | 87 | | [Credit Notes](https://stripe.com/docs/api/credit_notes) | `stripeBillingCreditNoteId()` | `cn_37b9KW8lODWCDSilck1hs0on` | 88 | | [Credit Note Line Items](https://stripe.com/docs/api/credit_notes/line_item) | `stripeBillingCreditNoteLineItemId()` | `il_75E91IzYCJaaSbESOZl5GQiF` | 89 | | [Customer Balance Transactions](https://stripe.com/docs/api/customer_balance_transactions) | `stripeBillingCustomerBalanceTransactionId()` | `cbtxn_SboO9vmMCUoTg6iGGdsOQ18R` | 90 | | [Customer Portal](https://stripe.com/docs/api/customer_portal) | `stripeBillingCustomerPortalId()` | `bps_HFXl8fnSxXjVUvepP0g7cfEH` | 91 | | [Customer Portal Configuration](https://stripe.com/docs/api/customer_portal/configuration) | `stripeBillingCustomerPortalConfigurationId()` | `bpc_sfteIfmkKXSNTxL7nA5dNKVS` | 92 | | [Customer Tax IDs](https://stripe.com/docs/api/customer_tax_ids) | `stripeBillingCustomerTaxIdId()` | `txi_Vs7BSOcldH5QIN35U8lSlJuc` | 93 | | [Invoices](https://stripe.com/docs/api/invoices) | `stripeBillingInvoiceId()` | `in_pBNUeaVUmJ8I44Fx1OajNLQn` | 94 | | [Invoice Items](https://stripe.com/docs/api/invoiceitems) | `stripeBillingInvoiceItemId()` | `ii_gOWpZpoGoMOE5IYVS86mmGXS` | 95 | | [Invoice Line Item](https://docs.stripe.com/api/invoice-line_item) | `stripeBillingInvoiceLineItemId()` | `il_tmp_lZHqliBZKLzgXuBajqYaAhxz` | 96 | | [Invoice Rendering Template](https://docs.stripe.com/api/invoice-rendering-template) | `stripeBillingInvoiceLineItemId()` | `inrtem_lZHqlidX3uB6aFqtYeafAhxz` | 97 | | [Alerts](https://docs.stripe.com/api/billing/alert) | `stripeBillingAlertId()` | `alrt_39061` | 98 | | [Meters](https://docs.stripe.com/api/billing/meter) | `stripeBillingMeterId()` | `mtr_53464` | 99 | | [Meter Event Summary](https://docs.stripe.com/api/billing/meter-event_summary) | `stripeBillingMeterEventSummaryId()` | `mtrusg_Be99DBj9c2jnNh5IxKt2bULP2Mb36xnO29OpHiVsfIeuyyI3OGvdtem4qLZ5e0O3ZB0cT93uhqpQZWJdNtYNmOERzX7AOan9OHu373TqGQoVYVBtzghvVp0oMclD2iZfnGYdeePNUvi5gKtsE36tuhev4h62i79IM8uWTdS0U77j4cz0DDOMZCcvX` | 100 | | [Plans](https://stripe.com/docs/api/plans) | `stripeBillingPlanId()` | `price_9wWZ7dtmQSWvQDhFBJB49sv8` | 101 | | [Quotes](https://stripe.com/docs/api/quotes) | `stripeBillingQuoteId()` | `qt_qrx3tn3rnQ1USENFK1gJcXLv` | 102 | | [Sources](https://stripe.com/docs/api/sources) | `stripeBillingSourceId()` | `src_wMwapfdgR4f6rF7WXkP0ibmc` | 103 | | [Subscriptions](https://stripe.com/docs/api/subscriptions) | `stripeBillingSubscriptionId()` | `sub_wMwsJiaZpdRfrF7WXkP0ibmc` | 104 | | [Subscription Items](https://stripe.com/docs/api/subscription_items) | `stripeBillingSubscriptionItemId()` | `si_3OdBLaD7p37H2A` | 105 | | [Subscription Schedules](https://stripe.com/docs/api/subscription_schedules) | `stripeBillingSubscriptionScheduleId()` | `sub_sched_OnyC6GSR3kjse08ehVNsB5U0` | 106 | | [Test Clocks](https://stripe.com/docs/api/test_clocks) | `stripeBillingTestClockId()` | `clock_6QR6dCPpUhhBg81wmyFF4VtJ` | 107 | | [Usage Records](https://stripe.com/docs/api/usage_records) | `stripeBillingUsageRecordId()` | `mbur_ppVgDLt5HcG8zP48Grk7NZfP` | 108 | | [Usage Records Summary](https://stripe.com/docs/api/usage-record-summary) | `stripeBillingUsageRecordSummaryId()` | `sis_ppV4c6G8zdP4u8sG1rk7NZfP` | 109 | 110 | ### Connect 111 | | API Resource | Method | Example | 112 | |----------------------------------------------------------------------|-----------------------------------------|--------------------------------------| 113 | | [Accounts](https://stripe.com/docs/api/accounts) | `stripeConnectAccountId()` | `acct_l8cMrvSDcUT4qP2h` | 114 | | [Application Fees](https://stripe.com/docs/api/application_fees) | `stripeConnectApplicationFeeId()` | `fee_ITNGc4r7B4QMjtOjsLr1GA2U` | 115 | | [Application Fee Refunds](https://stripe.com/docs/api/fee_refunds) | `stripeConnectApplicationFeeRefundId()` | `fr_XxY71TOJinzdNkmEQUVtlUGk` | 116 | | [Capabilities](https://stripe.com/docs/api/capabilities) | `stripeConnectCapabilityId()` | `acap_gettfmKTrHMdUQgppBj8BJ6F` | 117 | | [External Accounts](https://stripe.com/docs/api/external_accounts) | `stripeConnectExternalAccountId()` | `ba_j8048CaKvbk1ie7lfxyzXF19` | 118 | | [Persons](https://stripe.com/docs/api/persons) | `stripeConnectPersonId()` | `person_cNquFb7JU2nVsfIlprJHqIc1` | 119 | | [Top-ups](https://stripe.com/docs/api/topups) | `stripeConnectTopUpId()` | `tu_kdxjWmOqbz9J5rMdnibcnr37` | 120 | | [Transfers](https://stripe.com/docs/api/transfers) | `stripeConnectTransferId()` | `tr_1gClurOotKNBjvk7ktS3JHxo` | 121 | | [Transfer Reversals](https://stripe.com/docs/api/transfer_reversals) | `stripeConnectTransferReversalId()` | `trr_LWr56oP4aoPIjVeXGOiFOJ6f` | 122 | | [Secret Management](https://stripe.com/docs/api/secret_management) | `stripeConnectSecretManagementId()` | `appsecret_QjQnyoan5rtIYdHSokfut7VD` | 123 | 124 | ### Fraud 125 | | API Resource | Method | Example | 126 | |-------------------------------------------------------------------------------|------------------------------------|----------------------------------| 127 | | [Early Fraud Warning](https://stripe.com/docs/api/radar/early_fraud_warnings) | `stripeFraudEarlyFraudWarningId()` | `issfr_NDwczkwka50cAHRFVfnbQP30` | 128 | | [Reviews](https://stripe.com/docs/api/radar/reviews) | `stripeFraudReviewId()` | `prv_Zlx9K6ixTcigHUnOdpxqCjOO` | 129 | | [Value Lists](https://stripe.com/docs/api/radar/value_lists) | `stripeFraudValueListId()` | `rsl_C8PVL4lNS75t4PWEscJUXEkm` | 130 | | [Value List Items](https://stripe.com/docs/api/radar/value_list_items) | `stripeFraudValueListItemId()` | `rsli_QQdPv6uWYm7nZUlX3g65TfGV` | 131 | 132 | ### Issuing 133 | | API Resource | Method | Example | 134 | |----------------------------------------------------------------------------------------|-------------------------------------------|-------------------------------------| 135 | | [Authorizations](https://stripe.com/docs/api/issuing/authorizations) | `stripeIssuingAuthorizationId()` | `iauth_GyuotdxkKEHCNNYHohzBBuBh` | 136 | | [Cardholders](https://stripe.com/docs/api/issuing/cardholders) | `stripeIssuingCardholderId()` | `ich_EyqQ6EcYkhzgyrGEQSCY68EB` | 137 | | [Cards](https://stripe.com/docs/api/issuing/cards) | `stripeIssuingCardId()` | `ic_IsXAmEVzInXUPtq4uttDZ2g2` | 138 | | [Disputes](https://stripe.com/docs/api/issuing/disputes) | `stripeIssuingDisputeId()` | `idp_lXR4WsU6fhdpErzWVNOr24Ux` | 139 | | [Personalization Designs](https://docs.stripe.com/api/issuing/personalization_designs) | `stripeIssuingPersonalizationDesignsId()` | `ipcd_ulVGQxe21jR4vx` | 140 | | [Physical Bundles](https://docs.stripe.com/api/issuing/physical_bundles) | `stripeIssuingPhysicalBundlesId()` | `ics_Kd7CQOUvHjJelX` | 141 | | [Tokens](https://stripe.com/docs/api/issuing/tokens) | `stripeIssuingTokenId()` | `intok_HMkTW4FnWckzqqNGGFJP4I7E` | 142 | | [Transactions](https://stripe.com/docs/api/issuing/transactions) | `stripeIssuingTransactionId()` | `ipi_FqGAHy3JUvUsjWdqyaViRFm2` | 143 | 144 | ### Terminal 145 | | API Resource | Method | Example | 146 | |---------------------------------------------------------------------------------------------|--------------------------------------------|---------------------------------| 147 | | [Locations](https://stripe.com/docs/api/terminal/locations) | `stripeTerminalLocationId()` | `tml_UntmyAU2XPdrxOznzLeRFOue` | 148 | | [Readers](https://stripe.com/docs/api/terminal/readers) | `stripeTerminalReaderId()` | `tmr_2j8WBisfMEwMBNtLJEJ7uLOe` | 149 | | [Hardware Orders](https://stripe.com/docs/api/terminal/hardware_orders) | `stripeTerminalHardwareOrderId()` | `thor_BgOkryA2RaqfMCzMomo4VDQ5` | 150 | | [Hardware Products](https://stripe.com/docs/api/terminal/hardware_products) | `stripeTerminalHardwareProductId()` | `thpr_GgSNDKrG2YURmV` | 151 | | [Hardware SKUs](https://stripe.com/docs/api/terminal/hardware_skus) | `stripeTerminalHardwareSkuId()` | `thsku_46eIJkxj8F6Dfb` | 152 | | [Hardware Shipping Methods](https://stripe.com/docs/api/terminal/hardware_shipping_methods) | `stripeTerminalHardwareShippingMethodId()` | `thsm_HJclEgx3fzfYd5` | 153 | | [Configurations](https://stripe.com/docs/api/terminal/configuration) | `stripeTerminalConfigurationId()` | `tmc_L7yWqYiNsihDrn` | 154 | 155 | ### Treasury 156 | | API Resource | Method | Example | 157 | |--------------------------------------------------------------------------------|--------------------------------------|------------------------------------| 158 | | [FinancialAccounts](https://stripe.com/docs/api/treasury/financial_accounts) | `stripeTreasuryFinancialAccountId()` | `fa_SHiUjM3c13bPdvV81YlFYwQu` | 159 | | [Transactions](https://stripe.com/docs/api/treasury/transactions) | `stripeTreasuryTransactionId()` | `trxn_VCKBAZWMzRUul2KHkWZjHGRt` | 160 | | [TransactionEntries](https://stripe.com/docs/api/treasury/transaction_entries) | `stripeTreasuryTransactionEntryId()` | `trxne_xe1YTcpq1tmWUgzNABC8kT1S` | 161 | | [OutboundTransfers](https://stripe.com/docs/api/treasury/outbound_transfers) | `stripeTreasuryOutboundTransferId()` | `obt_9f5fWmY0s8Rbbfi8AoeifoRC` | 162 | | [OutboundPayments](https://stripe.com/docs/api/treasury/outbound_payments) | `stripeTreasuryOutboundPaymentId()` | `obp_QOJPdQ7lbAybgALjh67lgbsA` | 163 | | [InboundTransfers](https://stripe.com/docs/api/treasury/inbound_transfers) | `stripeTreasuryInboundTransferId()` | `ibt_JE9DIuWCZ9bY9xGPeKYPkSI5` | 164 | | [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) | `stripeTreasuryReceivedCreditId()` | `rc_46y23bSUUCoMmsdv7Zvx0zYr` | 165 | | [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) | `stripeTreasuryReceivedDebitId()` | `rd_ylnZC0HqdHBWWouwFsQhE4GU` | 166 | | [CreditReversals](https://stripe.com/docs/api/treasury/credit_reversals) | `stripeTreasuryCreditReversalId()` | `credrev_awpfYT4hppBEmsz9KPgtOYDm` | 167 | | [DebitReversals](https://stripe.com/docs/api/treasury/debit_reversals) | `stripeTreasuryDebitReversalId()` | `debrev_ykpt4Mi6yZAPrm8upq3yKI5r` | 168 | 169 | ### Entitlements 170 | | API Resource | Method | Example | 171 | |-----------------------------------------------------------------------------------|-------------------------------------------|------------------------------------------| 172 | | [Feature](https://docs.stripe.com/api/entitlements/feature) | `stripeEntitlementFeatureId()` | `feat_YZF6aSsx1eTNhEYrsMw6xdUeZ6lESQjt` | 173 | | [Product Feature](https://docs.stripe.com/api/product-feature) | `stripeEntitlementProductFeatureId()` | `prodft_8qi4lJKVjxGy8u` | 174 | | [Active Entitlement](https://docs.stripe.com/api/entitlements/active-entitlement) | `stripeEntitlementActiveEntitlementId()` | `ent_avB0r4MuPxc66IVgc2EF4lK50OznONZu` | 175 | 176 | ### Sigma 177 | | API Resource | Method | Example | 178 | |--------------------------------------------------------------------------|------------------------------------|--------------------------------| 179 | | [Scheduled Queries](https://stripe.com/docs/api/sigma/scheduled_queries) | `stripeSigmaScheduledQueryRunId()` | `sqr_89Lp2zqyTtqJXSFuPn9zHIcZ` | 180 | 181 | ### Reporting 182 | | API Resource | Method | Example | 183 | |------------------------------------------------------------------|--------------------------------|--------------------------------| 184 | | [Report Runs](https://stripe.com/docs/api/reporting/report_type) | `stripeReportingReportRunId()` | `frr_jJ9LNixW3dEQco0XTeX2zE1R` | 185 | 186 | ### Financial Connections 187 | | API Resource | Method | Example | 188 | |:--------------------------------------------------------------------------------------------------|-------------------------------------------------------|-------------------------------------| 189 | | [Accounts](https://stripe.com/docs/api/financial_connections/accounts) | `stripeFinancialConnectionAccountId()` | `fca_z3JzQ1OCkYved5uWOqh3b387` | 190 | | [Account Ownership](https://stripe.com/docs/api/financial_connections/ownership) | `stripeFinancialConnectionAccountOwnershipId()` | `fcaowns_XwyWHMQFo9koh9U1TuOMW43D` | 191 | | [Sessions](https://stripe.com/docs/api/financial_connections/session) | `stripeFinancialConnectionSessionId()` | `fcsess_ZnomHexUQ68qiad2GWqQsvsa` | 192 | | [Transactions](https://stripe.com/docs/api/financial_connections/transaction) | `stripeFinancialConnectionTransactionId()` | `fctxn_yIcXfBzg3NSJRYHqIW5spz4v` | 193 | | [Transaction Refresh](https://stripe.com/docs/api/financial_connections/transaction) | `stripeFinancialConnectionTransactionRefreshId()` | `fctxnref_qjmwOP8D8hJlSBgSKqHsY0Bi` | 194 | 195 | ### Tax 196 | | API Resource | Method | Example | 197 | |-----------------------------------------------------------------------------------|------------------------------------|------------------------------------| 198 | | [Calculations](https://stripe.com/docs/api/tax/calculations) | `stripeTaxCalculationId()` | `taxcalc_3tXT5aZ0nMqhD0sFe8VtY8tR` | 199 | | [Transactions](https://stripe.com/docs/api/tax/transactions) | `stripeTaxTransactionId()` | `tax_nnTCZZscXpM9xaJyyncMJOck` | 200 | | [Transaction Line Items](https://stripe.com/docs/api/tax/transactions/line_items) | `stripeTaxTransactionLineItemId()` | `tax_li_NSTCDtCYyvp5dT` | 201 | 202 | ### Identity 203 | | API Resource | Method | Example | 204 | |------------------------------------------------------------------------------------|-----------------------------------------|-------------------------------| 205 | | [VerificationSessions](https://stripe.com/docs/api/identity/verification_sessions) | `stripeIdentityVerificationSessionId()` | `vs_j8AvYT7Tbmjz26tASmjdcyNt` | 206 | | [Transactions](https://stripe.com/docs/api/identity/verification_reports) | `stripeIdentityVerificationReportId()` | `vr_IwuD3wV5qfD4t4fbTOzWwUm6` | 207 | 208 | ### Crypto 209 | | API Resource | Method | Example | 210 | |-----------------------------------------------------------------------|-------------------------------------------|---------------------------------------------------------------------------| 211 | | [Onramp Sessions](https://stripe.com/docs/api/crypto/onramp_sessions) | `stripeCryptoOnrampSessionId()` | `cos_wlo5PYZC2j8lFHnMaxbuFBK8` | 212 | | [Onramp Sessions](https://stripe.com/docs/api/crypto/onramp_sessions) | `stripeCryptoOnrampSessionClientSecret()` | `cos_Wjo3OVUVusWY54RHF6oCM0Jm_secret_Bm9iRlLbb82K19mwOxQE9jVdA0U8rMEmKO6` | 213 | 214 | ### Climate 215 | | API Resource | Method | Example | 216 | |-------------------------------------------------------------------|------------------------------------------|--------------------------------------| 217 | | [Climate Order](https://docs.stripe.com/api/climate/order) | `stripeClimateOrderId()` | `climorder_zPgRtPy8onKSuWtEHoNZidD9` | 218 | | [Climate Product](https://docs.stripe.com/api/climate/product) | `stripeClimateProductId()` | `climsku_zhSJ6n8xrB3iLS4yHNVxzpBq` | 219 | | [Climate Supplier](https://docs.stripe.com/api/climate/supplier) | `stripeClimateSupplierId()` | `climsup_YKxeDsj2hhmR2cqmangtVy02` | 220 | 221 | ### Forwarding 222 | | API Resource | Method | Example | 223 | |----------------------------------------------------------------------|-------------------------------|------------------| 224 | | [Forwarding Request](https://docs.stripe.com/api/forwarding/request) | `stripeForwardingRequestId()` | `fwd_req_90746` | 225 | 226 | ### Webhooks 227 | | API Resource | Method | Example | 228 | |----------------------------------------------------------------------|--------------------------------|---------------------------------------| 229 | | [Webhook Endpoints](https://stripe.com/docs/api/webhook_endpoints) | `stripeWebhookEndpointId()` | `we_irKQp8JwXgUxXFefCM6zlx1R` | 230 | | [Webhook Application](https://stripe.com/docs/api/webhook_endpoints) | `stripeWebhookApplicationId()` | `ca_Y5nYE1wwup9JPcXxQ9JaJWBRAJiFMujp` | 231 | 232 | ### Capital 233 | | API Resource | Method | Example | 234 | |----------------------------------------------------------------------|-------------------------------|------------------| 235 | | [FinancingOffers](https://docs.stripe.com/api/capital/financing_offers) | `stripeFinancingOfferId()` | `financingoffer_Y15ngYE41jww8upx9J2PcFXxQWBjp` | 236 | 237 | ## 📚 Usage / Examples 238 | ### Pest 239 | ```php 240 | it('generates a well structured stripe account id', function () { 241 | fake()->addProvider(new Stripe(fake())); 242 | 243 | expect(fake()->stripeConnectAccountId())->toStartWith('acct_')->toHaveLength(21)->toBeString(); 244 | }); 245 | ``` 246 | 247 | ### PHPUnit 248 | ```php 249 | public function testGeneratesWellStructuredStripeAccountId() 250 | { 251 | $faker = Factory::create(); 252 | $faker->addProvider(new Stripe($faker)); 253 | 254 | $this->assertStringStartsWith('acct_', $faker->stripeConnectAccountId()); 255 | } 256 | ``` 257 | 258 | ### Laravel Factories 259 | ```php 260 | use WithFaker; 261 | 262 | public function definition(): array 263 | { 264 | $this->faker->addProvider(new Stripe($this->faker)); 265 | 266 | return [ 267 | 'id' => $this->faker->stripeConnectAccountId(), 268 | 'name' => 'John Doe', 269 | 'email' => 'john.doe@testing.co.uk' 270 | ]; 271 | } 272 | ``` -------------------------------------------------------------------------------- /assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonPurvis/faker-stripe/59b97ac4cfc1c74796c61d523a4d23392616bb95/assets/banner.png -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jonpurvis/faker-stripe", 3 | "description": "Faker provider for generating fake Stripe IDs", 4 | "license": "MIT", 5 | "authors": [ 6 | { 7 | "name": "Jon Purvis" 8 | } 9 | ], 10 | "keywords": [ 11 | "stripe", 12 | "faker" 13 | ], 14 | "require": { 15 | "php": "^8.2", 16 | "fakerphp/faker": "^1.23" 17 | }, 18 | "require-dev": { 19 | "pestphp/pest": "^2.12", 20 | "pestphp/pest-plugin-faker": "^2.0" 21 | }, 22 | "autoload": { 23 | "psr-4": { 24 | "Faker\\Provider\\": "src/" 25 | } 26 | }, 27 | "autoload-dev": { 28 | "psr-4": { 29 | "Faker\\Tests\\Provider\\": "tests/Faker" 30 | } 31 | }, 32 | "config": { 33 | "allow-plugins": { 34 | "pestphp/pest-plugin": true 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./tests 6 | 7 | 8 | 9 | 10 | 11 | ./app 12 | ./src 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Stripe.php: -------------------------------------------------------------------------------- 1 | generateRandomString(length: 16); 28 | } 29 | 30 | public function stripeConnectApplicationFeeId(): string 31 | { 32 | return 'fee_' . $this->generateRandomString(); 33 | } 34 | 35 | public function stripeCoreBalanceTransactionId(): string 36 | { 37 | return 'txn_' . $this->generateRandomString(length: 25); 38 | } 39 | 40 | public function stripeCoreChargeId(): string 41 | { 42 | return 'ch_' . $this->generateRandomString(); 43 | } 44 | 45 | public function stripeCoreCustomerId(): string 46 | { 47 | return 'cus_' . $this->generateRandomString(length: 14); 48 | } 49 | 50 | public function stripeCoreDisputeId(): string 51 | { 52 | return 'dp_' . $this->generateRandomString(); 53 | } 54 | 55 | public function stripeCoreEventId(): string 56 | { 57 | return 'evt_' . $this->generateRandomString(); 58 | } 59 | 60 | public function stripeCoreFileId(): string 61 | { 62 | return 'file_' . $this->generateRandomString(); 63 | } 64 | 65 | public function stripeCoreFileLinkId(): string 66 | { 67 | return 'link_' . $this->generateRandomString(); 68 | } 69 | 70 | public function stripeBillingInvoiceId(): string 71 | { 72 | return 'in_' . $this->generateRandomString(); 73 | } 74 | 75 | public function stripeBillingInvoiceItemId(): string 76 | { 77 | return 'ii_' . $this->generateRandomString(); 78 | } 79 | 80 | public function stripeCoreMandateId(): string 81 | { 82 | return 'mandate_' . $this->generateRandomString(); 83 | } 84 | 85 | public function stripeCorePaymentIntentId(): string 86 | { 87 | return 'pi_' . $this->generateRandomString(); 88 | } 89 | 90 | public function stripeCorePayoutId(): string 91 | { 92 | return 'po_' . $this->generateRandomString(); 93 | } 94 | 95 | public function stripeCoreRefundId(): string 96 | { 97 | return 're_' . $this->generateRandomString(); 98 | } 99 | 100 | public function stripeCoreSetupIntentId(): string 101 | { 102 | return 'seti_' . $this->generateRandomString(); 103 | } 104 | 105 | public function stripeCoreSetupAttemptId(): string 106 | { 107 | return 'setatt_' . $this->generateRandomString(); 108 | } 109 | 110 | public function stripeCoreTokenId(): string 111 | { 112 | return 'tok_' . $this->generateRandomString(); 113 | } 114 | 115 | public function stripePaymentMethodId(): string 116 | { 117 | return 'pm_' . $this->generateRandomString(); 118 | } 119 | 120 | public function stripePaymentMethodBankAccountId(): string 121 | { 122 | return 'ba_' . $this->generateRandomString(); 123 | } 124 | 125 | public function stripePaymentMethodCardId(): string 126 | { 127 | return 'card_' . $this->generateRandomString(); 128 | } 129 | 130 | public function stripeProductId(): string 131 | { 132 | return 'prod_' . $this->generateRandomString(length: 14); 133 | } 134 | 135 | public function stripeProductPriceId(): string 136 | { 137 | return 'price_' . $this->generateRandomString(); 138 | } 139 | 140 | public function stripeProductPromotionCodeId(): string 141 | { 142 | return 'promo_' . $this->generateRandomString(); 143 | } 144 | 145 | public function stripeProductDiscountId(): string 146 | { 147 | return 'di_' . $this->generateRandomString(); 148 | } 149 | 150 | public function stripeProductTaxCodeId(): string 151 | { 152 | return 'txcd_' . $this->generateRandomString(length: 8, numericOnly: true); 153 | } 154 | 155 | public function stripeProductTaxRateId(): string 156 | { 157 | return 'txr_' . $this->generateRandomString(); 158 | } 159 | 160 | public function stripeProductShippingRateId(): string 161 | { 162 | return 'shr_' . $this->generateRandomString(); 163 | } 164 | 165 | public function stripeCheckoutSessionId(): string 166 | { 167 | return 'cs_' . $this->generateRandomString(length: 58); 168 | } 169 | 170 | public function stripePaymentLinkId(): string 171 | { 172 | return 'plink_' . $this->generateRandomString(); 173 | } 174 | 175 | public function stripeBillingCreditNoteId(): string 176 | { 177 | return 'cn_' . $this->generateRandomString(); 178 | } 179 | 180 | public function stripeBillingCustomerBalanceTransactionId(): string 181 | { 182 | return 'cbtxn_' . $this->generateRandomString(); 183 | } 184 | 185 | public function stripeBillingCustomerPortalId(): string 186 | { 187 | return 'bps_' . $this->generateRandomString(); 188 | } 189 | 190 | public function stripeBillingCustomerTaxIdId(): string 191 | { 192 | return 'txi_' . $this->generateRandomString(); 193 | } 194 | 195 | public function stripeBillingPlanId(): string 196 | { 197 | return 'price_' . $this->generateRandomString(); 198 | } 199 | 200 | public function stripeBillingQuoteId(): string 201 | { 202 | return 'qt_' . $this->generateRandomString(); 203 | } 204 | 205 | public function stripeBillingSubscriptionId(): string 206 | { 207 | return 'sub_' . $this->generateRandomString(); 208 | } 209 | 210 | public function stripeBillingSubscriptionItemId(): string 211 | { 212 | return 'si_' . $this->generateRandomString(length: 14); 213 | } 214 | 215 | public function stripeBillingSubscriptionScheduleId(): string 216 | { 217 | return 'sub_sched_' . $this->generateRandomString(); 218 | } 219 | 220 | public function stripeBillingTestClockId(): string 221 | { 222 | return 'clock_' . $this->generateRandomString(); 223 | } 224 | public function stripeBillingUsageRecordId(): string 225 | { 226 | return 'mbur_' . $this->generateRandomString(); 227 | } 228 | 229 | public function stripeConnectApplicationFeeRefundId(): string 230 | { 231 | return 'fr_' . $this->generateRandomString(); 232 | } 233 | 234 | public function stripeConnectExternalAccountId(): string 235 | { 236 | return 'ba_' . $this->generateRandomString(); 237 | } 238 | 239 | public function stripeConnectPersonId(): string 240 | { 241 | return 'person_' . $this->generateRandomString(); 242 | } 243 | 244 | public function stripeConnectTopUpId(): string 245 | { 246 | return 'tu_' . $this->generateRandomString(); 247 | } 248 | 249 | public function stripeConnectTransferId(): string 250 | { 251 | return 'tr_' . $this->generateRandomString(); 252 | } 253 | 254 | public function stripeConnectTransferReversalId(): string 255 | { 256 | return 'trr_' . $this->generateRandomString(); 257 | } 258 | 259 | public function stripeConnectSecretManagementId(): string 260 | { 261 | return 'appsecret_' . $this->generateRandomString(); 262 | } 263 | 264 | public function stripeFraudEarlyFraudWarningId(): string 265 | { 266 | return 'issfr_' . $this->generateRandomString(); 267 | } 268 | 269 | public function stripeFraudReviewId(): string 270 | { 271 | return 'prv_' . $this->generateRandomString(); 272 | } 273 | 274 | public function stripeFraudValueListId(): string 275 | { 276 | return 'rsl_' . $this->generateRandomString(); 277 | } 278 | 279 | public function stripeFraudValueListItemId(): string 280 | { 281 | return 'rsli_' . $this->generateRandomString(); 282 | } 283 | 284 | public function stripeIssuingAuthorizationId(): string 285 | { 286 | return 'iauth_' . $this->generateRandomString(); 287 | } 288 | 289 | public function stripeIssuingCardholderId(): string 290 | { 291 | return 'ich_' . $this->generateRandomString(); 292 | } 293 | 294 | public function stripeIssuingCardId(): string 295 | { 296 | return 'ic_' . $this->generateRandomString(); 297 | } 298 | 299 | public function stripeIssuingDisputeId(): string 300 | { 301 | return 'idp_' . $this->generateRandomString(); 302 | } 303 | 304 | public function stripeIssuingTransactionId(): string 305 | { 306 | return 'ipi_' . $this->generateRandomString(); 307 | } 308 | 309 | public function stripeTerminalLocationId(): string 310 | { 311 | return 'tml_' . $this->generateRandomString(); 312 | } 313 | 314 | public function stripeTerminalReaderId(): string 315 | { 316 | return 'tmr_' . $this->generateRandomString(); 317 | } 318 | 319 | public function stripeTerminalHardwareOrderId(): string 320 | { 321 | return 'thor_' . $this->generateRandomString(); 322 | } 323 | 324 | public function stripeTerminalHardwareProductId(): string 325 | { 326 | return 'thpr_' . $this->generateRandomString(length: 14); 327 | } 328 | 329 | public function stripeTerminalHardwareSkuId(): string 330 | { 331 | return 'thsku_' . $this->generateRandomString(length: 14); 332 | } 333 | 334 | public function stripeTerminalHardwareShippingMethodId(): string 335 | { 336 | return 'thsm_' . $this->generateRandomString(length: 14); 337 | } 338 | 339 | public function stripeTerminalConfigurationId(): string 340 | { 341 | return 'tmc_' . $this->generateRandomString(length: 14); 342 | } 343 | 344 | public function stripeTreasuryFinancialAccountId(): string 345 | { 346 | return 'fa_' . $this->generateRandomString(); 347 | } 348 | 349 | public function stripeTreasuryTransactionId(): string 350 | { 351 | return 'trxn_' . $this->generateRandomString(); 352 | } 353 | 354 | public function stripeTreasuryTransactionEntryId(): string 355 | { 356 | return 'trxne_' . $this->generateRandomString(); 357 | } 358 | 359 | public function stripeTreasuryOutboundTransferId(): string 360 | { 361 | return 'obt_' . $this->generateRandomString(); 362 | } 363 | 364 | public function stripeTreasuryOutboundPaymentId(): string 365 | { 366 | return 'obp_' . $this->generateRandomString(); 367 | } 368 | 369 | public function stripeTreasuryInboundTransferId(): string 370 | { 371 | return 'ibt_' . $this->generateRandomString(); 372 | } 373 | 374 | public function stripeTreasuryReceivedCreditId(): string 375 | { 376 | return 'rc_' . $this->generateRandomString(); 377 | } 378 | 379 | public function stripeTreasuryReceivedDebitId(): string 380 | { 381 | return 'rd_' . $this->generateRandomString(); 382 | } 383 | 384 | public function stripeTreasuryCreditReversalId(): string 385 | { 386 | return 'credrev_' . $this->generateRandomString(); 387 | } 388 | 389 | public function stripeTreasuryDebitReversalId(): string 390 | { 391 | return 'debrev_' . $this->generateRandomString(); 392 | } 393 | 394 | public function stripeSigmaScheduledQueryRunId(): string 395 | { 396 | return 'sqr_' . $this->generateRandomString(); 397 | } 398 | 399 | public function stripeReportingReportRunId(): string 400 | { 401 | return 'frr_' . $this->generateRandomString(); 402 | } 403 | 404 | public function stripeFinancialConnectionAccountId(): string 405 | { 406 | return 'fca_' . $this->generateRandomString(); 407 | } 408 | 409 | public function stripeFinancialConnectionAccountOwnershipId(): string 410 | { 411 | return 'fcaowns_' . $this->generateRandomString(); 412 | } 413 | 414 | public function stripeFinancialConnectionSessionId(): string 415 | { 416 | return 'fcsess_' . $this->generateRandomString(); 417 | } 418 | 419 | public function stripeFinancialConnectionTransactionId(): string 420 | { 421 | return 'fctxn_' . $this->generateRandomString(); 422 | } 423 | 424 | public function stripeTaxCalculationId(): string 425 | { 426 | return 'taxcalc_' . $this->generateRandomString(); 427 | } 428 | 429 | public function stripeTaxTransactionId(): string 430 | { 431 | return 'tax_' . $this->generateRandomString(); 432 | } 433 | 434 | public function stripeIdentityVerificationSessionId(): string 435 | { 436 | return 'vs_' . $this->generateRandomString(); 437 | } 438 | 439 | public function stripeIdentityVerificationReportId(): string 440 | { 441 | return 'vr_' . $this->generateRandomString(); 442 | } 443 | 444 | public function stripeWebhookEndpointId(): string 445 | { 446 | return 'we_' . $this->generateRandomString(); 447 | } 448 | 449 | public function stripeFinancialConnectionTransactionRefreshId(): string 450 | { 451 | return 'fctxnref_' . $this->generateRandomString(); 452 | } 453 | 454 | public function stripeTaxTransactionLineItemId(): string 455 | { 456 | return 'tax_li_' . $this->generateRandomString(length: 14); 457 | } 458 | 459 | public function stripeWebhookApplicationId(): string 460 | { 461 | return 'ca_' . $this->generateRandomString(length: 32); 462 | } 463 | 464 | public function stripeCryptoOnrampSessionId(): string 465 | { 466 | return 'cos_' . $this->generateRandomString(); 467 | } 468 | 469 | public function stripeCorePaymentIntentClientSecret(): string 470 | { 471 | return 'pi_' . $this->generateRandomString() . '_secret_' . $this->generateRandomString(length: 25); 472 | } 473 | 474 | public function stripeCryptoOnrampSessionClientSecret(): string 475 | { 476 | return 'cos_' . $this->generateRandomString() . '_secret_' . $this->generateRandomString(length: 35); 477 | } 478 | 479 | public function stripeConnectCapabilityId(): string 480 | { 481 | return 'acap_' . $this->generateRandomString(); 482 | } 483 | 484 | public function stripeCashBalanceTransactionId(): string 485 | { 486 | return 'ccsbtxn_' . $this->generateRandomString(); 487 | } 488 | 489 | public function stripeIssuingTokenId(): string 490 | { 491 | return 'intok_' . $this->generateRandomString(); 492 | } 493 | 494 | public function stripePaymentMethodConfigurationId(): string 495 | { 496 | return 'pmc_' . $this->generateRandomString(); 497 | } 498 | 499 | public function stripePaymentMethodDomainId(): string 500 | { 501 | return 'pmd_' . $this->generateRandomString(); 502 | } 503 | 504 | public function stripeCoreSetupIntentClientSecret(): string 505 | { 506 | return 'seti_' . $this->generateRandomString() . '_secret_' . $this->generateRandomString(length: 31); 507 | } 508 | 509 | public function stripeCoreBankAccountTokenId(): string 510 | { 511 | return 'btok_' . $this->generateRandomString(); 512 | } 513 | 514 | public function stripeCorePersonallyIdentifiableInformationTokenId(): string 515 | { 516 | return 'pii_' . $this->generateRandomString(); 517 | } 518 | 519 | public function stripeCoreAccountTokenId(): string 520 | { 521 | return 'ct_' . $this->generateRandomString(); 522 | } 523 | 524 | public function stripeCorePersonTokenId(): string 525 | { 526 | return 'cpt_' . $this->generateRandomString(); 527 | } 528 | 529 | public function stripeCoreCvcUpdateTokenId(): string 530 | { 531 | return 'cvctok_' . $this->generateRandomString(); 532 | } 533 | 534 | public function stripeBillingCreditNoteLineItemId(): string 535 | { 536 | return 'il_' . $this->generateRandomString(); 537 | } 538 | 539 | public function stripeBillingCustomerPortalConfigurationId(): string 540 | { 541 | return 'bpc_' . $this->generateRandomString(); 542 | } 543 | 544 | public function stripeCoreConfirmationTokenId(): string 545 | { 546 | return 'ctoken_' . $this->generateRandomString(); 547 | } 548 | 549 | public function stripeBillingInvoiceLineItemId(): string 550 | { 551 | return 'il_tmp_' . $this->generateRandomString(); 552 | } 553 | 554 | public function stripeBillingAlertId(): string 555 | { 556 | return 'alrt_' . $this->generateRandomString(length: 5, numericOnly: true); 557 | } 558 | 559 | public function stripeBillingMeterId(): string 560 | { 561 | return 'mtr_' . $this->generateRandomString(length: 5, numericOnly: true); 562 | } 563 | 564 | public function stripeBillingMeterEventSummaryId(): string 565 | { 566 | return 'mtrusg_' . $this->generateRandomString(length: 185); 567 | } 568 | 569 | public function stripeIssuingPersonalizationDesignsId(): string 570 | { 571 | return 'ipcd_' . $this->generateRandomString(length: 14); 572 | } 573 | 574 | public function stripeIssuingPhysicalBundlesId(): string 575 | { 576 | return 'ics_' . $this->generateRandomString(length: 14); 577 | } 578 | 579 | public function stripeEntitlementFeatureId(): string 580 | { 581 | return 'feat_' . $this->generateRandomString(length: 32); 582 | } 583 | 584 | public function stripeEntitlementProductFeatureId(): string 585 | { 586 | return 'prodft_' . $this->generateRandomString(length: 14); 587 | } 588 | 589 | public function stripeEntitlementActiveEntitlementId(): string 590 | { 591 | return 'ent_' . $this->generateRandomString(length: 32); 592 | } 593 | 594 | public function stripeClimateOrderId(): string 595 | { 596 | return 'climorder_' . $this->generateRandomString(); 597 | } 598 | 599 | public function stripeClimateProductId(): string 600 | { 601 | return 'climsku_' . $this->generateRandomString(); 602 | } 603 | 604 | public function stripeClimateSupplierId(): string 605 | { 606 | return 'climsup_' . $this->generateRandomString(); 607 | } 608 | 609 | public function stripeForwardingRequestId(): string 610 | { 611 | return 'fwd_req_' . $this->generateRandomString(length: 5, numericOnly: true); 612 | } 613 | 614 | public function stripeCoreEventDestinationId(): string 615 | { 616 | return 'ed_' . $this->generateRandomString(); 617 | } 618 | 619 | public function stripeBillingSourceId(): string 620 | { 621 | return 'src_' . $this->generateRandomString(); 622 | } 623 | 624 | public function stripeBillingInvoiceRenderingTemplateId(): string 625 | { 626 | return 'inrtem_' . $this->generateRandomString(); 627 | } 628 | 629 | public function stripeBillingCreditGrantId(): string 630 | { 631 | return 'credgr_' . $this->generateRandomString(); 632 | } 633 | 634 | public function stripeBillingCreditBalanceTransactionId(): string 635 | { 636 | return 'cbtxn_' . $this->generateRandomString(); 637 | } 638 | 639 | public function stripeBillingUsageRecordSummaryId(): string 640 | { 641 | return 'sis_' . $this->generateRandomString(); 642 | } 643 | 644 | public function stripeFinancingOfferId(): string 645 | { 646 | return 'financingoffer_' . $this->generateRandomString(); 647 | } 648 | } -------------------------------------------------------------------------------- /tests/ArchitectureTest.php: -------------------------------------------------------------------------------- 1 | expect(Stripe::class) 8 | ->toExtend(Base::class) 9 | ->toOnlyUse(Base::class); -------------------------------------------------------------------------------- /tests/StripeTest.php: -------------------------------------------------------------------------------- 1 | fake = fake(); 8 | $this->fake->addProvider(new Stripe($this->fake)); 9 | }); 10 | 11 | it('generates a connect account id', function () { 12 | expect($this->fake->stripeConnectAccountId())->toStartWith('acct_')->toHaveLength(21)->toBeString(); 13 | }); 14 | 15 | it('generates a connect application fee id', function () { 16 | expect($this->fake->stripeConnectApplicationFeeId())->toStartWith('fee_')->toHaveLength(28)->toBeString(); 17 | }); 18 | 19 | it('generates a core balance transaction id', function () { 20 | expect($this->fake->stripeCoreBalanceTransactionId())->toStartWith('txn_')->toHaveLength(29)->toBeString(); 21 | }); 22 | 23 | it('generates a core charge id', function () { 24 | expect($this->fake->stripeCoreChargeId())->toStartWith('ch_')->toHaveLength(27)->toBeString(); 25 | }); 26 | 27 | it('generates a core customer id', function () { 28 | expect($this->fake->stripeCoreCustomerId())->toStartWith('cus_')->toHaveLength(18)->toBeString(); 29 | }); 30 | 31 | it('generates a core dispute id', function () { 32 | expect($this->fake->stripeCoreDisputeId())->toStartWith('dp_')->toHaveLength(27)->toBeString(); 33 | }); 34 | 35 | it('generates a core event id', function () { 36 | expect($this->fake->stripeCoreEventId())->toStartWith('evt_')->toHaveLength(28)->toBeString(); 37 | }); 38 | 39 | it('generates a core file id', function () { 40 | expect($this->fake->stripeCoreFileId())->toStartWith('file_')->toHaveLength(29)->toBeString(); 41 | }); 42 | 43 | it('generates a core file link id', function () { 44 | expect($this->fake->stripeCoreFileLinkId())->toStartWith('link_')->toHaveLength(29)->toBeString(); 45 | }); 46 | 47 | it('generates a billing invoice id', function () { 48 | expect($this->fake->stripeBillingInvoiceId())->toStartWith('in_')->toHaveLength(27)->toBeString(); 49 | }); 50 | 51 | it('generates a billing invoice item id', function () { 52 | expect($this->fake->stripeBillingInvoiceItemId())->toStartWith('ii_')->toHaveLength(27)->toBeString(); 53 | }); 54 | 55 | it('generates a core mandate id', function () { 56 | expect($this->fake->stripeCoreMandateId())->toStartWith('mandate_')->toHaveLength(32)->toBeString(); 57 | }); 58 | 59 | it('generates a core payment intent id', function () { 60 | expect($this->fake->stripeCorePaymentIntentId())->toStartWith('pi_')->toHaveLength(27)->toBeString(); 61 | }); 62 | 63 | it('generates a core payout id', function () { 64 | expect($this->fake->stripeCorePayoutId())->toStartWith('po_')->toHaveLength(27)->toBeString(); 65 | }); 66 | 67 | it('generates a core refund id', function () { 68 | expect($this->fake->stripeCoreRefundId())->toStartWith('re_')->toHaveLength(27)->toBeString(); 69 | }); 70 | 71 | it('generates a core setup intent id', function () { 72 | expect($this->fake->stripeCoreSetupIntentId())->toStartWith('seti_')->toHaveLength(29)->toBeString(); 73 | }); 74 | 75 | it('generates a core setup attempt id', function () { 76 | expect($this->fake->stripeCoreSetupAttemptId())->toStartWith('setatt_')->toHaveLength(31)->toBeString(); 77 | }); 78 | 79 | it('generates a core token id', function () { 80 | expect($this->fake->stripeCoreTokenId())->toStartWith('tok_')->toHaveLength(28)->toBeString(); 81 | }); 82 | 83 | it('generates a payment method id', function () { 84 | expect($this->fake->stripePaymentMethodId())->toStartWith('pm_')->toHaveLength(27)->toBeString(); 85 | }); 86 | 87 | it('generates a payment method bank account id', function () { 88 | expect($this->fake->stripePaymentMethodBankAccountId())->toStartWith('ba_')->toHaveLength(27)->toBeString(); 89 | }); 90 | 91 | it('generates a payment method card id', function () { 92 | expect($this->fake->stripePaymentMethodCardId())->toStartWith('card_')->toHaveLength(29)->toBeString(); 93 | }); 94 | 95 | it('generates a product id', function () { 96 | expect($this->fake->stripeProductId())->toStartWith('prod_')->toHaveLength(19)->toBeString(); 97 | }); 98 | 99 | it('generates a product price id', function () { 100 | expect($this->fake->stripeProductPriceId())->toStartWith('price_')->toHaveLength(30)->toBeString(); 101 | }); 102 | 103 | it('generates a product promotion code id', function () { 104 | expect($this->fake->stripeProductPromotionCodeId())->toStartWith('promo_')->toHaveLength(30)->toBeString(); 105 | }); 106 | 107 | it('generates a product discount id', function () { 108 | expect($this->fake->stripeProductDiscountId())->toStartWith('di_')->toHaveLength(27)->toBeString(); 109 | }); 110 | 111 | it('generates a product tax code id', function () { 112 | expect($this->fake->stripeProductTaxCodeId())->toStartWith('txcd_')->toHaveLength(13)->toBeString(); 113 | }); 114 | 115 | it('generates a product tax rate id', function () { 116 | expect($this->fake->stripeProductTaxRateId())->toStartWith('txr_')->toHaveLength(28)->toBeString(); 117 | }); 118 | 119 | it('generates a product shipping rate id', function () { 120 | expect($this->fake->stripeProductShippingRateId())->toStartWith('shr_')->toHaveLength(28)->toBeString(); 121 | }); 122 | 123 | it('generates a checkout session id', function () { 124 | expect($this->fake->stripeCheckoutSessionId())->toStartWith('cs_')->toHaveLength(61)->toBeString(); 125 | }); 126 | 127 | it('generates a payment link id', function () { 128 | expect($this->fake->stripePaymentLinkId())->toStartWith('plink_')->toHaveLength(30)->toBeString(); 129 | }); 130 | 131 | it('generates a billing credit note id', function () { 132 | expect($this->fake->stripeBillingCreditNoteId())->toStartWith('cn_')->toHaveLength(27)->toBeString(); 133 | }); 134 | 135 | it('generates a billing customer balance transaction id', function () { 136 | expect($this->fake->stripeBillingCustomerBalanceTransactionId())->toStartWith('cbtxn_')->toHaveLength(30)->toBeString(); 137 | }); 138 | 139 | it('generates a billing customer portal id', function () { 140 | expect($this->fake->stripeBillingCustomerPortalId())->toStartWith('bps_')->toHaveLength(28)->toBeString(); 141 | }); 142 | 143 | it('generates a billing customer tax id id', function () { 144 | expect($this->fake->stripeBillingCustomerTaxIdId())->toStartWith('txi_')->toHaveLength(28)->toBeString(); 145 | }); 146 | 147 | it('generates a billing plan id', function () { 148 | expect($this->fake->stripeBillingPlanId())->toStartWith('price_')->toHaveLength(30)->toBeString(); 149 | }); 150 | 151 | it('generates a billing quote id', function () { 152 | expect($this->fake->stripeBillingQuoteId())->toStartWith('qt_')->toHaveLength(27)->toBeString(); 153 | }); 154 | 155 | it('generates a billing subscription id', function () { 156 | expect($this->fake->stripeBillingSubscriptionId())->toStartWith('sub_')->toHaveLength(28)->toBeString(); 157 | }); 158 | 159 | it('generates a billing subscription item id', function () { 160 | expect($this->fake->stripeBillingSubscriptionItemId())->toStartWith('si_')->toHaveLength(17)->toBeString(); 161 | }); 162 | 163 | it('generates a billing subscription schedule id', function () { 164 | expect($this->fake->stripeBillingSubscriptionScheduleId())->toStartWith('sub_sched_')->toHaveLength(34)->toBeString(); 165 | }); 166 | 167 | it('generates a billing test clock id', function () { 168 | expect($this->fake->stripeBillingTestClockId())->toStartWith('clock_')->toHaveLength(30)->toBeString(); 169 | }); 170 | 171 | it('generates a billing usage record id', function () { 172 | expect($this->fake->stripeBillingUsageRecordId())->toStartWith('mbur_')->toHaveLength(29)->toBeString(); 173 | }); 174 | 175 | it('generates a connect application fee refund id', function () { 176 | expect($this->fake->stripeConnectApplicationFeeRefundId())->toStartWith('fr_')->toHaveLength(27)->toBeString(); 177 | }); 178 | 179 | it('generates a connect external account id', function () { 180 | expect($this->fake->stripeConnectExternalAccountId())->toStartWith('ba_')->toHaveLength(27)->toBeString(); 181 | }); 182 | 183 | it('generates a connect person id', function () { 184 | expect($this->fake->stripeConnectPersonId())->toStartWith('person_')->toHaveLength(31)->toBeString(); 185 | }); 186 | 187 | it('generates a connect top up id', function () { 188 | expect($this->fake->stripeConnectTopUpId())->toStartWith('tu_')->toHaveLength(27)->toBeString(); 189 | }); 190 | 191 | it('generates a connect transfer id', function () { 192 | expect($this->fake->stripeConnectTransferId())->toStartWith('tr_')->toHaveLength(27)->toBeString(); 193 | }); 194 | 195 | it('generates a connect transfer reversal id', function () { 196 | expect($this->fake->stripeConnectTransferReversalId())->toStartWith('trr_')->toHaveLength(28)->toBeString(); 197 | }); 198 | 199 | it('generates a connect secret management id', function () { 200 | expect($this->fake->stripeConnectSecretManagementId())->toStartWith('appsecret_')->toHaveLength(34)->toBeString(); 201 | }); 202 | 203 | it('generates a fraud early fraud warning id', function () { 204 | expect($this->fake->stripeFraudEarlyFraudWarningId())->toStartWith('issfr_')->toHaveLength(30)->toBeString(); 205 | }); 206 | 207 | it('generates a fraud review id', function () { 208 | expect($this->fake->stripeFraudReviewId())->toStartWith('prv_')->toHaveLength(28)->toBeString(); 209 | }); 210 | 211 | it('generates a fraud value list id', function () { 212 | expect($this->fake->stripeFraudValueListId())->toStartWith('rsl_')->toHaveLength(28)->toBeString(); 213 | }); 214 | 215 | it('generates a fraud value list item id', function () { 216 | expect($this->fake->stripeFraudValueListItemId())->toStartWith('rsli_')->toHaveLength(29)->toBeString(); 217 | }); 218 | 219 | it('generates an issuing authorization id', function () { 220 | expect($this->fake->stripeIssuingAuthorizationId())->toStartWith('iauth_')->toHaveLength(30)->toBeString(); 221 | }); 222 | 223 | it('generates an issuing cardholder id', function () { 224 | expect($this->fake->stripeIssuingCardholderId())->toStartWith('ich_')->toHaveLength(28)->toBeString(); 225 | }); 226 | 227 | it('generates an issuing card id', function () { 228 | expect($this->fake->stripeIssuingCardId())->toStartWith('ic_')->toHaveLength(27)->toBeString(); 229 | }); 230 | 231 | it('generates an issuing dispute id', function () { 232 | expect($this->fake->stripeIssuingDisputeId())->toStartWith('idp_')->toHaveLength(28)->toBeString(); 233 | }); 234 | 235 | it('generates an issuing transaction id', function () { 236 | expect($this->fake->stripeIssuingTransactionId())->toStartWith('ipi_')->toHaveLength(28)->toBeString(); 237 | }); 238 | 239 | it('generates a terminal location id', function () { 240 | expect($this->fake->stripeTerminalLocationId())->toStartWith('tml_')->toHaveLength(28)->toBeString(); 241 | }); 242 | 243 | it('generates a terminal reader id', function () { 244 | expect($this->fake->stripeTerminalReaderId())->toStartWith('tmr_')->toHaveLength(28)->toBeString(); 245 | }); 246 | 247 | it('generates a terminal hardware order id', function () { 248 | expect($this->fake->stripeTerminalHardwareOrderId())->toStartWith('thor_')->toHaveLength(29)->toBeString(); 249 | }); 250 | 251 | it('generates a terminal hardware product id', function () { 252 | expect($this->fake->stripeTerminalHardwareProductId())->toStartWith('thpr_')->toHaveLength(19)->toBeString(); 253 | }); 254 | 255 | it('generates a terminal hardware sku', function () { 256 | expect($this->fake->stripeTerminalHardwareSkuId())->toStartWith('thsku_')->toHaveLength(20)->toBeString(); 257 | }); 258 | 259 | it('generates a terminal hardware shipping method id', function () { 260 | expect($this->fake->stripeTerminalHardwareShippingMethodId())->toStartWith('thsm_')->toHaveLength(19)->toBeString(); 261 | }); 262 | 263 | it('generates a terminal configuration id', function () { 264 | expect($this->fake->stripeTerminalConfigurationId())->toStartWith('tmc_')->toHaveLength(18)->toBeString(); 265 | }); 266 | 267 | it('generates a treasury financial account id', function () { 268 | expect($this->fake->stripeTreasuryFinancialAccountId())->toStartWith('fa_')->toHaveLength(27)->toBeString(); 269 | }); 270 | 271 | it('generates a treasury transaction id', function () { 272 | expect($this->fake->stripeTreasuryTransactionId())->toStartWith('trxn_')->toHaveLength(29)->toBeString(); 273 | }); 274 | 275 | it('generates a treasury transaction entry id', function () { 276 | expect($this->fake->stripeTreasuryTransactionEntryId())->toStartWith('trxne_')->toHaveLength(30)->toBeString(); 277 | }); 278 | 279 | it('generates a treasury outbound transfer id', function () { 280 | expect($this->fake->stripeTreasuryOutboundTransferId())->toStartWith('obt_')->toHaveLength(28)->toBeString(); 281 | }); 282 | 283 | it('generates a treasury outbound payment id', function () { 284 | expect($this->fake->stripeTreasuryOutboundPaymentId())->toStartWith('obp_')->toHaveLength(28)->toBeString(); 285 | }); 286 | 287 | it('generates a treasury inbound transfer id', function () { 288 | expect($this->fake->stripeTreasuryInboundTransferId())->toStartWith('ibt_')->toHaveLength(28)->toBeString(); 289 | }); 290 | 291 | it('generates a treasury received credit id', function () { 292 | expect($this->fake->stripeTreasuryReceivedCreditId())->toStartWith('rc_')->toHaveLength(27)->toBeString(); 293 | }); 294 | 295 | it('generates a treasury received debit id', function () { 296 | expect($this->fake->stripeTreasuryReceivedDebitId())->toStartWith('rd_')->toHaveLength(27)->toBeString(); 297 | }); 298 | 299 | it('generates a treasury credit reversal id', function () { 300 | expect($this->fake->stripeTreasuryCreditReversalId())->toStartWith('credrev_')->toHaveLength(32)->toBeString(); 301 | }); 302 | 303 | it('generates a treasury debit reversal id', function () { 304 | expect($this->fake->stripeTreasuryDebitReversalId())->toStartWith('debrev_')->toHaveLength(31)->toBeString(); 305 | }); 306 | 307 | it('generates a scheduled query run id', function () { 308 | expect($this->fake->stripeSigmaScheduledQueryRunId())->toStartWith('sqr_')->toHaveLength(28)->toBeString(); 309 | }); 310 | 311 | it('generates a reporting report run id', function () { 312 | expect($this->fake->stripeReportingReportRunId())->toStartWith('frr_')->toHaveLength(28)->toBeString(); 313 | }); 314 | 315 | it('generates a financial connection account id', function () { 316 | expect($this->fake->stripeFinancialConnectionAccountId())->toStartWith('fca_')->toHaveLength(28)->toBeString(); 317 | }); 318 | 319 | it('generates a financial connection account ownership id', function () { 320 | expect($this->fake->stripeFinancialConnectionAccountOwnershipId())->toStartWith('fcaowns_')->toHaveLength(32)->toBeString(); 321 | }); 322 | 323 | it('generates a financial connection session id', function () { 324 | expect($this->fake->stripeFinancialConnectionSessionId())->toStartWith('fcsess_')->toHaveLength(31)->toBeString(); 325 | }); 326 | 327 | it('generates a financial connection transaction id', function () { 328 | expect($this->fake->stripeFinancialConnectionTransactionId())->toStartWith('fctxn_')->toHaveLength(30)->toBeString(); 329 | }); 330 | 331 | it('generates a tax calculation id', function () { 332 | expect($this->fake->stripeTaxCalculationId())->toStartWith('taxcalc_')->toHaveLength(32)->toBeString(); 333 | }); 334 | 335 | it('generates a tax transaction id', function () { 336 | expect($this->fake->stripeTaxTransactionId())->toStartWith('tax_')->toHaveLength(28)->toBeString(); 337 | }); 338 | 339 | it('generates a identity verification session id', function () { 340 | expect($this->fake->stripeIdentityVerificationSessionId())->toStartWith('vs_')->toHaveLength(27)->toBeString(); 341 | }); 342 | 343 | it('generates a identity verification report id', function () { 344 | expect($this->fake->stripeIdentityVerificationReportId())->toStartWith('vr_')->toHaveLength(27)->toBeString(); 345 | }); 346 | 347 | it('generates a webhook endpoint id', function () { 348 | expect($this->fake->stripeWebhookEndpointId())->toStartWith('we_')->toHaveLength(27)->toBeString(); 349 | }); 350 | 351 | it('generates a financial connection transaction refresh id', function () { 352 | expect($this->fake->stripeFinancialConnectionTransactionRefreshId())->toStartWith('fctxnref_')->toHaveLength(33)->toBeString(); 353 | }); 354 | 355 | it('generates a tax transaction line item id', function () { 356 | expect($this->fake->stripeTaxTransactionLineItemId())->toStartWith('tax_li_')->toHaveLength(21)->toBeString(); 357 | }); 358 | 359 | it('generates a webhook application id', function () { 360 | expect($this->fake->stripeWebhookApplicationId())->toStartWith('ca_')->toHaveLength(35)->toBeString(); 361 | }); 362 | 363 | it('generates a crypto onramp session id', function () { 364 | expect($this->fake->stripeCryptoOnrampSessionId())->toStartWith('cos_')->toHaveLength(28)->toBeString(); 365 | }); 366 | 367 | it('generates a payment intent client secret', function () { 368 | expect($this->fake->stripeCorePaymentIntentClientSecret())->toStartWith('pi_')->toContain('_secret_')->toHaveLength(60)->toBeString(); 369 | }); 370 | 371 | it('generates a crypto onramp session client secret', function () { 372 | expect($this->fake->stripeCryptoOnrampSessionClientSecret())->toStartWith('cos_')->toContain('_secret_')->toHaveLength(71)->toBeString(); 373 | }); 374 | 375 | it('generates a connect capability id', function () { 376 | expect($this->fake->stripeConnectCapabilityId())->toStartWith('acap_')->toHaveLength(29)->toBeString(); 377 | }); 378 | 379 | it('generates a cash balance transaction id', function () { 380 | expect($this->fake->stripeCashBalanceTransactionId())->toStartWith('ccsbtxn_')->toHaveLength(32)->toBeString(); 381 | }); 382 | 383 | it('generates a issuing token id', function () { 384 | expect($this->fake->stripeIssuingTokenId())->toStartWith('intok_')->toHaveLength(30)->toBeString(); 385 | }); 386 | 387 | it('generates a payment method configuration id', function () { 388 | expect($this->fake->stripePaymentMethodConfigurationId())->toStartWith('pmc_')->toHaveLength(28)->toBeString(); 389 | }); 390 | 391 | it('generates a payment method domain id', function () { 392 | expect($this->fake->stripePaymentMethodDomainId())->toStartWith('pmd_')->toHaveLength(28)->toBeString(); 393 | }); 394 | 395 | it('generates a setup intent client secret', function () { 396 | expect($this->fake->stripeCoreSetupIntentClientSecret())->toStartWith('seti_')->toHaveLength(68)->toBeString(); 397 | }); 398 | 399 | it('generates a core bank account token id', function () { 400 | expect($this->fake->stripeCoreBankAccountTokenId())->toStartWith('btok_')->toHaveLength(29)->toBeString(); 401 | }); 402 | 403 | it('generates a core pii token id', function () { 404 | expect($this->fake->stripeCorePersonallyIdentifiableInformationTokenId())->toStartWith('pii_')->toHaveLength(28)->toBeString(); 405 | }); 406 | 407 | it('generates a core account token id', function () { 408 | expect($this->fake->stripeCoreAccountTokenId())->toStartWith('ct_')->toHaveLength(27)->toBeString(); 409 | }); 410 | 411 | it('generates a core person token id', function () { 412 | expect($this->fake->stripeCorePersonTokenId())->toStartWith('cpt_')->toHaveLength(28)->toBeString(); 413 | }); 414 | 415 | it('generates a core cvc token id', function () { 416 | expect($this->fake->stripeCoreCvcUpdateTokenId())->toStartWith('cvctok_')->toHaveLength(31)->toBeString(); 417 | }); 418 | 419 | it('generates a billing credit note line item id', function () { 420 | expect($this->fake->stripeBillingCreditNoteLineItemId())->toStartWith('il_')->toHaveLength(27)->toBeString(); 421 | }); 422 | 423 | it('generates a billing customer portal configuration id', function () { 424 | expect($this->fake->stripeBillingCustomerPortalConfigurationId())->toStartWith('bpc_')->toHaveLength(28)->toBeString(); 425 | }); 426 | 427 | it('generates a confirmation token id', function () { 428 | expect($this->fake->stripeCoreConfirmationTokenId())->toStartWith('ctoken_')->toHaveLength(31)->toBeString(); 429 | }); 430 | 431 | it('generates a billing invoice line item id', function () { 432 | expect($this->fake->stripeBillingInvoiceLineItemId())->toStartWith('il_tmp_')->toHaveLength(31)->toBeString(); 433 | }); 434 | 435 | it('generates a billing alert id', function () { 436 | expect($this->fake->stripeBillingAlertId())->toStartWith('alrt_')->toHaveLength(10)->toBeString(); 437 | }); 438 | 439 | it('generates a billing meter id', function () { 440 | expect($this->fake->stripeBillingMeterId())->toStartWith('mtr_')->toHaveLength(9)->toBeString(); 441 | }); 442 | 443 | it('generates a billing meter event summary id', function () { 444 | expect($this->fake->stripeBillingMeterEventSummaryId())->toStartWith('mtrusg_')->toHaveLength(192)->toBeString(); 445 | }); 446 | 447 | it('generates an issuing personalization design id', function () { 448 | expect($this->fake->stripeIssuingPersonalizationDesignsId())->toStartWith('ipcd_')->toHaveLength(19)->toBeString(); 449 | }); 450 | 451 | it('generates an issuing physical bundles id', function () { 452 | expect($this->fake->stripeIssuingPhysicalBundlesId())->toStartWith('ics_')->toHaveLength(18)->toBeString(); 453 | }); 454 | 455 | it('generates an entitlement feature id', function () { 456 | expect($this->fake->stripeEntitlementFeatureId())->toStartWith('feat_')->toHaveLength(37)->toBeString(); 457 | }); 458 | 459 | it('generates an entitlement product feature id', function () { 460 | expect($this->fake->stripeEntitlementProductFeatureId())->toStartWith('prodft_')->toHaveLength(21)->toBeString(); 461 | }); 462 | 463 | it('generates an entitlement active entitlement id', function () { 464 | expect($this->fake->stripeEntitlementActiveEntitlementId())->toStartWith('ent_')->toHaveLength(36)->toBeString(); 465 | }); 466 | 467 | it('generates a climate order id', function () { 468 | expect($this->fake->stripeClimateOrderId())->toStartWith('climorder_')->toHaveLength(34)->toBeString(); 469 | }); 470 | 471 | it('generates a climate product id', function () { 472 | expect($this->fake->stripeClimateProductId())->toStartWith('climsku_')->toHaveLength(32)->toBeString(); 473 | }); 474 | 475 | it('generates a climate supplier id', function () { 476 | expect($this->fake->stripeClimateSupplierId())->toStartWith('climsup_')->toHaveLength(32)->toBeString(); 477 | }); 478 | 479 | it('generates a forwarding request id', function () { 480 | expect($this->fake->stripeForwardingRequestId())->toStartWith('fwd_req_')->toHaveLength(13)->toBeString(); 481 | }); 482 | 483 | it('generates a credit grant id', function () { 484 | expect($this->fake->stripeBillingCreditGrantId())->toStartWith('credgr_')->toHaveLength(31)->toBeString(); 485 | }); 486 | 487 | it('generates an event destination id', function () { 488 | expect($this->fake->stripeCoreEventDestinationId())->toStartWith('ed_')->toHaveLength(27)->toBeString(); 489 | }); 490 | 491 | it('generates a usage record summary id', function () { 492 | expect($this->fake->stripeBillingUsageRecordSummaryId())->toStartWith('sis_')->toHaveLength(28)->toBeString(); 493 | }); 494 | 495 | it('generates a source id', function () { 496 | expect($this->fake->stripeBillingSourceId())->toStartWith('src_')->toHaveLength(28)->toBeString(); 497 | }); 498 | 499 | it('generates a invoice rendering template id', function () { 500 | expect($this->fake->stripeBillingInvoiceRenderingTemplateId())->toStartWith('inrtem_')->toHaveLength(31)->toBeString(); 501 | }); 502 | 503 | it('generates a credit balance transaction id', function () { 504 | expect($this->fake->stripeBillingCreditBalanceTransactionId())->toStartWith('cbtxn_')->toHaveLength(30)->toBeString(); 505 | }); 506 | 507 | it('generates a financing offer id', function () { 508 | expect($this->fake->stripeFinancingOfferId())->toStartWith('financingoffer_')->toHaveLength(39)->toBeString(); 509 | }); --------------------------------------------------------------------------------