JonPurvis/faker-stripe
Open on GitHub →
FakerPHP Stripe ID Provider
👋 Introduction
This package allows FakerPHP to generate fake IDs which have the same structure you can expect to be returned from Stripe. The wonderful Pest is used to run tests contained within this package, which requires a minimum PHP Version of 8.3.
This package is listed on the official FakerPHP website as a third party library.
✨Features
This package can currently generate fake IDs for the following Stripe resources. To avoid any confusion, the names of resources should match what's in this package.
Core Resources
| API Resource | Method | Example |
|---|---|---|
| Balance Transactions | stripeCoreBalanceTransactionId() |
txn_na40ulkbDvvegzALfY8w61udH |
| Charges | stripeCoreChargeId() |
ch_Dxy18EPyj6XXvqQiqApPQ8dA |
| Customers | stripeCoreCustomerId() |
cus_uW8qUwsTwKKtY3 |
| Disputes | stripeCoreDisputeId() |
dp_e3ZeEytdlpOxMtRg9M88RMcq |
| Events | stripeCoreEventId() |
evt_diyd59RDTVw8ZxrnkOt62mFS |
| Event Destinations | stripeCoreEventDestinationId() |
ed_d1RhD6TdVjw78ZxrnkOt62mFS |
| Files | stripeCoreFileId() |
file_qrbRTo7XbytwvE6w3SQU8QXK |
| File Links | stripeCoreFileLinkId() |
link_Z5Tesn6zQYYdov5R3bCblM8A |
| FX Quotes | stripeCoreFxQuoteId() |
fxq_An1iMLYse0YRmS43Ls2ZNCdd |
| Mandates | stripeCoreMandateId() |
mandate_S4EbkGH8MFAOWUXivQqcV7wx |
| PaymentIntents | stripeCorePaymentIntentId() |
pi_KiAjc3WFzvswIhq8IkCLXNBW |
| PaymentIntents | stripeCorePaymentIntentClientSecret() |
pi_rZh1PKbBkmMFkHve9GKRKyg4_secret_dr3lRVfoKD8ew3BUmYZYuVONV |
| PaymentIntent Line Items | stripeCorePaymentIntentLineItemId() |
uli_T1KmwLEvkprqQb |
| Ephemeral Keys | stripeCoreEphemeralKeyId() |
ephkey_1Mr6PhLkdIwHu7ix9Al0eucz |
| SetupIntents | stripeCoreSetupIntentId() |
seti_yeYZcpT970pn6sBXlAkj8AbK |
| SetupIntents | stripeCoreSetupIntentClientSecret() |
seti_xFyqGss1WNuKVCKf1KnXfD3b_secret_Yy5L7jzP4RuoQrCiIBqXn9FWuSvX3z6 |
| SetupAttempts | stripeCoreSetupAttemptId() |
setatt_JBHfYghz8HiScAnOcOKin75X |
| Payouts | stripeCorePayoutId() |
po_YqFWOxztWRuLCJezThbHktTP |
| Refunds | stripeCoreRefundId() |
re_3BebPOs89OAgEtXAOG0c1eF4 |
| Payment Records | stripeCorePaymentRecordId() |
pr_5RV730PrHyAEi |
| Payment Attempt Records | stripeCorePaymentAttemptRecordId() |
par_4sdDKj23235s |
| Confirmation Tokens | stripeCoreConfirmationTokenId() |
ctoken_UDlKXzYnsCqEJvomcWWqCnTF |
| Account Tokens | stripeCoreAccountTokenId() |
ct_XPKqNZwOTjWJatx4A5zW2Myh |
| Bank Account Tokens | stripeCoreBankAccountTokenId() |
btok_8RnxS6Y358qBuRRYS4el8LEo |
| Card Tokens | stripeCoreTokenId() |
tok_q1KiYddcC48Tqney3T8Vnkzu |
| CVC Update Tokens | stripeCoreCvcUpdateTokenId() |
cvctok_wWV1bniJ16gsBjJlIMrN8T87 |
| Person Tokens | stripeCorePersonTokenId() |
cpt_MtqTlVzM2qmAIv0KhZJ0qV4g |
| v2 Account Tokens | stripeV2AccountTokenId() |
accttok_61RS0CgWt1xBt8M1Q16RS0Cg0WSQO5ZXUVpZxZ9tAIbY |
| v2 Person Tokens | stripeV2PersonTokenId() |
perstok_61RS0CgWt1xBt8M1Q16RS0Cg0WSQO5ZXUVpZxZ9tAIbY |
| PII Tokens | stripeCorePersonallyIdentifiableInformationTokenId() |
pii_uCbQpWwZu3tJEUm18GiQsKAa |
| Batch Jobs | stripeCoreBatchJobId() |
batchv2_AbCdEfGhIjKlMnOpQrStUvWxYz |
| Workflows | stripeCoreWorkflowId() |
wf_dwqXjY61dhXHyp0NGLbrhymx |
| Workflow Runs | stripeCoreWorkflowRunId() |
wfrun_dwqXjY61dhXHyp0NGLbrhymx |
Payment Methods
| API Resource | Method | Example |
|---|---|---|
| Payment Methods | stripePaymentMethodId() |
pm_jkztRiUi5yqTNqHJTzTAVolI |
| Payment Method Configurations | stripePaymentMethodConfigurationId() |
pmc_BS6va641BwHZCexJscZ9LNH8 |
| Payment Method Domains | stripePaymentMethodDomainId() |
pmd_FcObWHJ3gtwujiuUhVhWSe2c |
| Bank Accounts | stripePaymentMethodBankAccountId() |
ba_gkcmh6gu31nALx6PJDJckqPn |
| Cash Balance Transactions | stripeCashBalanceTransactionId() |
ccsbtxn_6sKoup9yicpuPC7MykObBsjq |
| Cards | stripePaymentMethodCardId() |
card_A56nkfbrHtdQ7bv8I9eeQOtW |
Products
| API Resource | Method | Example |
|---|---|---|
| Products | stripeProductId() |
prod_Kp7fBKUx6qs3FC |
| Prices | stripeProductPriceId() |
price_YhlhAgy0lHbLcOWwFZ596x1S |
| Promotion Codes | stripeProductPromotionCodeId() |
promo_7ADzsJ6WuQIsKsIj4T4MTeIX |
| Discounts | stripeProductDiscountId() |
di_DleWj1FqYhsriqRSaQr6jCgs |
| Tax Codes | stripeProductTaxCodeId() |
txcd_90766505 |
| Tax Rates | stripeProductTaxRateId() |
txr_nNePe3bTkOwlrAbsAxpXzWXy |
| Shipping Rates | stripeProductShippingRateId() |
shr_Sg2ZpoUCsfdAujoCc8U8MDba |
| Trial Offers | stripeProductTrialOfferId() |
to_1Hh5Xx2eZvKYlo2C8JaUOv4R |
| Product Catalog Imports | stripeProductCatalogImportId() |
pcimprt_61O6nHqDsFuMtECYR16O0lef0dSQgZ0EhGyZsQCXQMls |
Checkout
| API Resource | Method | Example |
|---|---|---|
| Checkout Sessions | stripeCheckoutSessionId() |
cs_A1caKuWyEPOrovEkpYJLfId5uOpWzynW8ZunRYnA0J9RsPzdM6YeBfDG03 |
| Checkout Session Line Items | stripeCheckoutSessionLineItemId() |
li_1N4BEoLkdIwHu7ixWtXug1yk |
Payment Links
| API Resource | Method | Example |
|---|---|---|
| Payment Link | stripePaymentLinkId() |
plink_L85n1vZMv4QS0aYwj11TKjTy |
Shared Payment
| API Resource | Method | Example |
|---|---|---|
| Shared Payment Issued Token | stripeSharedPaymentIssuedTokenId() |
spt_1RgaZcFPC5QUO6ZCDVZuVA8q |
| Shared Payment Granted Token | stripeSharedPaymentGrantedTokenId() |
spt_1RgaZcFPC5QUO6ZCDVZuVA8q |
Billing
| API Resource | Method | Example |
|---|---|---|
| Credit Note | stripeBillingCreditNoteId() |
cn_37b9KW8lODWCDSilck1hs0on |
| Credit Note Line Items | stripeBillingCreditNoteLineItemId() |
il_75E91IzYCJaaSbESOZl5GQiF |
| Credit Balance Transactions | stripeBillingCreditBalanceTransactionId() |
cbtxn_37b3DSyi5lc9uck2sp1hs0on |
| Customer Portal Session | stripeBillingCustomerPortalId() |
bps_HFXl8fnSxXjVUvepP0g7cfEH |
| Customer Portal Configuration | stripeBillingCustomerPortalConfigurationId() |
bpc_sfteIfmkKXSNTxL7nA5dNKVS |
| Invoices | stripeBillingInvoiceId() |
in_pBNUeaVUmJ8I44Fx1OajNLQn |
| Invoice Items | stripeBillingInvoiceItemId() |
ii_gOWpZpoGoMOE5IYVS86mmGXS |
| Invoice Line Item | stripeBillingInvoiceLineItemId() |
il_tmp_lZHqliBZKLzgXuBajqYaAhxz |
| Invoice Payment | stripeBillingInvoicePaymentId() |
inpay_uUOgHHV0V88gjsZz4kh1at5D |
| Invoice Rendering Template | stripeBillingInvoiceRenderingTemplateId() |
inrtem_lZHqlidX3uB6aFqtYeafAhxz |
| Alerts | stripeBillingAlertId() |
alrt_39061 |
| Alert Notifications | stripeBillingAlertNotificationId() |
threvt_Na40ulkbDvvegzALfY8w61ud |
| Meters | stripeBillingMeterId() |
mtr_53464 |
| Meter Event Adjustment | stripeBillingMeterAdjustmentId() |
mtr_event_adj_68238901 |
| Meter Event Summary | stripeBillingMeterEventSummaryId() |
mtrusg_Be99DBj9c2jnNh5IxKt2bULP2Mb36xnO29OpHiVsfIeuyyI3OGvdtem4qLZ5e0O3ZB0cT93uhqpQZWJdNtYNmOERzX7AOan9OHu373TqGQoVYVBtzghvVp0oMclD2iZfnGYdeePNUvi5gKtsE36tuhev4h62i79IM8uWTdS0U77j4cz0DDOMZCcvX |
| Credit Grants | stripeBillingCreditGrantId() |
credgr_37b9KW82CDhSi5lcuk1hs0on |
| Credit Grants | stripeBillingCreditGrantCrgrId() |
crgr_37b9KW82CDhSi5lcuk1hs0on |
| Credit Balance Transactions | stripeBillingCustomerBalanceTransactionId() |
cbtxn_SboO9vmMCUoTg6iGGdsOQ18R |
| Plans | stripeBillingPlanId() |
price_9wWZ7dtmQSWvQDhFBJB49sv8 |
| Quote | stripeBillingQuoteId() |
qt_qrx3tn3rnQ1USENFK1gJcXLv |
| Subscriptions | stripeBillingSubscriptionId() |
sub_wMwsJiaZpdRfrF7WXkP0ibmc |
| Subscription Items | stripeBillingSubscriptionItemId() |
si_3OdBLaD7p37H2A |
| Subscription Schedules | stripeBillingSubscriptionScheduleId() |
sub_sched_OnyC6GSR3kjse08ehVNsB5U0 |
| Tax IDs | stripeBillingCustomerTaxIdId() |
txi_Vs7BSOcldH5QIN35U8lSlJuc |
| Test Clocks | stripeBillingTestClockId() |
clock_6QR6dCPpUhhBg81wmyFF4VtJ |
| Feedback Options | stripeBillingFeedbackOptionId() |
fo_Na40ulkbDvvegzALfY8w61ud |
Capital
| API Resource | Method | Example |
|---|---|---|
| FinancingOffers | stripeFinancingOfferId() |
financingoffer_Y15ngYE41jww8upx9J2PcFXxQWBjp |
Reserve
| API Resource | Method | Example |
|---|---|---|
| Reserve Plans | stripeReservePlanId() |
resplan_Y15ngYE41jww8upx9J2PcFXxQWBjp |
| Reserve Holds | stripeReserveHoldId() |
reshold_Y15ngYE41jww8upx9J2PcFXxQWBjp |
| Reserve Releases | stripeReserveReleaseId() |
resrel_Y15ngYE41jww8upx9J2PcFXxQWBjp |
Connect
| API Resource | Method | Example |
|---|---|---|
| Accounts | stripeConnectAccountId() |
acct_l8cMrvSDcUT4qP2h |
| Destination Charges | stripeConnectDestinationChargeId() |
py_Dxy18EPyj6XXvqQiqApPQ8dA |
| Destination Charge Refunds | stripeConnectDestinationChargeRefundId() |
pyr_3BebPOs89OAgEtXAOG0c1eF4 |
| Application Fees | stripeConnectApplicationFeeId() |
fee_ITNGc4r7B4QMjtOjsLr1GA2U |
| Application Fee Refunds | stripeConnectApplicationFeeRefundId() |
fr_XxY71TOJinzdNkmEQUVtlUGk |
| Capabilities | stripeConnectCapabilityId() |
acap_gettfmKTrHMdUQgppBj8BJ6F |
| External Bank Accounts | stripeConnectExternalAccountId() |
ba_j8048CaKvbk1ie7lfxyzXF19 |
| External Account Cards | stripeExternalAccountCardId() |
card_0TsW9JT5P8vkQ1eyWiCn4z0I |
| Persons | stripeConnectPersonId() |
person_cNquFb7JU2nVsfIlprJHqIc1 |
| Top-ups | stripeConnectTopUpId() |
tu_kdxjWmOqbz9J5rMdnibcnr37 |
| Transfers | stripeConnectTransferId() |
tr_1gClurOotKNBjvk7ktS3JHxo |
| Transfer Reversals | stripeConnectTransferReversalId() |
trr_LWr56oP4aoPIjVeXGOiFOJ6f |
| Secrets | stripeConnectSecretManagementId() |
appsecret_QjQnyoan5rtIYdHSokfut7VD |
Fraud
| API Resource | Method | Example |
|---|---|---|
| Early Fraud Warning | stripeFraudEarlyFraudWarningId() |
issfr_NDwczkwka50cAHRFVfnbQP30 |
| Reviews | stripeFraudReviewId() |
prv_Zlx9K6ixTcigHUnOdpxqCjOO |
| Value Lists | stripeFraudValueListId() |
rsl_C8PVL4lNS75t4PWEscJUXEkm |
| Value List Items | stripeFraudValueListItemId() |
rsli_QQdPv6uWYm7nZUlX3g65TfGV |
| Payment Evaluations | stripeFraudPaymentEvaluationId() |
peval_NDwczkwka50cAHRFVfnbQP30 |
| Customer Evaluations | stripeFraudCustomerEvaluationId() |
cuseval_NDwczkwka50cAHRFVfnbQP30 |
| Radar Sessions | stripeFraudRadarSessionId() |
rse_NDwczkwka50cAHRFVfnbQP30 |
Issuing
| API Resource | Method | Example |
|---|---|---|
| Authorizations | stripeIssuingAuthorizationId() |
iauth_GyuotdxkKEHCNNYHohzBBuBh |
| Cardholders | stripeIssuingCardholderId() |
ich_EyqQ6EcYkhzgyrGEQSCY68EB |
| Cards | stripeIssuingCardId() |
ic_IsXAmEVzInXUPtq4uttDZ2g2 |
| Disputes | stripeIssuingDisputeId() |
idp_lXR4WsU6fhdpErzWVNOr24Ux |
| Personalization Designs | stripeIssuingPersonalizationDesignsId() |
ipcd_ulVGQxe21jR4vx |
| Physical Bundles | stripeIssuingPhysicalBundlesId() |
ics_Kd7CQOUvHjJelX |
| Tokens | stripeIssuingTokenId() |
intok_HMkTW4FnWckzqqNGGFJP4I7E |
| Transactions | stripeIssuingTransactionId() |
ipi_FqGAHy3JUvUsjWdqyaViRFm2 |
Terminal
| API Resource | Method | Example |
|---|---|---|
| Location | stripeTerminalLocationId() |
tml_UntmyAU2XPdrxOznzLeRFOue |
| Reader | stripeTerminalReaderId() |
tmr_2j8WBisfMEwMBNtLJEJ7uLOe |
| Terminal Hardware Order | stripeTerminalHardwareOrderId() |
thor_BgOkryA2RaqfMCzMomo4VDQ5 |
| Terminal Hardware Product | stripeTerminalHardwareProductId() |
thpr_GgSNDKrG2YURmV |
| Terminal Hardware SKU | stripeTerminalHardwareSkuId() |
thsku_46eIJkxj8F6Dfb |
| Terminal Hardware Shipping Method | stripeTerminalHardwareShippingMethodId() |
thsm_HJclEgx3fzfYd5 |
| Configuration | stripeTerminalConfigurationId() |
tmc_L7yWqYiNsihDrn |
Treasury
| API Resource | Method | Example |
|---|---|---|
| FinancialAccounts | stripeTreasuryFinancialAccountId() |
fa_SHiUjM3c13bPdvV81YlFYwQu |
| Transactions | stripeTreasuryTransactionId() |
trxn_VCKBAZWMzRUul2KHkWZjHGRt |
| TransactionEntries | stripeTreasuryTransactionEntryId() |
trxne_xe1YTcpq1tmWUgzNABC8kT1S |
| OutboundTransfers | stripeTreasuryOutboundTransferId() |
obt_9f5fWmY0s8Rbbfi8AoeifoRC |
| OutboundPayments | stripeTreasuryOutboundPaymentId() |
obp_QOJPdQ7lbAybgALjh67lgbsA |
| InboundTransfers | stripeTreasuryInboundTransferId() |
ibt_JE9DIuWCZ9bY9xGPeKYPkSI5 |
| ReceivedCredits | stripeTreasuryReceivedCreditId() |
rc_46y23bSUUCoMmsdv7Zvx0zYr |
| ReceivedDebits | stripeTreasuryReceivedDebitId() |
rd_ylnZC0HqdHBWWouwFsQhE4GU |
| CreditReversals | stripeTreasuryCreditReversalId() |
credrev_awpfYT4hppBEmsz9KPgtOYDm |
| DebitReversals | stripeTreasuryDebitReversalId() |
debrev_ykpt4Mi6yZAPrm8upq3yKI5r |
Money Management
| API Resource | Method | Example |
|---|---|---|
| Financial Addresses | stripeMoneyManagementFinancialAddressId() |
finaddr_61O6nHqDsFuMtECYR16O0lef0dSQgZ0EhGyZsQCXQMls |
| Adjustments | stripeMoneyManagementAdjustmentId() |
adj_65Pj770ytFhPwgkQg0116Pj6mS0dSQaN2JL1S0NhRweDjE |
| Outbound Payment Quotes | stripeMoneyManagementOutboundPaymentQuoteId() |
obpq_65Pj770ytFhPwgkQg0116Pj6mS0dSQaN2JL1S0NhRweDjE |
| Outbound Setup Intents | stripeMoneyManagementOutboundSetupIntentId() |
osi_61O6nHqDsFuMtECYR16O0lef0dSQgZ0EhGyZsQCXQMls |
| Inbound Transfer History Entries | stripeMoneyManagementInboundTransferHistoryEntryId() |
ibthe_61O6nHqDsFuMtECYR16O0lef0dSQgZ0EhGyZsQCXQMls |
| French Bank Account Payout Methods | stripeMoneyManagementFrenchBankAccountPayoutMethodId() |
frba_dwqXjY61dhXHyp0NGLbrhymxAbCdEfGh |
Entitlements
| API Resource | Method | Example |
|---|---|---|
| Feature | stripeEntitlementFeatureId() |
feat_YZF6aSsx1eTNhEYrsMw6xdUeZ6lESQjt |
| Product Feature | stripeEntitlementProductFeatureId() |
prodft_8qi4lJKVjxGy8u |
| Active Entitlement | stripeEntitlementActiveEntitlementId() |
ent_avB0r4MuPxc66IVgc2EF4lK50OznONZu |
Sigma
| API Resource | Method | Example |
|---|---|---|
| Scheduled Queries | stripeSigmaScheduledQueryRunId() |
sqr_89Lp2zqyTtqJXSFuPn9zHIcZ |
| Query Run | stripeSigmaQueryId() |
qry_dwqXjY61dhXHyp0NGLbrhymx |
Reporting
| API Resource | Method | Example |
|---|---|---|
| Report Runs | stripeReportingReportRunId() |
frr_jJ9LNixW3dEQco0XTeX2zE1R |
Financial Connections
| API Resource | Method | Example |
|---|---|---|
| Accounts | stripeFinancialConnectionAccountId() |
fca_z3JzQ1OCkYved5uWOqh3b387 |
| Account Owner | stripeFinancialConnectionAccountOwnershipId() |
fcaowns_XwyWHMQFo9koh9U1TuOMW43D |
| Account Owners | stripeFinancialConnectionAccountOwnerId() |
fcaown_XwyWHMQFo9koh9U1TuOMW43D |
| Authorizations | stripeFinancialConnectionAuthorizationId() |
fcauth_XwyWHMQFo9koh9U1TuOMW43D |
| Sessions | stripeFinancialConnectionSessionId() |
fcsess_ZnomHexUQ68qiad2GWqQsvsa |
| Transactions | stripeFinancialConnectionTransactionId() |
fctxn_yIcXfBzg3NSJRYHqIW5spz4v |
| Transaction Refresh | stripeFinancialConnectionTransactionRefreshId() |
fctxnref_qjmwOP8D8hJlSBgSKqHsY0Bi |
Tax
| API Resource | Method | Example |
|---|---|---|
| Tax Calculations | stripeTaxCalculationId() |
taxcalc_3tXT5aZ0nMqhD0sFe8VtY8tR |
| Tax Locations | stripeTaxLocationId() |
taxloc_3tXT5aZ0nMqhD0sFe8VtY8tR |
| Tax Associations | stripeTaxAssociationId() |
taxa_3tXT5aZ0nMqhD0sFe8VtY8tR |
| Tax Registrations | stripeTaxRegistrationId() |
taxreg_ZEKy4vPjjv9yab |
| Tax Transactions | stripeTaxTransactionId() |
tax_nnTCZZscXpM9xaJyyncMJOck |
| Transaction Line Items | stripeTaxTransactionLineItemId() |
tax_li_NSTCDtCYyvp5dT |
Identity
| API Resource | Method | Example |
|---|---|---|
| Verification Session | stripeIdentityVerificationSessionId() |
vs_j8AvYT7Tbmjz26tASmjdcyNt |
| Verification Report | stripeIdentityVerificationReportId() |
vr_IwuD3wV5qfD4t4fbTOzWwUm6 |
Crypto
| API Resource | Method | Example |
|---|---|---|
| Crypto Onramp Sessions | stripeCryptoOnrampSessionId() |
cos_wlo5PYZC2j8lFHnMaxbuFBK8 |
| Crypto Onramp Sessions | stripeCryptoOnrampSessionClientSecret() |
cos_Wjo3OVUVusWY54RHF6oCM0Jm_secret_Bm9iRlLbb82K19mwOxQE9jVdA0U8rMEmKO6 |
| Crypto Consumer Wallets | stripeCryptoConsumerWalletId() |
ccw_wlo5PYZC2j8lFHnMaxbuFBK8 |
| Crypto Customers | stripeCryptoCustomerId() |
crc_8Kp3mXnQwR2Vb5LzTh9JfPqY |
| Crypto Deposit Addresses | stripeCryptoDepositAddressId() |
cda_wlo5PYZC2j8lFHnMaxbuFBK8 |
Climate
| API Resource | Method | Example |
|---|---|---|
| Climate Order | stripeClimateOrderId() |
climorder_zPgRtPy8onKSuWtEHoNZidD9 |
| Climate Product | stripeClimateProductId() |
climsku_zhSJ6n8xrB3iLS4yHNVxzpBq |
| Climate Supplier | stripeClimateSupplierId() |
climsup_YKxeDsj2hhmR2cqmangtVy02 |
Forwarding
| API Resource | Method | Example |
|---|---|---|
| Forwarding Request | stripeForwardingRequestId() |
fwd_req_90746 |
Privacy
| API Resource | Method | Example |
|---|---|---|
| Redaction Job | stripePrivacyRedactionJobId() |
prj_167 |
| Redaction Job Validation Error | stripePrivacyRedactionJobValidationErrorId() |
prjve_166 |
IAM
| API Resource | Method | Example |
|---|---|---|
| Activity Logs | stripeIamActivityLogId() |
accact_1SdeybAiQNL8swvtMHyVtfCU |
Apps
| API Resource | Method | Example |
|---|---|---|
| Apps | stripeAppsAppId() |
app_dwqXjY61dhXHyp0NGLbrhymxAbCdEfGh |
| Installs | stripeAppsInstallId() |
appinst_dwqXjY61dhXHyp0NGLbrhymxAbCdEfGh |
Webhooks
| API Resource | Method | Example |
|---|---|---|
| Webhook Endpoints | stripeWebhookEndpointId() |
we_irKQp8JwXgUxXFefCM6zlx1R |
| Webhook Application | stripeWebhookApplicationId() |
ca_Y5nYE1wwup9JPcXxQ9JaJWBRAJiFMujp |
Balance debit agreements
| API Resource | Method | Example |
|---|---|---|
| Stripe Balance Debit Agreements | stripeBalanceDebitAgreementId() |
sbda_1Na5YT2eZvKYlo2Ctn7SPPuy |
| Seller Network Business Profiles | stripeSellerNetworkBusinessProfileId() |
snbp_1Na5YT2eZvKYlo2Ctn7SPPuz |
API keys
| API Resource | Method | Example |
|---|---|---|
| Restricted live keys | stripeRestrictedLiveApiKeyId() |
rk_live_ + 24 random characters |
API keys (mk_) |
stripeApiMkKeyId() |
mk_Na40ulkbDvvegzALfY8w61ud |
Other nested IDs
| API Resource | Method | Example |
|---|---|---|
Health alerts (healt_) |
stripeHealthAlertId() |
healt_Na40ulkbDvvegzALfY8w61ud |
Unidentified (cxt_) |
stripeCxtId() |
cxt_Na40ulkbDvvegzALfY8w61ud |
Unidentified (intd_) |
stripeIntdId() |
intd_Na40ulkbDvvegzALfY8w61ud |
Legacy resources
Stripe still documents some older APIs that are not recommended for new integrations. This package may still generate IDs for tests against existing data.
| API Resource | Method | Notes |
|---|---|---|
| Sources | stripeBillingSourceId() |
Legacy payment source API; prefer Payment Methods. |
Resources such as Account Link and Customer Session do not expose a persistent id in the API (only URLs or client_secret), so they are not included as ID generators here.
📚 Usage / Examples
Pest
it('generates a well structured stripe account id', function () {
fake()->addProvider(new Stripe(fake()));
expect(fake()->stripeConnectAccountId())->toStartWith('acct_')->toHaveLength(21)->toBeString();
});
PHPUnit
public function testGeneratesWellStructuredStripeAccountId()
{
$faker = Factory::create();
$faker->addProvider(new Stripe($faker));
$this->assertStringStartsWith('acct_', $faker->stripeConnectAccountId());
}
Laravel Factories
use WithFaker;
public function definition(): array
{
$this->faker->addProvider(new Stripe($this->faker));
return [
'id' => $this->faker->stripeConnectAccountId(),
'name' => 'John Doe',
'email' => 'john.doe@testing.co.uk'
];
}