Anchor to section titled 'undefined'

orderCreateMandatePayment
mutation

Requires write_payment_mandate access scope. Also: The user must have pay_orders_by_vaulted_card permission. The API client must be installed on a Shopify Plus store to use the amount field.

Creates a payment for an order by mandate.


Anchor to autoCapture
autoCapture
default:true

Whether the payment should be authorized or captured. If false, then the authorization of the payment is triggered.

Anchor to id
id
required

The ID of the order to collect the balance for.

Anchor to idempotencyKey
idempotencyKey
required

A unique key to identify the payment request.

Anchor to mandateId
mandateId
required

The mandate ID used for payment.

The ID of the payment schedule to collect the balance for.


Was this section helpful?

The async job used for charging the payment.

The Unique ID for the created payment.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation orderCreateMandatePayment($id: ID!, $idempotencyKey: String!, $mandateId: ID!) {
  orderCreateMandatePayment(id: $id, idempotencyKey: $idempotencyKey, mandateId: $mandateId) {
    job {
      # Job fields
    }
    paymentReferenceId
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "autoCapture": true,
  "id": "gid://shopify/<objectName>/10079785100",
  "idempotencyKey": "<your-idempotencyKey>",
  "mandateId": "gid://shopify/<objectName>/10079785100",
  "paymentScheduleId": "gid://shopify/<objectName>/10079785100"
}