15 December 2021
GraphQLPaymentsExtensibility
You can now extend the Transaction object on the Payment resource with Custom Fields. With this, you can now store additional information, like refund details and taxed amounts, on the specific payment transaction.
Changes:
- [API] Added
customfield to Transaction, TransactionDraft, and MyTransactionDraft . - [API] Added update actions Set Transaction Custom Type and Set Transaction CustomField to Payments.
- [API] Added Set Transaction CustomField update action to My Payments.
- [GraphQL API] Added the following types to the GraphQL schema:
SetPaymentTransactionCustomField,SetPaymentTransactionCustomType. - [GraphQL API] Changed the
Transactiontype:- Added the
customfield to theTransactiontype.
- Added the
- [GraphQL API] Changed the
MyTransactionDrafttype:- Input field
customwas added toMyTransactionDrafttype
- Input field
- [GraphQL API] Changed the
TransactionDrafttype:- Input field
customwas added toTransactionDrafttype
- Input field
- [GraphQL API] Changed the
PaymentUpdateActiontype:- Input field
setTransactionCustomTypewas added toPaymentUpdateActiontype - Input field
setTransactionCustomFieldwas added toPaymentUpdateActiontype
- Input field
The following changes were introduced in terms of GraphQL SDL:
extend type Transaction {
custom: CustomFieldsType
}
extend input MyTransactionDraft {
custom: CustomFieldsDraft
}
extend input TransactionDraft {
custom: CustomFieldsDraft
}
extend input PaymentUpdateAction {
setTransactionCustomField: SetPaymentTransactionCustomField
setTransactionCustomType: SetPaymentTransactionCustomType
}
input SetPaymentTransactionCustomField {
name: String!
value: String
transactionId: String!
}
input SetPaymentTransactionCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
transactionId: String!
}