You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SPEC1.1.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ solana:<recipient>
29
29
&label=<label>
30
30
&message=<message>
31
31
&memo=<memo>
32
-
&success-redirect=<success-redirect>
32
+
&redirect=<redirect>
33
33
```
34
34
35
35
The request is non-interactive because the parameters in the URL are used by a wallet to directly compose a transaction.
@@ -79,11 +79,12 @@ The wallet must [URL-decode](https://developer.mozilla.org/en-US/docs/Web/JavaSc
79
79
80
80
If the field is provided, the wallet must include a `MemoProgram` instruction as the second to last instruction of the transaction, immediately before the SOL or SPL Token transfer instruction, to avoid ambiguity with other instructions in the transaction.
81
81
82
-
### Success Redirect
82
+
### Redirect
83
+
A single `redirect` field is allowed as an optional query parameter. The value must be a [URL-encoded](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) absolute HTTPS or `solana:` URL.
83
84
84
-
A single `success-redirect` field is allowed as an optional query parameter. The value must be a conditionally [URL-encoded](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) absolute HTTPS or solana URL.
85
+
The wallet must [URL-decode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) the value. If it is a HTTPS URL then the wallet should display the decoded value to the user.
85
86
86
-
The wallet must [URL-decode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) the value. If it is a HTTPS URL then the wallet should display the decoded value to the user. If the transaction is completed successfully and it is a HTTPS URL then the wallet should redirect the user to the URL. If the transaction is completed successfully and it is a solana URL then the wallet should treat it as a new Solana Pay request. If the transaction is not completed successfully then the wallet should not use the URL.
87
+
Redirect URLs should only be followed if the transaction is successful. A transaction should be considered successful if the user approves it and the broadcast transaction has a Confirmed or Finalized status. If the redirect is a HTTPS URL then the wallet should open the URL using any browser. This may be a browser included in the wallet. If it is a `solana:` URL then the wallet should treat it as a new Solana Pay request.
@@ -199,15 +200,17 @@ The `<message>` value must be a UTF-8 string that describes the nature of the tr
199
200
200
201
For example, this might be the name of an item being purchased, a discount applied to the purchase, or a thank you note. The wallet should display the value to the user.
201
202
202
-
The application may also include an optional `successRedirect` field in the response body:
203
+
The application may also include an optional `redirect` field in the response body:
The `success-redirect` field must be a conditionally [URL-encoded](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)absolute HTTPS or solana URL.
209
+
The `redirect` field must be an absolute HTTPS or `solana:` URL.
209
210
210
-
The wallet must [URL-decode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent) the value. If it is a HTTPS URL then the wallet should display the decoded value to the user. If the transaction is completed successfully and it is a HTTPS URL then the wallet should redirect the user to the URL. If the transaction is completed successfully and it is a solana URL then the wallet should treat it as a new Solana Pay request. If the transaction is not completed successfully then the wallet should not use the URL.
211
+
If it is a HTTPS URL then the wallet should display the decoded value to the user.
212
+
213
+
Redirect URLs should only be followed if the transaction is successful. A transaction should be considered successful if the user approves it and the broadcast transaction has a Confirmed or Finalized [Commitment Status](https://docs.solana.com/cluster/commitments). If the redirect is a HTTPS URL then the wallet should open the URL using any browser. This may be a browser included in the wallet. If it is a `solana:` URL then the wallet should treat it as a new Solana Pay request.
211
214
212
215
The wallet and application should allow additional fields in the request body and response body, which may be added by future specification.
{"message":"Thanks for all the fish","transaction":"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAECC4JMKqNplIXybGb/GhK1ofdVWeuEjXnQor7gi0Y2hMcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQECAAAMAgAAAAAAAAAAAAAA"}
280
+
{"message":"Thanks for all the fish","transaction":"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAECC4JMKqNplIXybGb/GhK1ofdVWeuEjXnQor7gi0Y2hMcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQECAAAMAgAAAAAAAAAAAAAA",
0 commit comments