Class Charge
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Charge>
,StripeActiveObject
,StripeObjectInterface
Charge
object represents a single attempt to move money into your Stripe account.
PaymentIntent confirmation is the most common way to create Charges, but transferring money to a
different Stripe account through Connect also creates Charges. Some legacy payment flows create
Charges directly, which is not recommended for new integrations.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
The predicate to evaluate the payment against.static class
Options to configure Radar.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 TypeMethodDescriptionprotected boolean
capture()
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(RequestOptions options) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(ChargeCaptureParams params) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(ChargeCaptureParams params, RequestOptions options) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.capture
(Map<String, Object> params, RequestOptions options) Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.static Charge
create
(ChargeCreateParams params) This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.static Charge
create
(ChargeCreateParams params, RequestOptions options) This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.static Charge
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.static Charge
create
(Map<String, Object> params, RequestOptions options) This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.boolean
Amount intended to be collected by this payment.Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).Get ID of expandableapplication
object.Get ID of expandableapplicationFee
object.The amount of the application fee (if any) requested for the charge.Get expandedapplicationFee
.Get expandedapplication
.Authorization code on the charge.Get ID of expandablebalanceTransaction
object.Get expandedbalanceTransaction
.The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements.If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomer
object.Get expandedcustomer
.An arbitrary string attached to the object.Whether the charge has been disputed.Get ID of expandablefailureBalanceTransaction
object.Get expandedfailureBalanceTransaction
.Error code explaining reason for charge failure if available (see the errors section for a list of codes).Message to user further explaining reason for charge failure if available.Information on fraud assessments for the charge.getId()
Unique identifier for the object.Get ID of expandableinvoice
object.Get expandedinvoice
.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.Get ID of expandableonBehalfOf
object.Get expandedonBehalfOf
.Details about whether the payment was accepted, and why.getPaid()
true
if the charge succeeded, or was successfully authorized for later capture.Get ID of expandablepaymentIntent
object.Get expandedpaymentIntent
.ID of the payment method used in this charge.Details about the payment method at the time of the transaction.Options to configure Radar.This is the email address that the receipt for this charge was sent to.This is the transaction number that appears on email receipts sent for this charge.This is the URL to view the receipt for this charge.Whether the charge has been fully refunded.A list of refunds that have been applied to the charge.Get ID of expandablereview
object.Get expandedreview
.Shipping information for the charge.This is a legacy field that will be removed in the future.Get ID of expandablesourceTransfer
object.Get expandedsourceTransfer
.For a non-card charge, text that appears on the customer's statement as the statement descriptor.Provides information about a card charge.The status of the payment is eithersucceeded
,pending
, orfailed
.Get ID of expandabletransfer
object.An optional dictionary including the account to automatically transfer to as part of a destination charge.A string that identifies this transaction as part of a group.Get expandedtransfer
.int
hashCode()
static ChargeCollection
list
(ChargeListParams params) Returns a list of charges you’ve previously created.static ChargeCollection
list
(ChargeListParams params, RequestOptions options) Returns a list of charges you’ve previously created.static ChargeCollection
Returns a list of charges you’ve previously created.static ChargeCollection
list
(Map<String, Object> params, RequestOptions options) Returns a list of charges you’ve previously created.static Charge
Retrieves the details of a charge that has previously been created.static Charge
retrieve
(String charge, RequestOptions options) Retrieves the details of a charge that has previously been created.static Charge
retrieve
(String charge, ChargeRetrieveParams params, RequestOptions options) Retrieves the details of a charge that has previously been created.static Charge
Retrieves the details of a charge that has previously been created.static ChargeSearchResult
search
(ChargeSearchParams params) Search for charges you’ve previously created using Stripe’s Search Query Language.static ChargeSearchResult
search
(ChargeSearchParams params, RequestOptions options) Search for charges you’ve previously created using Stripe’s Search Query Language.static ChargeSearchResult
Search for charges you’ve previously created using Stripe’s Search Query Language.static ChargeSearchResult
search
(Map<String, Object> params, RequestOptions options) Search for charges you’ve previously created using Stripe’s Search Query Language.void
Amount intended to be collected by this payment.void
setAmountCaptured
(Long amountCaptured) Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).void
setAmountRefunded
(Long amountRefunded) Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).void
setApplication
(String id) void
void
setApplicationFeeAmount
(Long applicationFeeAmount) The amount of the application fee (if any) requested for the charge.void
setApplicationFeeObject
(ApplicationFee expandableObject) void
setApplicationObject
(Application expandableObject) void
setAuthorizationCode
(String authorizationCode) Authorization code on the charge.void
void
setBalanceTransactionObject
(BalanceTransaction expandableObject) void
setBillingDetails
(Charge.BillingDetails billingDetails) void
setCalculatedStatementDescriptor
(String calculatedStatementDescriptor) The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements.void
setCaptured
(Boolean captured) If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setCustomer
(String id) void
setCustomerObject
(Customer expandableObject) void
setDescription
(String description) An arbitrary string attached to the object.void
setDisputed
(Boolean disputed) Whether the charge has been disputed.void
void
setFailureBalanceTransactionObject
(BalanceTransaction expandableObject) void
setFailureCode
(String failureCode) Error code explaining reason for charge failure if available (see the errors section for a list of codes).void
setFailureMessage
(String failureMessage) Message to user further explaining reason for charge failure if available.void
setFraudDetails
(Charge.FraudDetails fraudDetails) Information on fraud assessments for the charge.void
Unique identifier for the object.void
setInvoice
(String id) void
setInvoiceObject
(Invoice expandableObject) void
setLevel3
(Charge.Level3 level3) 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
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
setOnBehalfOf
(String id) void
setOnBehalfOfObject
(Account expandableObject) void
setOutcome
(Charge.Outcome outcome) Details about whether the payment was accepted, and why.void
true
if the charge succeeded, or was successfully authorized for later capture.void
void
setPaymentIntentObject
(PaymentIntent expandableObject) void
setPaymentMethod
(String paymentMethod) ID of the payment method used in this charge.void
setPaymentMethodDetails
(Charge.PaymentMethodDetails paymentMethodDetails) Details about the payment method at the time of the transaction.void
setRadarOptions
(Charge.RadarOptions radarOptions) Options to configure Radar.void
setReceiptEmail
(String receiptEmail) This is the email address that the receipt for this charge was sent to.void
setReceiptNumber
(String receiptNumber) This is the transaction number that appears on email receipts sent for this charge.void
setReceiptUrl
(String receiptUrl) This is the URL to view the receipt for this charge.void
setRefunded
(Boolean refunded) Whether the charge has been fully refunded.void
setRefunds
(RefundCollection refunds) A list of refunds that have been applied to the charge.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
void
setReviewObject
(Review expandableObject) void
setShipping
(ShippingDetails shipping) Shipping information for the charge.void
setSource
(PaymentSource source) This is a legacy field that will be removed in the future.void
void
setSourceTransferObject
(Transfer expandableObject) void
setStatementDescriptor
(String statementDescriptor) For a non-card charge, text that appears on the customer's statement as the statement descriptor.void
setStatementDescriptorSuffix
(String statementDescriptorSuffix) Provides information about a card charge.void
The status of the payment is eithersucceeded
,pending
, orfailed
.void
setTransfer
(String id) void
setTransferData
(Charge.TransferData transferData) An optional dictionary including the account to automatically transfer to as part of a destination charge.void
setTransferGroup
(String transferGroup) A string that identifies this transaction as part of a group.void
setTransferObject
(Transfer expandableObject) update
(ChargeUpdateParams params) Updates the specified charge by setting the values of the parameters passed.update
(ChargeUpdateParams params, RequestOptions options) Updates the specified charge by setting the values of the parameters passed.Updates the specified charge by setting the values of the parameters passed.update
(Map<String, Object> params, RequestOptions options) Updates the specified charge 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
-
Charge
public Charge()
-
-
Method Details
-
getApplication
Get ID of expandableapplication
object. -
setApplication
-
getApplicationObject
Get expandedapplication
. -
setApplicationObject
-
getApplicationFee
Get ID of expandableapplicationFee
object. -
setApplicationFee
-
getApplicationFeeObject
Get expandedapplicationFee
. -
setApplicationFeeObject
-
getBalanceTransaction
Get ID of expandablebalanceTransaction
object. -
setBalanceTransaction
-
getBalanceTransactionObject
Get expandedbalanceTransaction
. -
setBalanceTransactionObject
-
getCustomer
Get ID of expandablecustomer
object. -
setCustomer
-
getCustomerObject
Get expandedcustomer
. -
setCustomerObject
-
getFailureBalanceTransaction
Get ID of expandablefailureBalanceTransaction
object. -
setFailureBalanceTransaction
-
getFailureBalanceTransactionObject
Get expandedfailureBalanceTransaction
. -
setFailureBalanceTransactionObject
-
getInvoice
Get ID of expandableinvoice
object. -
setInvoice
-
getInvoiceObject
Get expandedinvoice
. -
setInvoiceObject
-
getOnBehalfOf
Get ID of expandableonBehalfOf
object. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf
. -
setOnBehalfOfObject
-
getPaymentIntent
Get ID of expandablepaymentIntent
object. -
setPaymentIntent
-
getPaymentIntentObject
Get expandedpaymentIntent
. -
setPaymentIntentObject
-
getReview
Get ID of expandablereview
object. -
setReview
-
getReviewObject
Get expandedreview
. -
setReviewObject
-
getSourceTransfer
Get ID of expandablesourceTransfer
object. -
setSourceTransfer
-
getSourceTransferObject
Get expandedsourceTransfer
. -
setSourceTransferObject
-
getTransfer
Get ID of expandabletransfer
object. -
setTransfer
-
getTransferObject
Get expandedtransfer
. -
setTransferObject
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured charge that was created with thecapture
option set to false.Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
- Throws:
StripeException
-
create
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
create
public static Charge create(Map<String, Object> params, RequestOptions options) throws StripeExceptionThis method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
create
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
create
public static Charge create(ChargeCreateParams params, RequestOptions options) throws StripeException This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates theCharge
object used to request payment.- Throws:
StripeException
-
list
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
list
public static ChargeCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
list
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
list
public static ChargeCollection list(ChargeListParams params, RequestOptions options) throws StripeException Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.- Throws:
StripeException
-
retrieve
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
retrieve
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
retrieve
public static Charge retrieve(String charge, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
retrieve
public static Charge retrieve(String charge, ChargeRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.- Throws:
StripeException
-
search
Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static ChargeSearchResult search(Map<String, Object> params, RequestOptions options) throws StripeExceptionSearch for charges you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static ChargeSearchResult search(ChargeSearchParams params, RequestOptions options) throws StripeException Search for charges you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
update
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
update
in interfaceMetadataStore<Charge>
- Throws:
StripeException
-
update
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
update
in interfaceMetadataStore<Charge>
- Throws:
StripeException
-
update
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
Updates the specified charge 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
Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). -
getAmountCaptured
Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). -
getAmountRefunded
Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). -
getApplicationFeeAmount
The amount of the application fee (if any) requested for the charge. See the Connect documentation for details. -
getAuthorizationCode
Authorization code on the charge. -
getBillingDetails
-
getCalculatedStatementDescriptor
The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. -
getCaptured
If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. -
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. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getDisputed
Whether the charge has been disputed. -
getFailureCode
Error code explaining reason for charge failure if available (see the errors section for a list of codes). -
getFailureMessage
Message to user further explaining reason for charge failure if available. -
getFraudDetails
Information on fraud assessments for the charge. -
getLevel3
-
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
charge
. -
getOutcome
Details about whether the payment was accepted, and why. See understanding declines for details. -
getPaid
true
if the charge succeeded, or was successfully authorized for later capture. -
getPaymentMethod
ID of the payment method used in this charge. -
getPaymentMethodDetails
Details about the payment method at the time of the transaction. -
getRadarOptions
Options to configure Radar. See Radar Session for more information. -
getReceiptEmail
This is the email address that the receipt for this charge was sent to. -
getReceiptNumber
This is the transaction number that appears on email receipts sent for this charge. This attribute will benull
until a receipt has been sent. -
getReceiptUrl
This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. -
getRefunded
Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. -
getRefunds
A list of refunds that have been applied to the charge. -
getShipping
Shipping information for the charge. -
getSource
This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer topayment_method
orpayment_method_details
instead. -
getStatementDescriptor
For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.For a card charge, this value is ignored unless you don't specify a
statement_descriptor_suffix
, in which case this value is used as the suffix. -
getStatementDescriptorSuffix
Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. -
getStatus
The status of the payment is eithersucceeded
,pending
, orfailed
.One of
failed
,pending
, orsucceeded
. -
getTransferData
An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details. -
getTransferGroup
A string that identifies this transaction as part of a group. See the Connect documentation for details. -
setAmount
Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). -
setAmountCaptured
Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). -
setAmountRefunded
Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). -
setApplicationFeeAmount
The amount of the application fee (if any) requested for the charge. See the Connect documentation for details. -
setAuthorizationCode
Authorization code on the charge. -
setBillingDetails
-
setCalculatedStatementDescriptor
The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. -
setCaptured
If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. -
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. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setDisputed
Whether the charge has been disputed. -
setFailureCode
Error code explaining reason for charge failure if available (see the errors section for a list of codes). -
setFailureMessage
Message to user further explaining reason for charge failure if available. -
setFraudDetails
Information on fraud assessments for the charge. -
setId
Unique identifier for the object. -
setLevel3
-
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
charge
. -
setOutcome
Details about whether the payment was accepted, and why. See understanding declines for details. -
setPaid
true
if the charge succeeded, or was successfully authorized for later capture. -
setPaymentMethod
ID of the payment method used in this charge. -
setPaymentMethodDetails
Details about the payment method at the time of the transaction. -
setRadarOptions
Options to configure Radar. See Radar Session for more information. -
setReceiptEmail
This is the email address that the receipt for this charge was sent to. -
setReceiptNumber
This is the transaction number that appears on email receipts sent for this charge. This attribute will benull
until a receipt has been sent. -
setReceiptUrl
This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. -
setRefunded
Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. -
setRefunds
A list of refunds that have been applied to the charge. -
setShipping
Shipping information for the charge. -
setSource
This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer topayment_method
orpayment_method_details
instead. -
setStatementDescriptor
For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.For a card charge, this value is ignored unless you don't specify a
statement_descriptor_suffix
, in which case this value is used as the suffix. -
setStatementDescriptorSuffix
Provides information about a card charge. Concatenated to the account's statement descriptor prefix to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. -
setStatus
The status of the payment is eithersucceeded
,pending
, orfailed
.One of
failed
,pending
, orsucceeded
. -
setTransferData
An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details. -
setTransferGroup
A string that identifies this transaction as part of a group. See the Connect documentation for details. -
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<Charge>
-