Skip to content

Commit cd678e0

Browse files
eabdelmoneimclaude
andcommitted
docs: add AMEX backfill comments to /transaction/status routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2cd06eb commit cd678e0

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/server/routes/transaction/status.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ export async function getTransactionStatusRoute(fastify: FastifyInstance) {
147147

148148
const transaction = await TransactionDB.get(queueId);
149149
if (!transaction) {
150-
// Fallback to backfill table if enabled
150+
// SPECIAL LOGIC FOR AMEX
151+
// AMEX uses this endpoint to check transaction status for queue IDs they didn't receive webhooks for.
152+
// The queue ID's were cleaned out of Redis so we backfilled tx data to this backfill table.
153+
// See https://github.com/thirdweb-dev/solutions-customer-scripts/blob/main/amex/scripts/load-backfill-via-api.ts
154+
// Fallback to backfill table if enabled and not found
151155
if (env.ENABLE_TX_BACKFILL_FALLBACK) {
152156
const backfill = await TransactionDB.getBackfill(queueId);
153157
if (backfill) {
@@ -204,7 +208,11 @@ export async function getTransactionStatusQueryParamRoute(
204208

205209
const transaction = await TransactionDB.get(queueId);
206210
if (!transaction) {
207-
// Fallback to backfill table if enabled
211+
// SPECIAL LOGIC FOR AMEX
212+
// AMEX uses this endpoint to check transaction status for queue IDs they didn't receive webhooks for.
213+
// The queue ID's were cleaned out of Redis so we backfilled tx data to this backfill table.
214+
// See https://github.com/thirdweb-dev/solutions-customer-scripts/blob/main/amex/scripts/load-backfill-via-api.ts
215+
// Fallback to backfill table if enabled and not found
208216
if (env.ENABLE_TX_BACKFILL_FALLBACK) {
209217
const backfill = await TransactionDB.getBackfill(queueId);
210218
if (backfill) {

0 commit comments

Comments
 (0)