Mobile Redirection
On Mobile, instead of a QR code, the customer is redirected to the Cash App. When the customer approves, the customer is taken back to the url specified in the redirectConfirmUrl in the initializeForCashAppPay call. This can be the same page where the Cash App Pay button is rendered e.g. merchant.com/checkout, or a new page e.g. merchant.com/review
Query Params can be added to the redirectConfirmURL
If you want to determine if the page is loading as a result of redirect from the Cash App, you can add a query param to your redirectConfirmURL. e.g. merchant.com/checkout?cashapppay=true
The redirectCancelURL is not used by Cash App Pay
On mobile, the customer will always be redirected to the redirectConfirmUrl for approved and declined flows
The page the redirectConfirmUrl points to should initialize afterpay-button.js and define the below onComplete callback on page load. The data returned by onComplete includes the virtual card object and customer’s cashtag.