Package com.stripe.model.issuing
Class Authorization
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.issuing.Authorization
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Authorization>
,StripeActiveObject
,StripeObjectInterface
public class Authorization
extends ApiResource
implements MetadataStore<Authorization>, BalanceTransactionSource
When an issued card is used to make a purchase, an
Issuing
Authorization
object is created. Authorizations must be
approved for the purchase to be completed successfully.
Related guide: Issued card authorizations
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
Amount of national Sales Tax or VAT included in the transaction amount.static class
static class
static class
static class
The amount of cash requested by the cardholder.static class
static class
The amount of cash requested by the cardholder.static class
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapprove()
Deprecated.approve
(RequestOptions options) Deprecated.approve
(AuthorizationApproveParams params) Deprecated.approve
(AuthorizationApproveParams params, RequestOptions options) Deprecated.Deprecated.approve
(Map<String, Object> params, RequestOptions options) Deprecated.protected boolean
decline()
Deprecated.decline
(RequestOptions options) Deprecated.decline
(AuthorizationDeclineParams params) Deprecated.decline
(AuthorizationDeclineParams params, RequestOptions options) Deprecated.Deprecated.decline
(Map<String, Object> params, RequestOptions options) Deprecated.boolean
The total amount that was authorized or rejected.Detailed breakdown of amount components.Whether the authorization has been approved.How the card details were provided.List of balance transactions associated with this authorization.getCard()
You can create physical or virtual cards that are issued to cardholders.Get ID of expandablecardholder
object.Get expandedcardholder
.Time at which the object was created.The currency of the cardholder.getFleet()
Fleet-specific information for authorizations using Fleet cards.getFuel()
Information about fuel that was purchased with this transaction.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.The total amount that was authorized or rejected.The local currency that was presented to the cardholder for the authorization.Set of key-value pairs that you can attach to an object.Details about the authorization, such as identifiers, set by the card network.String representing the object's type.The pending authorization request.History of every time apending_request
authorization was approved/declined, either by you directly or by Stripe (e.g.The current status of the authorization in its lifecycle.The outcome of the 3D Secure authentication request.getToken()
Get ID of expandabletoken
object.Get expandedtoken
.List of transactions associated with this authorization.Treasury details related to this authorization if it was created on a FinancialAccount.The digital wallet used for this transaction.int
hashCode()
static AuthorizationCollection
list
(AuthorizationListParams params) Returns a list of IssuingAuthorization
objects.static AuthorizationCollection
list
(AuthorizationListParams params, RequestOptions options) Returns a list of IssuingAuthorization
objects.static AuthorizationCollection
Returns a list of IssuingAuthorization
objects.static AuthorizationCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of IssuingAuthorization
objects.static Authorization
Retrieves an IssuingAuthorization
object.static Authorization
retrieve
(String authorization, RequestOptions options) Retrieves an IssuingAuthorization
object.static Authorization
retrieve
(String authorization, AuthorizationRetrieveParams params, RequestOptions options) Retrieves an IssuingAuthorization
object.static Authorization
Retrieves an IssuingAuthorization
object.void
The total amount that was authorized or rejected.void
setAmountDetails
(Authorization.AmountDetails amountDetails) Detailed breakdown of amount components.void
setApproved
(Boolean approved) Whether the authorization has been approved.void
setAuthorizationMethod
(String authorizationMethod) How the card details were provided.void
setBalanceTransactions
(List<BalanceTransaction> balanceTransactions) List of balance transactions associated with this authorization.void
You can create physical or virtual cards that are issued to cardholders.void
setCardholder
(String id) void
setCardholderObject
(Cardholder expandableObject) void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) The currency of the cardholder.void
setFleet
(Authorization.Fleet fleet) Fleet-specific information for authorizations using Fleet cards.void
setFuel
(Authorization.Fuel fuel) Information about fuel that was purchased with this transaction.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMerchantAmount
(Long merchantAmount) The total amount that was authorized or rejected.void
setMerchantCurrency
(String merchantCurrency) The local currency that was presented to the cardholder for the authorization.void
setMerchantData
(Authorization.MerchantData merchantData) void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
setNetworkData
(Authorization.NetworkData networkData) Details about the authorization, such as identifiers, set by the card network.void
String representing the object's type.void
setPendingRequest
(Authorization.PendingRequest pendingRequest) The pending authorization request.void
setRequestHistory
(List<Authorization.RequestHistory> requestHistory) History of every time apending_request
authorization was approved/declined, either by you directly or by Stripe (e.g.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
The current status of the authorization in its lifecycle.void
void
setTokenObject
(Token expandableObject) void
setTransactions
(List<Transaction> transactions) List of transactions associated with this authorization.void
setTreasury
(Authorization.Treasury treasury) Treasury details related to this authorization if it was created on a FinancialAccount.void
setVerificationData
(Authorization.VerificationData verificationData) void
The digital wallet used for this transaction.update
(AuthorizationUpdateParams params) Updates the specified IssuingAuthorization
object by setting the values of the parameters passed.update
(AuthorizationUpdateParams params, RequestOptions options) Updates the specified IssuingAuthorization
object by setting the values of the parameters passed.Updates the specified IssuingAuthorization
object by setting the values of the parameters passed.update
(Map<String, Object> params, RequestOptions options) Updates the specified IssuingAuthorization
object by setting the values of the parameters passed.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
Methods inherited from interface com.stripe.model.StripeObjectInterface
getLastResponse, setLastResponse
-
Constructor Details
-
Authorization
public Authorization()
-
-
Method Details
-
getCardholder
Get ID of expandablecardholder
object. -
setCardholder
-
getCardholderObject
Get expandedcardholder
. -
setCardholderObject
-
getToken
Get ID of expandabletoken
object. -
setToken
-
getTokenObject
Get expandedtoken
. -
setTokenObject
-
approve
Deprecated.[Deprecated] Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.- Throws:
StripeException
-
approve
Deprecated.[Deprecated] Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.- Throws:
StripeException
-
approve
Deprecated.[Deprecated] Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.- Throws:
StripeException
-
approve
@Deprecated public Authorization approve(Map<String, Object> params, RequestOptions options) throws StripeExceptionDeprecated.[Deprecated] Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.- Throws:
StripeException
-
approve
Deprecated.[Deprecated] Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.- Throws:
StripeException
-
approve
@Deprecated public Authorization approve(AuthorizationApproveParams params, RequestOptions options) throws StripeException Deprecated.[Deprecated] Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to approve an authorization.- Throws:
StripeException
-
decline
Deprecated.[Deprecated] Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.- Throws:
StripeException
-
decline
Deprecated.[Deprecated] Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.- Throws:
StripeException
-
decline
Deprecated.[Deprecated] Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.- Throws:
StripeException
-
decline
@Deprecated public Authorization decline(Map<String, Object> params, RequestOptions options) throws StripeExceptionDeprecated.[Deprecated] Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.- Throws:
StripeException
-
decline
Deprecated.[Deprecated] Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.- Throws:
StripeException
-
decline
@Deprecated public Authorization decline(AuthorizationDeclineParams params, RequestOptions options) throws StripeException Deprecated.[Deprecated] Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. This method is deprecated. Instead, respond directly to the webhook request to decline an authorization.- Throws:
StripeException
-
list
Returns a list of IssuingAuthorization
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
list
public static AuthorizationCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of IssuingAuthorization
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
list
Returns a list of IssuingAuthorization
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
list
public static AuthorizationCollection list(AuthorizationListParams params, RequestOptions options) throws StripeException Returns a list of IssuingAuthorization
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.- Throws:
StripeException
-
retrieve
Retrieves an IssuingAuthorization
object.- Throws:
StripeException
-
retrieve
public static Authorization retrieve(String authorization, RequestOptions options) throws StripeException Retrieves an IssuingAuthorization
object.- Throws:
StripeException
-
retrieve
public static Authorization retrieve(String authorization, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves an IssuingAuthorization
object.- Throws:
StripeException
-
retrieve
public static Authorization retrieve(String authorization, AuthorizationRetrieveParams params, RequestOptions options) throws StripeException Retrieves an IssuingAuthorization
object.- Throws:
StripeException
-
update
Updates the specified IssuingAuthorization
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
update
in interfaceMetadataStore<Authorization>
- Throws:
StripeException
-
update
public Authorization update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates the specified IssuingAuthorization
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
update
in interfaceMetadataStore<Authorization>
- Throws:
StripeException
-
update
Updates the specified IssuingAuthorization
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
public Authorization update(AuthorizationUpdateParams params, RequestOptions options) throws StripeException Updates the specified IssuingAuthorization
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
getTestHelpers
The outcome of the 3D Secure authentication request.One of
attempt_acknowledged
,authenticated
,failed
, orrequired
. -
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAmount
The total amount that was authorized or rejected. This amount is incurrency
and in the smallest currency unit.amount
should be the same asmerchant_amount
, unlesscurrency
andmerchant_currency
are different. -
getAmountDetails
Detailed breakdown of amount components. These amounts are denominated incurrency
and in the smallest currency unit. -
getApproved
Whether the authorization has been approved. -
getAuthorizationMethod
How the card details were provided.One of
chip
,contactless
,keyed_in
,online
, orswipe
. -
getBalanceTransactions
List of balance transactions associated with this authorization. -
getCard
You can create physical or virtual cards that are issued to cardholders. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
The currency of the cardholder. This currency can be different from the currency presented at authorization and themerchant_currency
field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getFleet
Fleet-specific information for authorizations using Fleet cards. -
getFuel
Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getMerchantAmount
The total amount that was authorized or rejected. This amount is in themerchant_currency
and in the smallest currency unit.merchant_amount
should be the same asamount
, unlessmerchant_currency
andcurrency
are different. -
getMerchantCurrency
The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and thecurrency
field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getMerchantData
-
getNetworkData
Details about the authorization, such as identifiers, set by the card network. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
issuing.authorization
. -
getPendingRequest
The pending authorization request. This field will only be non-null during anissuing_authorization.request
webhook. -
getRequestHistory
History of every time apending_request
authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. -
getStatus
The current status of the authorization in its lifecycle.One of
closed
,pending
, orreversed
. -
getTransactions
List of transactions associated with this authorization. -
getTreasury
Treasury details related to this authorization if it was created on a FinancialAccount. -
getVerificationData
-
getWallet
The digital wallet used for this transaction. One ofapple_pay
,google_pay
, orsamsung_pay
. Will populate asnull
when no digital wallet was utilized. -
setAmount
The total amount that was authorized or rejected. This amount is incurrency
and in the smallest currency unit.amount
should be the same asmerchant_amount
, unlesscurrency
andmerchant_currency
are different. -
setAmountDetails
Detailed breakdown of amount components. These amounts are denominated incurrency
and in the smallest currency unit. -
setApproved
Whether the authorization has been approved. -
setAuthorizationMethod
How the card details were provided.One of
chip
,contactless
,keyed_in
,online
, orswipe
. -
setBalanceTransactions
List of balance transactions associated with this authorization. -
setCard
You can create physical or virtual cards that are issued to cardholders. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
The currency of the cardholder. This currency can be different from the currency presented at authorization and themerchant_currency
field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setFleet
Fleet-specific information for authorizations using Fleet cards. -
setFuel
Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMerchantAmount
The total amount that was authorized or rejected. This amount is in themerchant_currency
and in the smallest currency unit.merchant_amount
should be the same asamount
, unlessmerchant_currency
andcurrency
are different. -
setMerchantCurrency
The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and thecurrency
field on this authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setMerchantData
-
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. -
setNetworkData
Details about the authorization, such as identifiers, set by the card network. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
issuing.authorization
. -
setPendingRequest
The pending authorization request. This field will only be non-null during anissuing_authorization.request
webhook. -
setRequestHistory
History of every time apending_request
authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. -
setStatus
The current status of the authorization in its lifecycle.One of
closed
,pending
, orreversed
. -
setTransactions
List of transactions associated with this authorization. -
setTreasury
Treasury details related to this authorization if it was created on a FinancialAccount. -
setVerificationData
-
setWallet
The digital wallet used for this transaction. One ofapple_pay
,google_pay
, orsamsung_pay
. Will populate asnull
when no digital wallet was utilized. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.- Specified by:
getMetadata
in interfaceMetadataStore<Authorization>
-