Create a test-mode authorization Test helper
Create a test-mode authorization.
Parameters
- cardstringRequired
Card associated with this authorization.
- amountinteger
The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card’s currency, and in the smallest currency unit.
- currencyenum
The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter ISO currency code, in lowercase. Must be a supported currency.
More parameters
- amount_
detailsobject Detailed breakdown of amount components. These amounts are denominated in
currency
and in the smallest currency unit.- amount_details.
atm_ feeinteger The ATM withdrawal fee.
- amount_details.
cashback_ amountinteger The amount of cash requested by the cardholder.
- authorization_
methodenum How the card details were provided. Defaults to online.
Possible enum valueschip
The card was physically present and inserted into a chip-enabled terminal. The transaction is cryptographically secured.
contactless
The card was tapped on a contactless-enabled terminal. If a digital wallet copy of the card was used, the
wallet
field will be present.keyed_
in The card number was manually entered into a terminal.
online
The card was used in a card-not-present scenario, such as a transaction initiated at an online e-commerce checkout.
swipe
The card was physically swiped in a terminal.
- fleetobject
Fleet-specific information for authorizations using Fleet cards.
- fleet.
cardholder_ prompt_ dataobject Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
- fleet.
cardholder_prompt_data. driver_ idstring Driver ID.
- fleet.
cardholder_prompt_data. odometerinteger Odometer reading.
- fleet.
cardholder_prompt_data. unspecified_ idstring An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
- fleet.
cardholder_prompt_data. user_ idstring User ID.
- fleet.
cardholder_prompt_data. vehicle_ numberstring Vehicle number.
- fleet.
purchase_ typestring The type of purchase. One of
fuel_
,purchase non_
, orfuel_ purchase fuel_
.and_ non_ fuel_ purchase - fleet.
reported_ breakdownobject More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
- fleet.
reported_breakdown. fuelobject Breakdown of fuel portion of the purchase.
- fleet.
reported_breakdown. fuel. gross_ amount_ decimalstring Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
- fleet.
reported_breakdown. non_ fuelobject Breakdown of non-fuel portion of the purchase.
- fleet.
reported_breakdown. non_fuel. gross_ amount_ decimalstring Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
- fleet.
reported_breakdown. taxobject Information about tax included in this transaction.
- fleet.
reported_breakdown. tax. local_ amount_ decimalstring Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
- fleet.
reported_breakdown. tax. national_ amount_ decimalstring Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
- fleet.
service_ typestring The type of fuel service. One of
non_
,fuel_ transaction full_
, orservice self_
.service
- fuelobject
Information about fuel that was purchased with this transaction.
- fuel.
industry_ product_ codestring Conexxus Payment System Product Code identifying the primary fuel product purchased.
- fuel.
quantity_ decimalstring The quantity of
unit
s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - fuel.
typestring The type of fuel that was purchased. One of
diesel
,unleaded_
,plus unleaded_
,regular unleaded_
, orsuper other
. - fuel.
unitstring The units for
quantity_
. One ofdecimal charging_
,minute imperial_
,gallon kilogram
,kilowatt_
,hour liter
,pound
,us_
, orgallon other
. - fuel.
unit_ cost_ decimalstring The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
- is_
amount_ controllableboolean If set
true
, you may provide amount to control how much to hold for the authorization. - merchant_
amountintegerPreview feature The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the smallest currency unit.
- merchant_
currencyenumPreview feature The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter ISO currency code, in lowercase. Must be a supported currency.
- merchant_
dataobject Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
- merchant_data.
categorystring A categorization of the seller’s type of business. See our merchant categories guide for a list of possible values.
- merchant_data.
citystring City where the seller is located
- merchant_data.
countrystring Country where the seller is located
- merchant_data.
namestring Name of the seller
- merchant_data.
network_ idstring Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
- merchant_data.
postal_ codestring Postal code where the seller is located
- merchant_data.
statestring State where the seller is located
- merchant_data.
terminal_ idstring An ID assigned by the seller to the location of the sale.
- merchant_data.
urlstring URL provided by the merchant on a 3DS request
- network_
dataobject Details about the authorization, such as identifiers, set by the card network.
- network_data.
acquiring_ institution_ idstring Identifier assigned to the acquirer by the card network.
- verification_
dataobject Verifications that Stripe performed on information that the cardholder provided to the merchant.
- verification_data.
address_ line1_ checkenum Whether the cardholder provided an address first line and if it matched the cardholder’s
billing.
.address. line1 Possible enum valuesmatch
Verification succeeded, values matched.
mismatch
Verification failed, values didn’t match.
not_
provided Verification was not performed because no value was provided.
- verification_data.
address_ postal_ code_ checkenum Whether the cardholder provided a postal code and if it matched the cardholder’s
billing.
.address. postal_ code Possible enum valuesmatch
Verification succeeded, values matched.
mismatch
Verification failed, values didn’t match.
not_
provided Verification was not performed because no value was provided.
- verification_data.
authentication_ exemptionobject The exemption applied to this authorization.
- verification_data.
authentication_exemption. claimed_ byenumRequired The entity that requested the exemption, either the acquiring merchant or the Issuing user.
Possible enum valuesacquirer
Acquiring merchant.
issuer
Issuing user.
- verification_data.
authentication_exemption. typeenumRequired The specific exemption claimed for this authorization.
Possible enum valueslow_
value_ transaction Specifies an exemption for some low-value authorizations.
transaction_
risk_ analysis Specifies an exemption for low-risk authorizations, determined using real-time risk analysis.
unknown
Specifies an unknown exemption type.
- verification_data.
cvc_ checkenum Whether the cardholder provided a CVC and if it matched Stripe’s record.
Possible enum valuesmatch
Verification succeeded, values matched.
mismatch
Verification failed, values didn’t match.
not_
provided Verification was not performed because no value was provided.
- verification_data.
expiry_ checkenum Whether the cardholder provided an expiry date and if it matched Stripe’s record.
Possible enum valuesmatch
Verification succeeded, values matched.
mismatch
Verification failed, values didn’t match.
not_
provided Verification was not performed because no value was provided.
- verification_data.
three_ d_ secureobject 3D Secure details.
- verification_data.
three_d_secure. resultenumRequired The outcome of the 3D Secure authentication request.
Possible enum valuesattempt_
acknowledged The merchant attempted to authenticate the authorization, but the cardholder is not enrolled or was unable to reach Stripe.
authenticated
Authentication successful.
failed
Authentication failed.
required
The authorization was declined because regulatory requirements mandated an authentication for this transaction but it wasn’t submitted correctly by the merchant, and they didn’t claim an applicable exemption. Check out our 3DS documentation if you want to learn more.
- walletenum
The digital wallet used for this transaction. One of
apple_
,pay google_
, orpay samsung_
. Will populate aspay null
when no digital wallet was utilized.
Returns
An Authorization object
{ "id": "iauth_1DPc772eZvKYlo2C6avLyZ25", "object": "issuing.authorization", "amount": 1000, "amount_details": { "atm_fee": null, "cashback_amount": null }, "approved": true, "authorization_method": "keyed_in", "balance_transactions": [], "card": "ic_1Nsse72eZvKYlo2CWBGm2WQ5", "cardholder": "ich_1Ccy6F2eZvKYlo2ClnIm9bs4", "created": 1540586461, "currency": "usd", "livemode": false, "merchant_amount": 0, "merchant_currency": "usd", "merchant_data": { "category": "taxicabs_limousines", "category_code": "4121", "city": "San Francisco", "country": "US", "name": "Rocket Rides", "network_id": "1234567890", "postal_code": "94107", "state": "CA", "terminal_id": null }, "metadata": {}, "network_data": null, "pending_request": null, "redaction": null, "request_history": [], "status": "reversed", "transactions": [], "verification_data": { "address_line1_check": "not_provided", "address_postal_code_check": "match", "cvc_check": "match", "expiry_check": "match" }, "wallet": null}