Skip to main content

Set and retrieve processedAt in the refundCreate mutation

We have introduced a new processedAt input field to the refundCreate mutation. With this field, you can manage refund timestamps in your records more effectively.

If you don't provide a processedAt value, then the current timestamp is used by default. This ensures that existing integrations continue to function without modification.

What's new

The refundCreate mutation now includes an optional processedAt field, enabling you to specify the exact time a refund was processed. This feature is particularly useful for:

  • Processing backdated refunds: Manage refunds initiated offline or those that need to reflect a specific processing date for accounting purposes.
  • Maintaining accurate financial records: Ensure your refund timestamps align with your actual business operations and reporting periods.

How it works

To use this feature, include the processedAt field when creating a refund:

mutation refundCreate($input: RefundInput!) {
  refundCreate(input: $input) {
    refund {
      id
      processedAt
      createdAt
    }
    userErrors {
      field
      message
    }
  }
}

With input:

{
  "input": {
    "orderId": "gid://shopify/Order/123",
    "processedAt": "2024-12-01T10:30:00Z",
    "refundLineItems": [...]
  }
}

If you don't provide a processedAt value, the current timestamp is used by default. This ensures that existing integrations continue to function without modification.

Was this section helpful?