--- title: paymentSessionPending - Payments Apps API description: >- Change a payment session status to pending. Upon receiving the response from the `PaymentSessionPending` mutation, you must redirect the customer back to Shopify, using `redirectUrl` in `nextAction`. Upon completion, pending payments must be finalized into either a successful or failed state using the `paymentSessionResolve` or `paymentSessionReject` mutations. Both `sale` and `authorization` payments can be marked as pending. api_version: 2025-07 api_name: payments-apps type: mutation api_type: graphql source_url: html: >- https://shopify.dev/docs/api/payments-apps/2025-07/mutations/paymentSessionPending md: >- https://shopify.dev/docs/api/payments-apps/2025-07/mutations/paymentSessionPending.md --- # payment​Session​Pending mutation Requires `write_payment_sessions` access scope. Change a payment session status to pending. Upon receiving the response from the `PaymentSessionPending` mutation, you must redirect the customer back to Shopify, using `redirectUrl` in `nextAction`. Upon completion, pending payments must be finalized into either a successful or failed state using the `paymentSessionResolve` or `paymentSessionReject` mutations. Both `sale` and `authorization` payments can be marked as pending. ## Arguments * id [ID!](https://shopify.dev/docs/api/payments-apps/2025-07/scalars/ID) required The payment session ID. * pending​Expires​At [Date​Time!](https://shopify.dev/docs/api/payments-apps/2025-07/scalars/DateTime) required The date and time when the pending payment expires, recommended to be within 3 days. * reason [Payment​Session​State​Pending​Reason!](https://shopify.dev/docs/api/payments-apps/2025-07/enums/PaymentSessionStatePendingReason) required The reason the payment is pending. *** ## Payment​Session​Pending​Payload returns * payment​Session [Payment​Session](https://shopify.dev/docs/api/payments-apps/2025-07/objects/PaymentSession) The updated payment session. * user​Errors [\[Payment​Session​Pending​User​Error!\]!](https://shopify.dev/docs/api/payments-apps/2025-07/objects/PaymentSessionPendingUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### paymentSessionPending reference ## Mutation Reference ```graphql mutation paymentSessionPending($id: ID!, $pendingExpiresAt: DateTime!, $reason: PaymentSessionStatePendingReason!) { paymentSessionPending(id: $id, pendingExpiresAt: $pendingExpiresAt, reason: $reason) { paymentSession { # PaymentSession fields } userErrors { field message } } } ``` ## Input ##### Variables ```json { "id": "gid://shopify//10079785100", "pendingExpiresAt": "2019-09-07T15:50:00Z", "reason": "BUYER_ACTION_REQUIRED" } ```