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.1.
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.
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 |
Files | stripeCoreFileId() |
file_qrbRTo7XbytwvE6w3SQU8QXK |
File Links | stripeCoreFileLinkId() |
link_Z5Tesn6zQYYdov5R3bCblM8A |
Mandates | stripeCoreMandateId() |
mandate_S4EbkGH8MFAOWUXivQqcV7wx |
PaymentIntents | stripeCorePaymentIntentId() |
pi_KiAjc3WFzvswIhq8IkCLXNBW |
PaymentIntents | stripeCorePaymentIntentClientSecret() |
pi_rZh1PKbBkmMFkHve9GKRKyg4_secret_dr3lRVfoKD8ew3BUmYZYuVONV |
SetupAttempts | stripeCoreSetupAttemptId() |
setatt_JBHfYghz8HiScAnOcOKin75X |
SetupIntents | stripeCoreSetupIntentId() |
seti_yeYZcpT970pn6sBXlAkj8AbK |
Payouts | stripeCorePayoutId() |
po_YqFWOxztWRuLCJezThbHktTP |
Refunds | stripeCoreRefundId() |
re_3BebPOs89OAgEtXAOG0c1eF4 |
Tokens | stripeCoreTokenId() |
tok_q1KiYddcC48Tqney3T8Vnkzu |
API Resource | Method | Example |
---|---|---|
Payment Methods | stripePaymentMethodId() |
pm_jkztRiUi5yqTNqHJTzTAVolI |
Bank Accounts | stripePaymentMethodBankAccountId() |
ba_gkcmh6gu31nALx6PJDJckqPn |
Cards | stripePaymentMethodCardId() |
card_A56nkfbrHtdQ7bv8I9eeQOtW |
API Resource | Method | Example |
---|---|---|
Products | stripePaymentMethodId() |
pm_3ffsQykg0u0OlEEkHph2Uhvl |
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 |
API Resource | Method | Example |
---|---|---|
Checkout Sessions | stripeCheckoutSessionId() |
cs_A1caKuWyEPOrovEkpYJLfId5uOpWzynW8ZunRYnA0J9RsPzdM6YeBfDG03 |
API Resource | Method | Example |
---|---|---|
Payment Links | stripePaymentLinkId() |
plink_L85n1vZMv4QS0aYwj11TKjTy |
API Resource | Method | Example |
---|---|---|
Credit Notes | stripeBillingCreditNoteId() |
cn_37b9KW8lODWCDSilck1hs0on |
Customer Balance Transactions | stripeBillingCustomerBalanceTransactionId() |
cbtxn_SboO9vmMCUoTg6iGGdsOQ18R |
Credit Notes | stripeBillingCustomerPortalId() |
bps_HFXl8fnSxXjVUvepP0g7cfEH |
Credit Notes | stripeBillingCustomerTaxIdId() |
txi_Vs7BSOcldH5QIN35U8lSlJuc |
Invoices | stripeBillingInvoiceId() |
in_pBNUeaVUmJ8I44Fx1OajNLQn |
Invoice Items | stripeBillingInvoiceItemId() |
ii_gOWpZpoGoMOE5IYVS86mmGXS |
Plans | stripeBillingPlanId() |
price_9wWZ7dtmQSWvQDhFBJB49sv8 |
Quotes | stripeBillingQuoteId() |
qt_qrx3tn3rnQ1USENFK1gJcXLv |
Subscriptions | stripeBillingSubscriptionId() |
sub_wMwsJiaZpdRfrF7WXkP0ibmc |
Subscription Items | stripeBillingSubscriptionItemId() |
si_3OdBLaD7p37H2A |
Subscription Schedules | stripeBillingSubscriptionScheduleId() |
sub_sched_OnyC6GSR3kjse08ehVNsB5U0 |
Test Clocks | stripeBillingTestClockId() |
clock_6QR6dCPpUhhBg81wmyFF4VtJ |
Usage Records | stripeBillingUsageRecordId() |
mbur_ppVgDLt5HcG8zP48Grk7NZfP |
API Resource | Method | Example |
---|---|---|
Accounts | stripeConnectAccountId() |
acct_l8cMrvSDcUT4qP2h |
Application Fees | stripeConnectApplicationFeeId() |
fee_ITNGc4r7B4QMjtOjsLr1GA2U |
Application Fee Refunds | stripeConnectApplicationFeeRefundId() |
fr_XxY71TOJinzdNkmEQUVtlUGk |
External Accounts | stripeConnectExternalAccountId() |
ba_j8048CaKvbk1ie7lfxyzXF19 |
Persons | stripeConnectPersonId() |
person_cNquFb7JU2nVsfIlprJHqIc1 |
Top-ups | stripeConnectTopUpId() |
tu_kdxjWmOqbz9J5rMdnibcnr37 |
Transfers | stripeConnectTransferId() |
tr_1gClurOotKNBjvk7ktS3JHxo |
Transfer Reversals | stripeConnectTransferReversalId() |
trr_LWr56oP4aoPIjVeXGOiFOJ6f |
Secret Management | stripeConnectSecretManagementId() |
appsecret_QjQnyoan5rtIYdHSokfut7VD |
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 |
API Resource | Method | Example |
---|---|---|
Authorizations | stripeIssuingAuthorizationId() |
iauth_GyuotdxkKEHCNNYHohzBBuBh |
Cardholders | stripeIssuingCardholderId() |
ich_EyqQ6EcYkhzgyrGEQSCY68EB |
Cards | stripeIssuingCardId() |
ic_IsXAmEVzInXUPtq4uttDZ2g2 |
Disputes | stripeIssuingDisputeId() |
idp_lXR4WsU6fhdpErzWVNOr24Ux |
Transactions | stripeIssuingTransactionId() |
ipi_FqGAHy3JUvUsjWdqyaViRFm2 |
API Resource | Method | Example |
---|---|---|
Locations | stripeTerminalLocationId() |
tml_UntmyAU2XPdrxOznzLeRFOue |
Readers | stripeTerminalReaderId() |
tmr_2j8WBisfMEwMBNtLJEJ7uLOe |
Hardware Orders | stripeTerminalHardwareOrderId() |
thor_BgOkryA2RaqfMCzMomo4VDQ5 |
Hardware Products | stripeTerminalHardwareProductId() |
thpr_GgSNDKrG2YURmV |
Hardware SKUs | stripeTerminalHardwareSkuId() |
thsku_46eIJkxj8F6Dfb |
Hardware Shipping Methods | stripeTerminalHardwareShippingMethodId() |
thsm_HJclEgx3fzfYd5 |
Configurations | stripeTerminalConfigurationId() |
tmc_L7yWqYiNsihDrn |
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 |
API Resource | Method | Example |
---|---|---|
Scheduled Queries | stripeSigmaScheduledQueryRunId() |
sqr_89Lp2zqyTtqJXSFuPn9zHIcZ |
API Resource | Method | Example |
---|---|---|
Report Runs | stripeReportingReportRunId() |
frr_jJ9LNixW3dEQco0XTeX2zE1R |
API Resource | Method | Example |
---|---|---|
Accounts | stripeFinancialConnectionAccountId() |
fca_z3JzQ1OCkYved5uWOqh3b387 |
Account Ownership | stripeFinancialConnectionsAccountOwnershipId() |
fcaowns_XwyWHMQFo9koh9U1TuOMW43D |
Sessions | stripeFinancialConnectionsSessionId() |
fcsess_ZnomHexUQ68qiad2GWqQsvsa |
Transactions | stripeFinancialConnectionTransactionId() |
fctxn_yIcXfBzg3NSJRYHqIW5spz4v |
Transaction Refresh | stripeFinancialConnectionTransactionRefreshId() |
fctxnref_qjmwOP8D8hJlSBgSKqHsY0Bi |
API Resource | Method | Example |
---|---|---|
Calculations | stripeTaxCalculationId() |
taxcalc_3tXT5aZ0nMqhD0sFe8VtY8tR |
Transactions | stripeTaxTransactionId() |
tax_nnTCZZscXpM9xaJyyncMJOck |
Transaction Line Items | stripeTaxTransactionLineItemId() |
tax_li_NSTCDtCYyvp5dT |
API Resource | Method | Example |
---|---|---|
VerificationSessions | stripeIdentityVerificationSessionId() |
vs_j8AvYT7Tbmjz26tASmjdcyNt |
Transactions | stripeIdentityVerificationReportId() |
vr_IwuD3wV5qfD4t4fbTOzWwUm6 |
API Resource | Method | Example |
---|---|---|
Onramp Sessions | stripeCryptoOnrampSessionId() |
cos_wlo5PYZC2j8lFHnMaxbuFBK8 |
Onramp Sessions | stripeCryptoOnrampSessionClientSecret() |
cos_Wjo3OVUVusWY54RHF6oCM0Jm_secret_Bm9iRlLbb82K19mwOxQE9jVdA0U8rMEmKO6 |
API Resource | Method | Example |
---|---|---|
Webhook Endpoints | stripeWebhookEndpointId() |
we_irKQp8JwXgUxXFefCM6zlx1R |
Webhook Application | stripeWebhookApplicationId() |
ca_Y5nYE1wwup9JPcXxQ9JaJWBRAJiFMujp |
beforeEach(function () {
$this->fake = fake();
$this->fake->addProvider(new Stripe($this->fake));
});
it('shows an example', function () {
$this->fake->stripeConnectAccountId() // acct_xBXg7yyrSyQVbsjM
});
private Generator $faker;
protected function setUp(): void
{
$faker = Factory::create();
$faker->addProvider(new Stripe($faker));
$this->faker = $faker;
}
public function testShowExample()
{
$this->faker->stripeConnectAccountId() // acct_xBXg7yyrSyQVbsjM
}
use WithFaker;
public function definition(): array
{
$this->faker->addProvider(new Stripe($this->faker));
$this->faker->stripeConnectAccountId() // acct_xBXg7yyrSyQVbsjM
}