Queries and mutations for managing Payment Methods in the platform.

Queries

Query Payment Methods

QUERYpaymentMethods
Arguments
where​
String​
sort​
Array of String​
limit​
Int​
offset​
Int​

Get Payment Method

QUERYpaymentMethod
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Mutations

Create Payment Method

MUTATIONcreatePaymentMethod
Arguments
draft​

Update Payment Method

MUTATIONupdatePaymentMethod
Arguments
version​
Long​
actions​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Delete Payment Method

MUTATIONdeletePaymentMethod
Arguments
version​
Long​
personalDataErasure​
Boolean​
Default: false​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output types

PaymentMethod

key​
String​

User-defined unique identifier of the PaymentMethod.

name​
String​

Name of the PaymentMethod.

nameAllLocales​
Array of LocalizedString​

Name of the PaymentMethod.

customer​

Reference to a Customer associated with the PaymentMethod.

If businessUnit is set, the Customer is an Associate of the Business Unit.
customerRef​

Reference to a Customer associated with the PaymentMethod.

If businessUnit is set, the Customer is an Associate of the Business Unit.
businessUnit​

Reference to a BusinessUnit associated with the PaymentMethod.

Only available for B2B-enabled Projects.
businessUnitRef​

Reference to a BusinessUnit associated with the PaymentMethod.

Only available for B2B-enabled Projects.
token​

Tokenized representation of the PaymentMethod used by the payment interface.

method​
String​

Payment Method used for the Payment—for example, a credit card or direct debit.

paymentInterface​
String​

Payment service that processes the Payment—for example, a PSP.

interfaceAccount​
String​

Account or instance of the payment interface when multiple accounts are used (per interface).

paymentMethodStatus​

Status of the PaymentMethod.

Can be Active, or Inactive​
default​
Boolean​

Indicates if the PaymentMethod is the default.

The default applies per Customer, Business Unit, or the combination of both (Associate).

custom​

Custom Fields of the PaymentMethod.

id​
String​

Unique identifier of the PaymentMethod.

version​
Long​

Current version of the PaymentMethod.

createdAt​

Date and time (UTC) the PaymentMethod was initially created.

lastModifiedAt​

Date and time (UTC) the PaymentMethod was last updated.

createdBy​

IDs and references that created the PaymentMethod.

lastModifiedBy​

IDs and references that last modified the PaymentMethod.

PaymentMethodToken

value​
String​

Tokenized representation of the Payment Method.

It is displayed in the following instances:
  • in the payload of an API Extension for Payments and PaymentMethods
  • when querying Payments and PaymentMethods
It is masked in the following instances:
  • in the payload of Payment and PaymentMethod messages
  • when querying MyPayments
  • in referenced Payments and PaymentMethods embedded through Reference Expansion

PaymentMethodStatus

Active
Inactive

Payment Method Query Result

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of PaymentMethod​

Input types

PaymentMethodDraft

key​
String​

User-defined unique identifier for the PaymentMethod.

name​

Name of the PaymentMethod.

Reference to a Customer the PaymentMethod should belong to.

If businessUnit is set, the Customer must be an Associate of the Business Unit.
businessUnit​

Reference to a BusinessUnit the PaymentMethod should belong to.

Only available for B2B-enabled Projects.
token​

Tokenized representation of the PaymentMethod used by the payment interface.

method​
String​

Payment method to use for the Payment—for example, a credit card or direct debit.

paymentInterface​
String​

Payment service that processes the Payment—for example, a PSP.

interfaceAccount​
String​

Account or instance of the payment interface when multiple accounts are used (per interface).

paymentMethodStatus​

Status of the PaymentMethod.

Can be Active, or Inactive​
default​
Boolean​

Whether the PaymentMethod should be the default.

The default applies per Customer, Business Unit, or the combination of both (Associate).

custom​

Custom Fields for the PaymentMethod.

PaymentMethodTokenDraft

value​
String​

PaymentMethodStatus

Active
Inactive

PaymentMethodUpdateAction

setCustomField​
setCustomType​
setDefault​
setInterfaceAccount​
setKey​
setMethod​
setName​
setPaymentInterface​
setPaymentMethodStatus​

Update actions

Set Key

This action generates the PaymentMethodKeySet Message.
key​
String​

Value to set. If omitted, any existing value is removed.

Set Name

This update action generates the PaymentMethodNameSet Message.
name​

Value to set. If omitted, any existing value is removed.

Set Method

This action generates the PaymentMethodMethodSet Message.
method​
String​

New payment method—for example, a credit card or direct debit. If omitted, any existing value is removed.

Set Default

This action generates the PaymentMethodDefaultSet Message.
An inactive Payment Method cannot be set as the default, and the action will return an InvalidOperation error.
default​
Boolean​

Value to set.

Set PaymentMethodStatus

paymentMethodStatus​
Can be Active, or Inactive​

PaymentMethodStatus

Active
Inactive

Set PaymentInterface

This action generates the PaymentMethodPaymentInterfaceSet Message.
paymentInterface​
String​

New payment service that processes the Payment—for example, a PSP. If omitted, any existing value is removed.

Set InterfaceAccount

This action generates the PaymentMethodInterfaceAccountSet Message.
interfaceAccount​
String​

New account or instance of the payment interface. If omitted, any existing value is removed.

Set Custom Type

fields​
Array of CustomFieldInput​
typeKey​
String​
typeId​
String​

Set CustomField

Adding a Custom Field to a PaymentMethod generates the PaymentMethodCustomFieldAdded Message, removing one generates the PaymentMethodCustomFieldRemoved Message, and updating an existing one generates the PaymentMethodCustomFieldChanged Message.
name​
String​
Name of the Custom Field to add, update, or remove.
value​
String​
If value is absent or null, this field will be removed if it exists. Trying to remove a field that does not exist will fail with an InvalidOperation error. If value is provided, it is set for the field defined by name.