-
Notifications
You must be signed in to change notification settings - Fork 360
Migration guide for v8 breaking changes
The following sections contain breaking changes in classes, fields, and methods. They do not contain those in v7 already marked with @Deprecated
.
Current Class | New Class |
---|---|
EvidenceSubObject |
Dispute.Evidence |
Reversal |
TransferReversal |
Version change 2014-08-04
- Associated classes for
otherTransfers
,summary
, andtransactions
inTransfer
are removed. UseBalanceTransaction#list
instead.
Class Name |
---|
Transfer.Summary |
TransferTransaction |
TransferTransactionCollection |
Version change on PaymentIntent 2019-02-11
-
PaymentIntentSourceAction
andPaymentIntentSourceActionValueAuthorizeWithUrl
are removed in favor ofPaymentIntent.NextAction
andPaymentIntent.NextActionRedirectToUrl
respectively.
Class Name |
---|
PaymentIntentSourceAction |
PaymentIntentSourceActionValueAuthorizeWithUrl |
Version change on Account 2019-02-19
-
Account.Verification
is removed in favor ofAccount.Requirements,
andAccount#keys
is removed in favor of authenticating connected accounts with their own key viaStripe-Account header
.
Class Name |
---|
Account.Keys |
Account.Verification |
-
LegalEntity
and inner classes are removed in favor ofPerson
andAccount.Company
.
Class Name |
---|
LegalEntity |
LegalEntity.DateOfBirth |
LegalEntity.JapanAddress |
LegalEntity.Owner |
LegalEntity.Verification |
-
CustomerSubscriptionCollection
static methods were deprecated and now the class is removed in favor of methods inSubscription
. The collection class itself is now removed in favorSubscriptionCollection
with no associated method. -
Subscription.TransferData
is removed in favor of the existingInvoice.TransferData
-
RecipientCardCollection
is removed in favor ofCardCollection
with no associated method. -
Account.TransferSchedule
is removed in favor ofAccount.PayoutSchedule
in version change. -
Charge.Outcome.Rule
as nested class is removed in favor ofradar.Rule
. -
Customer.NextRecurringCharge
is removed in favor of callingInvoice#upcoming
in version change -
issuing.Card.Billing
was for a deprecated feature allowing issuing card creation without a card holder, and is now removed. -
ChargeRefundCollection
static methods were deprecated and now the class is removed infavor of methods inRefund
. The collection class itself is now removed in favorofRefundCollection
with no associated method. -
LoginLinkCollection
usage now is only to create aLoginLink
, useLoginLink#createOnAccount
instead. -
PaymentIntentLastPaymentError
is removed in favor of the existingStripeError
attached toStripeException
. -
CustomerCardCollection
is removed fromCustomer
in version change. UseCustomer#sources
to getPaymentSourceCollection
instead.
Current Class | Current Field | New Field |
---|---|---|
issuing.Authorization |
ExpandableField<issuing.Card> card |
issuing.Card card |
issuing.CardDetails |
ExpandableField<issuing.Card> card |
issuing.Card card |
Current Class | Current Field | New Field |
---|---|---|
BalanceTransaction |
ExpandableField<HasId> source |
ExpandableField<BalanceTransactionSource> source |
-
getParentObject()
currently only expands as SKU, but not discount, shipping, or tax information. Non-expanded value atgetParent()
remains the same.
Current Class | Current Field | New Field |
---|---|---|
OrderItem |
ExpandableField<HasId> parent |
ExpandableField<Sku> parent |
- Specific collection types are no longer supported, in favor of more general ones.
Current Class | Current Field | New Field |
---|---|---|
Charge |
ChargeRefundCollection refunds |
RefundCollection refunds |
Recipient |
RecipientCardCollection cards |
CardCollection cards |
- Field
transferData
atSubscription
has the same property as that inInvoice
.
Current Class | Current Field | New Field |
---|---|---|
Subscription |
Subscription.TransferData transferData |
Invoice.TransferData transferData |
- The amount should be
Long
instead ofString
.
Current Class | Current Field | New Field |
---|---|---|
issuing.Authorization |
String authorizedAmount |
Long authorizedAmount |
- Field
error
String is now an inner classError
, where the root-levelerror
value is now atError#message
.
Current Class | Current Field | New Field |
---|---|---|
sigma.ScheduledQueryRun |
String error |
sigma.ScheduledQueryRun.Error error |
- Month and year values are now standardized to
Long
values, consistent with other all long values in this Java binding.
Current Class | Current Field | New Field |
---|---|---|
issuing.CardDetails |
Integer expMonth |
Long expMonth |
issuing.CardDetails |
Integer expYear |
Long expYear |
issuing.Card |
Integer expMonth |
Long expMonth |
issuing.Card |
Integer expYear |
Long expYear |
Current Class | Current Field | New Field |
---|---|---|
Charge |
ExternalAccount source |
PaymentSource source |
Customer |
ExpandableField<ExternalAccount> defaultSource |
ExpandableField<PaymentSource> defaultSource |
Customer |
ExternalAccountCollection sources |
PaymentSourceCollection sources |
Invoice |
ExpandableField<ExternalAccount> defaultSource |
ExpandableField<PaymentSource> defaultSource |
PaymentIntentLastPaymentError |
ExternalAccount source |
PaymentSource source |
PaymentIntent |
ExpandableField<ExternalAccount> source |
ExpandableField<PaymentSource> source |
StripeError |
ExternalAccount source |
PaymentSource source |
Subscription |
ExpandableField<ExternalAccount> defaultSource |
ExpandableField<PaymentSource> defaultSource |
Current Class | Current Field | New Field |
---|---|---|
Card |
String recipient |
ExpandableField<Recipient> recipient |
Discount |
String customer |
ExpandableField<Customer> customer |
EvidenceSubObject |
String cancellationPolicy |
ExpandableField<File> cancellationPolicy |
EvidenceSubObject |
String customerCommunication |
ExpandableField<File> customerCommunication |
EvidenceSubObject |
String customerSignature |
ExpandableField<File> customerSignature |
EvidenceSubObject |
String duplicateChargeDocumentation |
ExpandableField<File> duplicateChargeDocumentation |
EvidenceSubObject |
String receipt |
ExpandableField<File> receipt |
EvidenceSubObject |
String refundPolicy |
ExpandableField<File> refundPolicy |
EvidenceSubObject |
String serviceDocumentation |
ExpandableField<File> serviceDocumentation |
EvidenceSubObject |
String shippingDocumentation |
ExpandableField<File> shippingDocumentation |
EvidenceSubObject |
String uncategorizedFile |
ExpandableField<File> uncategorizedFile |
issuing.Dispute.EvidenceFraudulent |
String uncategorizedFile |
ExpandableField<File> uncategorizedFile |
issuing.Dispute.EvidenceOther |
String uncategorizedFile |
ExpandableField<File> uncategorizedFile |
Version change on Account 2019-02-12
- Use
Person.Verification#document
to get fullVerificationDocument
instead.
Current Class | Current Field | New Field |
---|---|---|
LegalEntity.Verification |
String document |
Person.VerificationDocument document |
- Fields previously in the abstract class are removed. Only
BankAccount
andCard
now implements the interface.
Current Class | Removed Field |
---|---|
ExternalAccount |
String account |
ExternalAccount |
String customer |
ExternalAccount |
String id |
ExternalAccount |
Map<String, String> metadata |
ExternalAccount |
String object |
- Fields are currently present in the Java binding release, but the values will never have been returned in the public API. Any successful integration should have handled null values, and can now eliminate the non-null code path.
Current Class | Removed Field |
---|---|
radar.ValueList |
String updateBy |
radar.ValueList |
Long updated |
- 3D-secured field in card is currently not supported are now removed.
Current Class | Removed Field |
---|---|
Card |
ThreeDSecure threeDSecure |
- Field
customerData
at root-level is always null, and is currently returned intypeData
for source transaction of ACH credit transfer only. Now with with typed data for each eligible source type, useSourceTransaction.AchCreditTransferData#customerData
instead.
Current Class | Removed Field |
---|---|
SourceTransaction |
String customerData |
- Refer to field
disabled_reason
instead. Deprecated in version change.
Current Class | Removed Field |
---|---|
Account.Verification |
Boolean contacted |
- Field is now unsupported in Java binding, but is still publicly available in via custom integration.
Current Class | Removed Field |
---|---|
Balance.Money.SourceTypes |
Long alipayAccount |
Balance.Money.SourceTypes |
Long bitcoinReceiver |
BitcoinTransaction |
String customer |
- Products no longer have SKU lists embedded in version change.
Current Class | Removed Field |
---|---|
Product |
SkuCollection skus |
-
HasSourceTypeData
interface is removed, and all possible source types are at the root-level (same level astypeData
). This means that instead ofgetTypeData()
returning a map, checkgetType()
for your source type and use getter for that source type. For example, ifgetType()
returns a Stringach_credit_transfer
, you can access non-null data atgetAchCreditTransfer()
, while other getters of the source type will return null.
Current Class | Removed Field |
---|---|
SourceMandateNotification |
Map<String, String> typeData |
SourceTransaction |
Map<String, String> typeData |
Source |
Map<String, String> typeData |
- Fields in some subclasses of
ExternalAccount
are currently not returned in standard API response, and now removed from the binding.
Current Class | Removed Field |
---|---|
AlipayAccount |
String status |
BitcoinReceiver |
Boolean rejectTransactions |
BitcoinReceiver |
String status |
Card |
String status |
- Currently available to allow
LoginLinkCollection
creation, and never contain any actual login links. The field is now removed in favor an explicitLoginLink#createOnAccount
method instead.
Current Class | Removed Field |
---|---|
Account |
LoginLinkCollection loginLinks |
- Refer to field
evidence
instead
Current Class | Removed Field |
---|---|
Dispute |
EvidenceSubObject evidenceSubObject |
- Discount has no valid ID, and is now consistent with the API reference.
Current Class | Removed Field |
---|---|
Discount |
String id |
- Check for nullable
application
field instead.
Current Class | Removed Field |
---|---|
WebhookEndpoint |
Boolean connect |
- The field value will be returned as a possible enum in
status
field instead. Deprecated in version change.
Current Class | Removed Field |
---|---|
BankAccount |
Boolean validated |
- The field was for a deprecated behavior allowing issuing card creation without a card holder. The value in API response is currently null, and the field is now removed.
Current Class | Removed Field |
---|---|
issuing.Card |
issuing.Card.Billing billing |
- Payout-related fields in transfer have been removed in version change.
Current Class | Removed Field |
---|---|
Transfer |
String applicationFee |
Transfer |
BankAccount bankAccount |
Transfer |
Long date |
Transfer |
String failureCode |
Transfer |
String failureMessage |
Transfer |
String statementDescriptor |
Transfer |
String status |
Transfer |
String type |
- The token fields are currently not supported, and removed to reflect the standard API response.
Current Class | Removed Field |
---|---|
Token |
Long amount |
Token |
String currency |
- Non-static inner classes is now static, and thus looses the implicit reference
this$0
to its outer class instance.
Current Class | Removed Field |
---|---|
issuing.Authorization.RequestHistory |
issuing.Authorization this$0 |
issuing.Authorization.VerificationData |
issuing.Authorization this$0 |
issuing.Card.AuthorizationControls |
issuing.Card this$0 |
issuing.Card.Shipping |
issuing.Card this$0 |
issuing.Cardholder.Billing |
issuing.Cardholder this$0 |
issuing.Dispute.EvidenceFraudulent |
issuing.Dispute this$0 |
issuing.Dispute.EvidenceOther |
issuing.Dispute this$0 |
issuing.Dispute.Evidence |
issuing.Dispute this$0 |
reporting.ReportRun.Parameters |
reporting.ReportRun this$0 |
-
USER_REPORT
andFRAUD_DETAILS
contains a parameter name for update charge fraud details. Please refer to API refs doc for full usage.
Current Class | Removed Field |
---|---|
Charge.FraudDetails |
String USER_REPORT |
Charge |
String FRAUD_DETAILS |
Version change on Account 2019-02-12
-
fieldsNeeded
is removed in favor categorized lists according to their time significance.dueBy
is represented incurrentDeadline
Current Class | Removed Field |
---|---|
Account.Verification |
Long dueBy |
Account.Verification |
List<String> fieldsNeeded |
- Use
Person.Verification#document
to get fullVerificationDocument
instead.
Current Class | Removed Field |
---|---|
LegalEntity.Verification |
String documentBack |
Person.Verification |
Person.VerificationDocument documentSubObject |
Version change on Invoice 2019-03-14
-
finalizedAt
is removed in favor ofStatusTransitions
containing timestamps when an invoice was finalized, paid, marked uncollectible, or voided. Fielddate
marked with@Deprecated
is also removed.
Current Class | Removed Field |
---|---|
Invoice |
Long finalizedAt |
- Use
Source
to operate on AliPayAccount instead
Current Class | Removed Method |
---|---|
AlipayAccount |
public AlipayAccount delete() |
AlipayAccount |
public AlipayAccount delete(RequestOptions arg) |
AlipayAccount |
public AlipayAccount update(Map<String, Object> arg) |
AlipayAccount |
public AlipayAccount update(Map<String, Object> arg,RequestOptions arg) |
- Concrete methods
ExternalAccount
are now abstract methods in the interface (implemented by its subtypes.)
Current Class | Current Method | New Method |
---|---|---|
ExternalAccount |
public ExternalAccount delete() |
public abstract ExternalAccount delete() |
ExternalAccount |
public ExternalAccount delete(RequestOptions arg) |
public abstract ExternalAccount delete(RequestOptions arg) |
ExternalAccount |
public ExternalAccount update(Map<String, Object> arg) |
public abstract ExternalAccount update(Map<String, Object> arg) |
ExternalAccount |
public ExternalAccount update(Map<String, Object> arg, RequestOptions arg) |
public abstract ExternalAccount update(Map<String, Object> arg, RequestOptions arg) |
Current Class | Current Method | New Method |
---|---|---|
Customer |
public void deleteDiscount() |
public Discount deleteDiscount() |
Subscription |
public void deleteDiscount() |
public Discount deleteDiscount() |
- Use
UsageRecord#createOnSubscriptionItem
with explicit subscription item id instead.
Current Class | Removed Method |
---|---|
UsageRecord |
public static UsageRecord create(Map<String, Object> arg, RequestOptions arg) |
- Use general
update
method with parameter map instead.
Current Class | Removed Method |
---|---|
Charge |
public Charge markFraudulent(RequestOptions arg) |
Charge |
public Charge markSafe(RequestOptions arg) |
- Use
Source#detach
instead.
Current Class | Removed Method |
---|---|
Source |
public Source delete(RequestOptions arg) |
- Use
deleteDiscount(Map<String, Object>, RequestOptions)
instead.
Current Class | Removed Method |
---|---|
Customer |
public void deleteDiscount(RequestOptions arg) |
Subscription |
public void deleteDiscount(RequestOptions arg) |
- Method
verify
is only applicable toBankAccount
and not generalExternalAccount
.
Current Class | Removed Method |
---|---|
ExternalAccount |
public ExternalAccount verify(Map<String, Object> arg) |
ExternalAccount |
public ExternalAccount verify(Map<String, Object> arg, RequestOptions arg) |