Refunds

Create a refund session

Create a refund session

post/api/v1/refund-session

Request body

merchant_idstring uuid

Merchant ID. Defaults to the logged-in merchant if not provided. Required for admin tokens.

idstring

Shopify refund session ID

gidstring

Global identifier

payment_idstring required

Original payment ID

amountstring required

Refund amount

currencystring required

ISO 4217 currency code

merchant_localestring

Merchant locale

proposed_atstring

When the refund was proposed

testboolean

Whether this is a test refund

Example request

{
  "merchant_id": "550e8400-e29b-41d4-a716-446655440000",
  "id": "JM1YXF4yUe0vmo-FHsgVK3ZC",
  "gid": "gid://shopify/RefundSession/JM1YXF4yUe0vmo-FHsgVK3ZC",
  "payment_id": "rSOX4QcIGECb4ZEydY8GgMTfO",
  "amount": "1.00",
  "currency": "GBP",
  "merchant_locale": "en",
  "proposed_at": "2025-02-21T11:17:05Z",
  "test": true
}

Response

Success

idstring required
statusstring required
reasonstring

Changes

Changed in 3 of the 8 revisions of this API.424

  • b372e7d5563d323See the full diff
    • the currency request property's minLength was increased from 0 to 3

      request-property-min-length-increased

    • added the pattern ^[A-Za-z]{3}$ to the request property currency

      request-property-pattern-added

    • the error/code response's property type/format changed from string/ to / for status 400

      response-property-type-changed

    • the currency request property's maxLength was set to 3

      request-property-max-length-set

    • removed the optional property error/errors from the response with the 400 status

      response-optional-property-removed

    • added the new optional request property merchant_id

      new-optional-request-property

    • added the optional property error/metadata to the response with the 400 status

      response-optional-property-added

    • added subschema #1 subschema #2 to the error/code response property allOf list for the response status 400

      response-property-all-of-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 367 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog