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: docs/request-network-api/crosschain-payments.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Crosschain payments are supported on the following blockchain networks:
32
32
## Supported Stablecoins
33
33
34
34
{% hint style="warning" %}
35
-
**Warning:**Crosschain payments work only with mainnet funds (real money). Test networks are not supported.
35
+
**Warning:** Crosschain payments work only with mainnet funds (real money). Test networks are not supported.
36
36
{% endhint %}
37
37
38
38
The following stablecoins are supported for crosschain payments on both the sending and receiving networks.
@@ -47,14 +47,14 @@ The following stablecoins are supported for crosschain payments on both the send
47
47
48
48
To enable crosschain payments, the request must be created with the following parameters:
49
49
50
-
*`paymentCurrency`included in the [#supported-stablecoins](crosschain-payments.md#supported-stablecoins"mention") and [#supported-networks](crosschain-payments.md#supported-networks"mention"). 
50
+
*`paymentCurrency` included in the [#supported-stablecoins](crosschain-payments.md#supported-stablecoins"mention") and [#supported-networks](crosschain-payments.md#supported-networks"mention").
51
51
*`amount` greater than 1 - _executing_ crosschain payments under 1 stablecoins is not allowed, even though _creating_ requests has no restrictions on `amount` .
52
52
53
-
For more details about creating requests, please see the [#v1-request](create-and-pay-requests.md#v1-request"mention") endpoint.
53
+
For more details about creating requests, please see the [#post-v2-request](create-and-pay-requests.md#post-v2-request"mention") endpoint.
54
54
55
55
### 2. Payment route fetching
56
56
57
-
To display a list of possible routes for a given request and payer address, use the [#v1-request-paymentreference-routes](crosschain-payments.md#v1-request-paymentreference-routes"mention") endpoint. It returns all of the possible routes based on the payer's token balances. 
57
+
To display a list of possible routes for a given request and payer address, use the [#get-v2-request-requestid-routes](crosschain-payments.md#get-v2-request-requestid-routes"mention") endpoint. It returns all of the possible routes based on the payer's token balances.
58
58
59
59
#### Route Ranking
60
60
@@ -73,19 +73,19 @@ When fetching payment routes, each route displays the total estimated fees in th
73
73
74
74
The total fee includes all gas costs incurred by the payment processor wallet for processing the transaction. This covers:
75
75
76
-
 \- Transferring tokens from the payer's wallet.
76
+
\- Transferring tokens from the payer's wallet.
77
77
78
-
 \- Approving the payment execution smart contract.
78
+
\- Approving the payment execution smart contract.
79
79
80
-
 \- Executing the crosschain payment transaction.
80
+
\- Executing the crosschain payment transaction.
81
81
82
82
**For tokens supporting EIP-2612:**
83
83
84
-
 \- The payment processor wallet also covers for the onchain permit transaction.
84
+
\- The payment processor wallet also covers for the onchain permit transaction.
85
85
86
86
**For tokens that do not support EIP-2612:**
87
87
88
-
 \- The payer must perform an onchain approval transaction and pay for the gas fee directly. This fee is **not** included in the total fee shown for the route.
88
+
\- The payer must perform an onchain approval transaction and pay for the gas fee directly. This fee is **not** included in the total fee shown for the route.
89
89
2.**Service Fees:**
90
90
91
91
The total fees also include any service fees charged by the crosschain infrastructure for facilitating transfers or swaps between different blockchains.
@@ -95,28 +95,28 @@ When fetching payment routes, each route displays the total estimated fees in th
95
95
The API may return samechain routes if the payer address has supported currencies on the same chain as the `paymentCurrency` .
96
96
97
97
* Example: `paymentCurrency` is USDC on Base, and the payer has USDT on Base
98
-
*Gassless transactions - the transaction fees are added on top of the request amount
98
+
*Gasless transactions - the transaction fees are added on top of the request amount
Once the route is selected, the payer needs to fetch the unsigned payment calldata or intents.\
108
108
\
109
-
If the selected route is a crosschain payment, the [#v1-request-paymentreference-pay](crosschain-payments.md#v1-request-paymentreference-pay"mention") endpoint returns an unsigned payment intent. It will also return an unsigned approval permit or unsigned approval calldata, depending on whether the `paymentCurrency` supports [EIP-2612 Permit](https://eips.ethereum.org/EIPS/eip-2612). For crosschain payments, this endpoint is NOT approval aware - it will return an approval permit or approval calldata even if approval has already been granted.
109
+
If the selected route is a crosschain payment, the [#get-v2-request-requestid-pay](crosschain-payments.md#get-v2-request-requestid-pay"mention") endpoint returns an unsigned payment intent. It will also return an unsigned approval permit or unsigned approval calldata, depending on whether the `paymentCurrency` supports [EIP-2612 Permit](https://eips.ethereum.org/EIPS/eip-2612). For crosschain payments, this endpoint is NOT approval aware - it will return an approval permit or approval calldata even if approval has already been granted.
110
110
111
-
If the selected route is a direct payment, the [#v1-request-paymentreference-pay](crosschain-payments.md#v1-request-paymentreference-pay"mention") returns an unsigned payment calldata. It may also return an approval calldata. For direct payments, this endpoint IS approval aware - it will omit the approval calldata if sufficient approval has already been granted.
111
+
If the selected route is a direct payment, the [#get-v2-request-requestid-pay](crosschain-payments.md#get-v2-request-requestid-pay"mention") returns an unsigned payment calldata. It may also return an approval calldata. For direct payments, this endpoint IS approval aware - it will omit the approval calldata if sufficient approval has already been granted.
The intents and calldata returned by the [#v1-request-paymentreference-pay](crosschain-payments.md#v1-request-paymentreference-pay"mention") endpoint in the previous step must be signed by the payer's wallet to authorize the crosschain payment. The process for signing the approval varies depending on whether the `paymentCurrency` supports [EIP-2612 Permit](https://eips.ethereum.org/EIPS/eip-2612), indicated by the `metadata` response parameter.
119
+
The intents and calldata returned by the [#get-v2-request-requestid-pay](crosschain-payments.md#get-v2-request-requestid-pay"mention") endpoint in the previous step must be signed by the payer's wallet to authorize the crosschain payment. The process for signing the approval varies depending on whether the `paymentCurrency` supports [EIP-2612 Permit](https://eips.ethereum.org/EIPS/eip-2612), indicated by the `metadata` response parameter.
120
120
121
121
```json
122
122
"metadata": {
@@ -137,7 +137,7 @@ const ethersProvider = new ethers.providers.Web3Provider(
137
137
);
138
138
const signer =awaitethersProvider.getSigner();
139
139
140
-
// Response from the `GET /request/{paymentReference}/pay` endpoint
140
+
// Response from the `GET /request/{requestId}/pay` endpoint
Finally, the signed payment intent (and possibly the signed approval permit) are sent back to execute the crosschain payment via the [#v1-request-paymentintentid-send](crosschain-payments.md#v1-request-paymentintentid-send"mention") endpoint. It will handle all the necessary steps to complete the payment. A `payment.complete` event will be sent to the platform's webhooks when the payment is completed.
189
+
Finally, the signed payment intent (and possibly the signed approval permit) are sent back to execute the crosschain payment via the [#post-v2-request-payment-intents-paymentintentid](crosschain-payments.md#post-v2-request-payment-intents-paymentintentid"mention") endpoint. It will handle all the necessary steps to complete the payment. A `payment.complete` event will be sent to the platform's webhooks when the payment is completed.
0 commit comments