Repository navigation
feat(stellar): add fee-bump sponsored transaction support at checkout - #1872
Merged
github-actions[bot] merged 1 commit intoOct 21, 2026
Conversation
Implements Issue Smartdevs17#1712. - FeeBumpService: opt-in per merchant via MerchantFeeBumpConfig - Sponsored fees recorded as FeeBumpRecord for accounting - TestnetStellarClient for testnet verification (injectable for production) - InMemoryFeeBumpStore with getMerchantConfig/saveFeeBumpRecord - sponsorTransaction() returns error result (not exception) when merchant has not opted in — caller falls back to regular transaction - 18 passing tests covering opt-in, success, accounting, isolation, error handling, and the TestnetStellarClient Closes Smartdevs17#1712
|
@JohnMabas Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements fee-bump (sponsored transaction) support at checkout, closing #1712.
Subscribers who hold no XLM cannot cover Stellar network fees, blocking checkout for new users. This PR lets merchants opt in to sponsoring those fees via Stellar's fee-bump envelope.
What was built
backend/services/stellar/feeBumpService.tsFeeBumpService— core service that wraps an inner subscriber-signed transaction in a fee-bump envelope and submits it to the Stellar networkMerchantFeeBumpConfigcontrolsfeeBumpEnabled,sponsorAddress, andmaxFeeStroops; merchants that haven't opted in receive an error result (no exception) and the caller falls back to a regular transactionFeeBumpRecord(id, merchantId, subscriberId, innerTransactionHash, feeBumpTransactionHash, feeStroops, sponsoredAt, network)TestnetStellarClientsimulates testnet submission with deterministic hashes; injectable for production swapoutInMemoryFeeBumpStorefor store abstraction, easy to swap with a database-backed implementationsponsorTransaction()returns a typedFeeBumpResultrather than throwing, giving callers clean error handlingbackend/services/stellar/__tests__/feeBumpService.test.tsTestnetStellarClienthappy pathAcceptance criteria
feeBumpEnabledflag inMerchantFeeBumpConfig)FeeBumpRecordwith all relevant fields)TestnetStellarClient+ 18 passing tests)Testing
All 18 tests pass.
Closes #1712