All Release Notes
Payment API deprecating fields
29 September 2017
Composable Commerce
HTTP API
Enhancement
Deprecation
Payments
As part of a Beta improvement initiative, the Payment API has been updated deprecating a series of fields.
- [API]
externalId
in PaymentDraft, Payment as well as under Update Payment
This field has been deprecated because theinterfaceId
can be used for the ID set by the payment service provider (PSP), and the newly introducedkey
field has taken over the role ofexternalID
. - [API]
amountAuthorized
,amountPaid
andamountRefunded
in PaymentDraft, Payment as well as under Update Payment
These fields have been deprecated because their value can be calculated from the total amounts saved in the Transactions.- Example 1: Two transactions, one with
type:Charge
,state:Success
andamount:2$
and another one withtype:Charge
,state:Success
andamount:3$
. TheamountPaid
is5$
. - Example 2: Two transactions, one with
type:Charge
,state:Failure
andamount:2$
and another one withtype:Charge
,state:Success
andamount:3$
. TheamountPaid
is3$
. - Example 3: Two transactions, one with
type:Charge
,state:Success
andamount:3$
and another one withtype:Refund
,state:Success
andamount:2$
. TheamountPaid
is3$
. TheamountRefunded
is2$
.
- Example 1: Two transactions, one with
- [API]
authorizedUntil
in PaymentDraft, Payment as well as under Update Payment
We learned the field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP. - [API]
paymentId
in PaymentStatusInterfaceCodeSet Message
This field has been deprecated because theid
in theresource
field can be used instead. - [API] TransactionType previously had uppercase values like
AUTHORIZATION
,CHARGE
etc. These are deprecated.
Furthermore, another TransactionState has been added.
- [API] The
Initial
TransactionState has been added. It is used when the PSP has not accepted the transaction yet (including if the PSP has not been contacted yet). The existingPending
state is from now on used when the PSP has accepted the transaction, but it is not completed yet.
In the future, we will change the defaultstate
value in the TransactionDraft toInitial
. Do not depend on the default value! Please set thestate
field explicitly as soon as possible.