# Payments

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Payments in the platform.**

## Queries

### Query Payments

[fetch SDL for query payments](#graphql-partial-sdls).

### Get Payment

[fetch SDL for query payment](#graphql-partial-sdls).

## Mutations

### Create Payment

[fetch SDL for mutation createPayment](#graphql-partial-sdls).

### Update Payment

[fetch SDL for mutation updatePayment](#graphql-partial-sdls).

### Delete Payment

[fetch SDL for mutation deletePayment](#graphql-partial-sdls).

## Output types

### Payment

[fetch SDL for type Payment](#graphql-partial-sdls).

### Payment Query Result

[fetch SDL for type PaymentQueryResult](#graphql-partial-sdls).

## Input types

### PaymentDraft

[fetch SDL for type PaymentDraft](#graphql-partial-sdls).

### PaymentUpdateAction

[fetch SDL for type PaymentUpdateAction](#graphql-partial-sdls).

### Update actions

#### Add InterfaceInteraction

[fetch SDL for type AddPaymentInterfaceInteraction](#graphql-partial-sdls).

#### Add Transaction

[fetch SDL for type AddPaymentTransaction](#graphql-partial-sdls).

#### Change AmountPlanned

[fetch SDL for type ChangePaymentAmountPlanned](#graphql-partial-sdls).

#### Change TransactionInteractionId

[fetch SDL for type ChangePaymentTransactionInteractionId](#graphql-partial-sdls).

#### Change TransactionState

[fetch SDL for type ChangePaymentTransactionState](#graphql-partial-sdls).

#### Change TransactionTimestamp

[fetch SDL for type ChangePaymentTransactionTimestamp](#graphql-partial-sdls).

#### Set AmountPaid

[fetch SDL for type SetPaymentAmountPaid](#graphql-partial-sdls).

#### Set AmountRefunded

[fetch SDL for type SetPaymentAmountRefunded](#graphql-partial-sdls).

#### Set AnonymousId

[fetch SDL for type SetPaymentAnonymousId](#graphql-partial-sdls).

#### Set Authorization

[fetch SDL for type SetPaymentAuthorization](#graphql-partial-sdls).

#### Set CustomField

[fetch SDL for type SetPaymentCustomField](#graphql-partial-sdls).

#### Set Custom Type

[fetch SDL for type SetPaymentCustomType](#graphql-partial-sdls).

#### Set Customer

[fetch SDL for type SetPaymentCustomer](#graphql-partial-sdls).

#### Set ExternalId

[fetch SDL for type SetPaymentExternalId](#graphql-partial-sdls).

#### Set InterfaceId

[fetch SDL for type SetPaymentInterfaceId](#graphql-partial-sdls).

#### Set Key

[fetch SDL for type SetPaymentKey](#graphql-partial-sdls).

#### Set MethodInfo&#x20;

[fetch SDL for type SetPaymentMethodInfo](#graphql-partial-sdls).

#### Set MethodInfo CustomField&#x20;

[fetch SDL for type SetPaymentMethodInfoCustomField](#graphql-partial-sdls).

#### Set MethodInfo Custom Type&#x20;

[fetch SDL for type SetPaymentMethodInfoCustomType](#graphql-partial-sdls).

#### Set MethodInfo Interface

[fetch SDL for type SetPaymentMethodInfoInterface](#graphql-partial-sdls).

#### Set MethodInfo InterfaceAccount&#x20;

[fetch SDL for type SetPaymentMethodInfoInterfaceAccount](#graphql-partial-sdls).

#### Set MethodInfo Method

[fetch SDL for type SetPaymentMethodInfoMethod](#graphql-partial-sdls).

#### Set MethodInfo Name

[fetch SDL for type SetPaymentMethodInfoName](#graphql-partial-sdls).

#### Set MethodInfo Token&#x20;

[fetch SDL for type SetPaymentMethodInfoToken](#graphql-partial-sdls).

#### Set StatusInterfaceCode

[fetch SDL for type SetPaymentStatusInterfaceCode](#graphql-partial-sdls).

#### Set StatusInterfaceText

[fetch SDL for type SetPaymentStatusInterfaceText](#graphql-partial-sdls).

#### Set Transaction CustomField

[fetch SDL for type SetPaymentTransactionCustomField](#graphql-partial-sdls).

#### Set Transaction Custom Type

[fetch SDL for type SetPaymentTransactionCustomType](#graphql-partial-sdls).

#### Set TransactionInterfaceId

[fetch SDL for type SetPaymentTransactionInterfaceId](#graphql-partial-sdls).

#### Transition State

[fetch SDL for type TransitionPaymentState](#graphql-partial-sdls).

## Related pages

- [Search documentation and API specs](/search.md)