Class Charge
- All Implemented Interfaces:
BalanceTransactionSource
,HasId
,MetadataStore<Charge>
,StripeObjectInterface
Charge
object. You can retrieve and
refund individual charges as well as list all charges. Charges are identified by a unique, random
ID.
Related guide: Accept a payment with the Charges API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static 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
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
capture()
Capture the payment of an existing, uncaptured, charge.capture
(RequestOptions options) Capture the payment of an existing, uncaptured, charge.capture
(ChargeCaptureParams params) Capture the payment of an existing, uncaptured, charge.capture
(ChargeCaptureParams params, RequestOptions options) Capture the payment of an existing, uncaptured, charge.Capture the payment of an existing, uncaptured, charge.capture
(Map<String, Object> params, RequestOptions options) Capture the payment of an existing, uncaptured, charge.static Charge
create
(ChargeCreateParams params) To charge a credit card or other payment source, you create aCharge
object.static Charge
create
(ChargeCreateParams params, RequestOptions options) To charge a credit card or other payment source, you create aCharge
object.static Charge
To charge a credit card or other payment source, you create aCharge
object.static Charge
create
(Map<String, Object> params, RequestOptions options) To charge a credit card or other payment source, you create aCharge
object.boolean
Amount intended to be collected by this payment.Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).Amount in %s 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.Get ID of expandabledestination
object.Get expandeddestination
.Get ID of expandabledispute
object.Whether the charge has been disputed.Get expandeddispute
.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 card charges, usestatement_descriptor_suffix
instead.Provides information about the charge that customers see on their statements.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
setAlternateStatementDescriptors
(Charge.AlternateStatementDescriptors alternateStatementDescriptors) void
Amount intended to be collected by this payment.void
setAmountCaptured
(Long amountCaptured) Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).void
setAmountRefunded
(Long amountRefunded) Amount in %s 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
setDestination
(String id) void
setDestinationObject
(Account expandableObject) void
setDispute
(String id) void
setDisputed
(Boolean disputed) Whether the charge has been disputed.void
setDisputeObject
(Dispute expandableObject) 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
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 card charges, usestatement_descriptor_suffix
instead.void
setStatementDescriptorSuffix
(String statementDescriptorSuffix) Provides information about the charge that customers see on their statements.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, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, 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.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
-
getDestination
Get ID of expandabledestination
object. -
setDestination
-
getDestinationObject
Get expandeddestination
. -
setDestinationObject
-
getDispute
Get ID of expandabledispute
object. -
setDispute
-
getDisputeObject
Get expandeddispute
. -
setDisputeObject
-
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. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
- Throws:
StripeException
-
capture
Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.Uncaptured payments expire a set number of days after they are created (7 by default). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.
- Throws:
StripeException
-
create
To charge a credit card or other payment source, you create aCharge
object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).- Throws:
StripeException
-
create
public static Charge create(Map<String, Object> params, RequestOptions options) throws StripeExceptionTo charge a credit card or other payment source, you create aCharge
object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).- Throws:
StripeException
-
create
To charge a credit card or other payment source, you create aCharge
object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).- Throws:
StripeException
-
create
public static Charge create(ChargeCreateParams params, RequestOptions options) throws StripeException To charge a credit card or other payment source, you create aCharge
object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).- 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
-
getAlternateStatementDescriptors
-
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 %s captured (can be less than the amount attribute on the charge if a partial capture was made). -
getAmountRefunded
Amount in %s 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. -
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 card charges, usestatement_descriptor_suffix
instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. -
getStatementDescriptorSuffix
Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated 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. -
setAlternateStatementDescriptors
public void setAlternateStatementDescriptors(Charge.AlternateStatementDescriptors alternateStatementDescriptors) -
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 %s captured (can be less than the amount attribute on the charge if a partial capture was made). -
setAmountRefunded
Amount in %s 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. -
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 card charges, usestatement_descriptor_suffix
instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. -
setStatementDescriptorSuffix
Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated 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>
-