Skip to content

Conversation

@youssefea
Copy link
Contributor

What changed? Why?

Following some feedback from the community, adding more details to the Base Pay guide to improve backend verification and replay attack protection

@cb-heimdall
Copy link
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

}>(); // In production, use a persistent database

export async function verifyAndFulfillPayment(
txId: string,
Copy link
Contributor

@montycheese montycheese Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically the developer would call this type of endpoint with some user auth token of the payer (whether its the SIWE payload, or a JWT from an auth management platform). I would suggest passing a field like payerAddress to this function, and then do a validation that the sender that you get from getPaymentStatus matches the expected payerAddress, so a malicious caller does not try to send someone else's payment to fulfill their order.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good callout - I think our solve for this right now is the dataCallback context - where the orderID passes to the wallet and then directly to the backend service with the payment ID now associated with the orderID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants