All Release Notes
Payments available in the GraphQL schema
21 January 2019
Composable Commerce
HTTP API
Enhancement
GraphQLPayments
You can now access payments and related information using the GraphQL schema.
- [GraphQL API] Added the following types to the GraphQL schema:
Payment
,PaymentMethodInfo
,PaymentQueryResult
,PaymentStatus
,Transaction
,TransactionState
,TransactionType
. - [GraphQL API] Changed the
Query
type:- Added the
payments
field to theQuery
type. - Added the
payment
field to theQuery
type.
- Added the
- [GraphQL API] Changed the
PaymentInfo
type:- Added the
payments
field to thePaymentInfo
type.
- Added the
Introduced the following changes to the GraphQL schema (in SDL format):
extend type Query {payment("Queries with specified ID"id: String,"Queries with specified key"key: String): Paymentpayments(where: String, sort: [String!], limit: Int, offset: Int): PaymentQueryResult!}extend type PaymentInfo {payments: [Payment!]!}"""Payments hold information about the current state of receiving and/or refunding money.[documentation](/http-api-projects-payments)"""type Payment implements Versioned {key: StringcustomerRef: Referencecustomer: CustomeranonymousId: StringinterfaceId: StringamountPlanned: Money!paymentMethodInfo: PaymentMethodInfo!paymentStatus: PaymentStatus!transactions: [Transaction!]!interfaceInteractionsRaw("""The names of the custom fields to include.If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned."""includeNames: [String!],"""The names of the custom fields to exclude.If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned."""excludeNames: [String!]): [[RawCustomField!]!]!"This field contains non-typed data. Consider using `customFields` as a typed alternative."customFieldsRaw("""The names of the custom fields to include.If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned."""includeNames: [String!],"""The names of the custom fields to exclude.If neither `includeNames` nor `excludeNames` are provided, then all custom fields are returned."""excludeNames: [String!]): [RawCustomField!]"This field would contain type data"customFields: Typeid: String!version: Long!createdAt: DateTime!lastModifiedAt: DateTime!createdBy: InitiatorlastModifiedBy: Initiator}type PaymentMethodInfo {paymentInterface: Stringmethod: Stringname("String is defined for different locales. This argument specifies the desired locale."locale: Locale,"List of languages the client is able to understand, and which locale variant is preferred."acceptLanguage: [Locale!]): StringnameAllLocales: [LocalizedString!]}type PaymentQueryResult {offset: Int!count: Int!total: Long!results: [Payment!]!}type PaymentStatus {interfaceCode: StringinterfaceText: StringstateRef: Referencestate: State}type Transaction {id: String!timestamp: DateTimetype: TransactionTypeamount: Money!interactionId: Stringstate: TransactionState!}enum TransactionState {FailureSuccessPendingInitial}enum TransactionType {ChargebackRefundChargeCancelAuthorizationAuthorization}