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
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
The fee charged by the ATM for the cash withdrawal.static class
The fee charged by the ATM for the cash withdrawal.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
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapprove()
Approves a pending IssuingAuthorization
object.approve
(RequestOptions options) Approves a pending IssuingAuthorization
object.approve
(AuthorizationApproveParams params) Approves a pending IssuingAuthorization
object.approve
(AuthorizationApproveParams params, RequestOptions options) Approves a pending IssuingAuthorization
object.Approves a pending IssuingAuthorization
object.approve
(Map<String, Object> params, RequestOptions options) Approves a pending IssuingAuthorization
object.protected boolean
decline()
Declines a pending IssuingAuthorization
object.decline
(RequestOptions options) Declines a pending IssuingAuthorization
object.decline
(AuthorizationDeclineParams params) Declines a pending IssuingAuthorization
object.decline
(AuthorizationDeclineParams params, RequestOptions options) Declines a pending IssuingAuthorization
object.Declines a pending IssuingAuthorization
object.decline
(Map<String, Object> params, RequestOptions options) Declines a pending IssuingAuthorization
object.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.Three-letter ISO currency code, in lowercase.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 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.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) Three-letter ISO currency code, in lowercase.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 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
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
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
-
approve
Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.- Throws:
StripeException
-
approve
Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.- Throws:
StripeException
-
approve
Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.- Throws:
StripeException
-
approve
public Authorization approve(Map<String, Object> params, RequestOptions options) throws StripeExceptionApproves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.- Throws:
StripeException
-
approve
Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.- Throws:
StripeException
-
approve
public Authorization approve(AuthorizationApproveParams params, RequestOptions options) throws StripeException Approves a pending IssuingAuthorization
object. This request should be made within the timeout window of the real-time authorization flow. You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found here.- Throws:
StripeException
-
decline
Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.- Throws:
StripeException
-
decline
Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.- Throws:
StripeException
-
decline
Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.- Throws:
StripeException
-
decline
public Authorization decline(Map<String, Object> params, RequestOptions options) throws StripeExceptionDeclines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.- Throws:
StripeException
-
decline
Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.- Throws:
StripeException
-
decline
public Authorization decline(AuthorizationDeclineParams params, RequestOptions options) throws StripeException Declines a pending IssuingAuthorization
object. This request should be made within the timeout window of the real time authorization flow. You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found here.- 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
-
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 in the card's currency and in the smallest currency unit. -
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
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
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. -
getMerchantCurrency
The currency that was presented to the cardholder for the 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 in the card's currency and in the smallest currency unit. -
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
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
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. -
setMerchantCurrency
The currency that was presented to the cardholder for the 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>
-