Testing
Test card payments with sk_test_ keys and Stripe’s test PaymentMethods.
Use your sk_test_ key and one of Stripe’s documented test PaymentMethods in
payment_method. Test mode moves no real money.
Pay with a test PaymentMethod
Name the test PaymentMethod on create (with confirm=true) or on confirm:
Fluveo resolves the PaymentMethods listed on Stripe’s testing page to the same test cards. On a US account each one gives Stripe’s documented outcome. A Brazilian (BRL) account follows other rules: see Brazilian (BRL) accounts. That covers:
- Card brands and countries, such as
pm_card_visa,pm_card_mastercard,pm_card_amexandpm_card_br. - Declines, such as
pm_card_chargeDeclined(orpm_card_visa_chargeDeclined),pm_card_chargeDeclinedInsufficientFunds,pm_card_visa_chargeDeclinedLostCard,pm_card_chargeDeclinedExpiredCard,pm_card_chargeDeclinedIncorrectCvc,pm_card_chargeDeclinedProcessingErrorandpm_card_visa_chargeDeclinedVelocityLimitExceeded. Each one answers Stripe’s 402card_errorwith Stripe’scode,decline_codeandmessage. - Fraud checks, such as
pm_card_radarBlockandpm_card_cvcCheckFail. - Disputes, refunds and funds that skip the pending balance, such as
pm_card_createDispute,pm_card_refundFailandpm_card_bypassPending. - 3D Secure, such as
pm_card_authenticationRequiredandpm_card_threeDSecure2Required.
Stripe’s page also lists pm_card_createEthocaAlert and
pm_card_createMastercardComplianceDispute, which Stripe test mode itself does not resolve.
Fluveo refuses them as below.
Where test PaymentMethods are refused
Only PaymentIntent create and confirm and SetupIntent confirm resolve them, and only
in test mode. A live request naming one answers resource_missing. Any other
pm_card id, and a pm_card id on any other request that names a PaymentMethod
(a SetupIntent create or update, a
PaymentMethod path, a Customer’s invoice_settings[default_payment_method], a
Subscription or Invoice default_payment_method), answers HTTP 400 with
param set to the field you sent, before Fluveo reads a customer or a saved card
or calls a payment provider:
A saved card’s own pm_ id (one that Fluveo returned to you) keeps working.
On a Brazilian account in test mode, the dispute test PaymentMethods are refused too, with their own answer (see the next section).
Brazilian (BRL) accounts
On a Brazilian account in test mode, Fluveo sends the test card to the acquirer’s test environment, not to Stripe. That environment decides the result from the last digit of the card number, not from Stripe’s rules:
So a test PaymentMethod named after an outcome gives the result of its card’s last digit
instead. For example, pm_card_visa and pm_card_br end in 2 and are declined.
-
To get a paid payment, use
pm_card_mastercard(it ends in 4) with a customer that has a Brazilian tax ID (br_cpf), which card payments on a Brazilian account need:curl -
Do not use test PaymentMethods whose card ends in 6, such as
pm_card_visa_debit,pm_card_refundFailandpm_card_pendingRefund: the payment times out and staysprocessing. -
Disputes: test mode cannot simulate a dispute on a Brazilian account. Disputes there come only from the acquirer, after a real chargeback. The dispute test PaymentMethods (
pm_card_createDispute,pm_card_createDisputeProductNotReceived,pm_card_createDisputeInquiry,pm_card_createIssuerFraudRecord,pm_card_createMultipleDisputes,pm_card_createCe3EligibleDispute,pm_card_createComplianceDispute,pm_card_createAutoRepresentmentEligibleDispute,pm_card_createRapidDisputeResolutionDisputeandpm_card_createCe3BlockDispute) are refused at once on PaymentIntent create (with or withoutconfirm=true) and confirm and on SetupIntent confirm, before the acquirer is called. The answer is HTTP 400 and no payment is made:To test disputes, use a US test account, where
pm_card_createDisputeopens one.
Inline card details (payment_method_data[card]) are hidden from public /v1
(see Payments).
Next
- Quickstart — your first payment end to end.
- Errors — the error envelope and common codes.