-
Notifications
You must be signed in to change notification settings - Fork 389
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, andtransactionsinTransferare removed. UseBalanceTransaction#listinstead.
| Class Name |
|---|
Transfer.Summary |
TransferTransaction |
TransferTransactionCollection |
Version change on PaymentIntent 2019-02-11
-
PaymentIntentSourceActionandPaymentIntentSourceActionValueAuthorizeWithUrlare removed in favor ofPaymentIntent.NextActionandPaymentIntent.NextActionRedirectToUrlrespectively.
| Class Name |
|---|
PaymentIntentSourceAction |
PaymentIntentSourceActionValueAuthorizeWithUrl |
Version change on Account 2019-02-19
-
Account.Verificationis removed in favor ofAccount.Requirements,andAccount#keysis removed in favor of authenticating connected accounts with their own key viaStripe-Account header.
| Class Name |
|---|
Account.Keys |
Account.Verification |
-
LegalEntityand inner classes are removed in favor ofPersonandAccount.Company.
| Class Name |
|---|
LegalEntity |
LegalEntity.DateOfBirth |
LegalEntity.JapanAddress |
LegalEntity.Owner |
LegalEntity.Verification |
-
CustomerSubscriptionCollectionstatic methods were deprecated and now the class is removed in favor of methods inSubscription. The collection class itself is now removed in favorSubscriptionCollectionwith no associated method. -
Subscription.TransferDatais removed in favor of the existingInvoice.TransferData -
RecipientCardCollectionis removed in favor ofCardCollectionwith no associated method. -
Account.TransferScheduleis removed in favor ofAccount.PayoutSchedulein version change. -
Charge.Outcome.Ruleas nested class is removed in favor ofradar.Rule. -
Customer.NextRecurringChargeis removed in favor of callingInvoice#upcomingin version change -
issuing.Card.Billingwas for a deprecated feature allowing issuing card creation without a card holder, and is now removed. -
ChargeRefundCollectionstatic methods were deprecated and now the class is removed infavor of methods inRefund. The collection class itself is now removed in favorofRefundCollectionwith no associated method. -
LoginLinkCollectionusage now is only to create aLoginLink, useLoginLink#createOnAccountinstead. -
PaymentIntentLastPaymentErroris removed in favor of the existingStripeErrorattached toStripeException. -
CustomerCardCollectionis removed fromCustomerin version change. UseCustomer#sourcesto getPaymentSourceCollectioninstead.
| 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
transferDataatSubscriptionhas the same property as that inInvoice.
| Current Class | Current Field | New Field |
|---|---|---|
Subscription |
Subscription.TransferData transferData |
Invoice.TransferData transferData |
- The amount should be
Longinstead ofString.
| Current Class | Current Field | New Field |
|---|---|---|
issuing.Authorization |
String authorizedAmount |
Long authorizedAmount |
- Field
errorString is now an inner classError, where the root-levelerrorvalue 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
Longvalues, 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#documentto get fullVerificationDocumentinstead.
| Current Class | Current Field | New Field |
|---|---|---|
LegalEntity.Verification |
String document |
Person.VerificationDocument document |
- Fields previously in the abstract class are removed. Only
BankAccountandCardnow 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
customerDataat root-level is always null, and is currently returned intypeDatafor source transaction of ACH credit transfer only. Now with with typed data for each eligible source type, useSourceTransaction.AchCreditTransferData#customerDatainstead.
| Current Class | Removed Field |
|---|---|
SourceTransaction |
String customerData |
- Refer to field
disabled_reasoninstead. 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 |
-
HasSourceTypeDatainterface 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
ExternalAccountare 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
LoginLinkCollectioncreation, and never contain any actual login links. The field is now removed in favor an explicitLoginLink#createOnAccountmethod instead.
| Current Class | Removed Field |
|---|---|
Account |
LoginLinkCollection loginLinks |
- Refer to field
evidenceinstead
| 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
applicationfield instead.
| Current Class | Removed Field |
|---|---|
WebhookEndpoint |
Boolean connect |
- The field value will be returned as a possible enum in
statusfield 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$0to 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_REPORTandFRAUD_DETAILScontains 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
-
fieldsNeededis removed in favor categorized lists according to their time significance.dueByis represented incurrentDeadline
| Current Class | Removed Field |
|---|---|
Account.Verification |
Long dueBy |
Account.Verification |
List<String> fieldsNeeded |
- Use
Person.Verification#documentto get fullVerificationDocumentinstead.
| Current Class | Removed Field |
|---|---|
LegalEntity.Verification |
String documentBack |
Person.Verification |
Person.VerificationDocument documentSubObject |
Version change on Invoice 2019-03-14
-
finalizedAtis removed in favor ofStatusTransitionscontaining timestamps when an invoice was finalized, paid, marked uncollectible, or voided. Fielddatemarked with@Deprecatedis also removed.
| Current Class | Removed Field |
|---|---|
Invoice |
Long finalizedAt |
- Use
Sourceto 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
ExternalAccountare 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#createOnSubscriptionItemwith explicit subscription item id instead.
| Current Class | Removed Method |
|---|---|
UsageRecord |
public static UsageRecord create(Map<String, Object> arg, RequestOptions arg) |
- Use general
updatemethod with parameter map instead.
| Current Class | Removed Method |
|---|---|
Charge |
public Charge markFraudulent(RequestOptions arg) |
Charge |
public Charge markSafe(RequestOptions arg) |
- Use
Source#detachinstead.
| 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
verifyis only applicable toBankAccountand not generalExternalAccount.
| Current Class | Removed Method |
|---|---|
ExternalAccount |
public ExternalAccount verify(Map<String, Object> arg) |
ExternalAccount |
public ExternalAccount verify(Map<String, Object> arg, RequestOptions arg) |