---
id: change/bcapps/9112
type: change
title: "#9112 [Shopify] Skip refund credit memo while transaction is pending"
summary: Shopify refund processing now skips credit memo creation when the refund transaction is still pending, preventing financially invalid documents with zero totals. The refund is retried on the next sync once the transaction succeeds.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit shpfy refunds api
  - codeunit shpfy retrefproc cr.memo
  - table shpfy order transaction
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:13:17.141Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a640b3d99b879b456c53a8c49e7df2abcad49610
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9112
    title: "microsoft/BCApps#9112: [Shopify] Skip refund credit memo while transaction is pending"
    date: "2026-07-09"
    commit: a640b3d99b879b456c53a8c49e7df2abcad49610
    t: null
    quote: Block credit memo / return order creation while the refund still has a pending transaction
links:
  learn: []
  objects:
    - object/codeunit/30228
    - object/codeunit/30243
    - object/table/30133
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9112
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9112
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-09T12:27:45Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 5
  additions: 141
  deletions: 0
  al: 3
apps:
  - Shopify
objects_touched:
  - key: codeunit/30228
    page: codeunit/30228
    type: codeunit
    id: 30228
    name: Shpfy Refunds API
    app: Shopify
    status: modified
  - key: codeunit/30243
    page: codeunit/30243
    type: codeunit
    id: 30243
    name: Shpfy RetRefProc Cr.Memo
    app: Shopify
    status: modified
  - key: table/30133
    page: table/30133
    type: table
    id: 30133
    name: Shpfy Order Transaction
    app: Shopify
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 640432
systems:
  - integration
quote: Block credit memo / return order creation while the refund still has a pending transaction
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9112 [Shopify] Skip refund credit memo while transaction is pending

> Shopify refund processing now skips credit memo creation when the refund transaction is still pending, preventing financially invalid documents with zero totals. The refund is retried on the next sync once the transaction succeeds.

[Pull request](https://github.com/microsoft/BCApps/pull/9112) · merged into `main` (BC30) on 2026-07-09 by onbuyuka · 5 files (+141 -0), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Added internal helper to detect pending refund transactions
- Manual credit memo creation path throws an error if transaction is pending
- Automatic sync path silently skips processing until transaction succeeds
- Unprocessed refunds are retried on every sync cycle
- Prevents credit memos with incorrect zero totals when Shopify's totalRefundedSet returns 0
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 30228 "Shpfy Refunds API"](../../objects/codeunit/30228.md), Shopify: modified
- [Codeunit 30243 "Shpfy RetRefProc Cr.Memo"](../../objects/codeunit/30243.md), Shopify: modified
- [Table 30133 "Shpfy Order Transaction"](../../objects/table/30133.md), Shopify: modified

## Context

- Work items: AB#640432
- Labels: AL: Apps (W1)
- Systems: integration
- From the description: "Block credit memo / return order creation while the refund still has a pending transaction"

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
