After a user completes a payment, we can send a HTTP POST request to an endpoint you provide.
POST
https://api.peanut.to/api-keys/charge-webhook
Endpoint | Type | Description |
---|---|---|
url |
string | your receiving webhook URL |
const res = await fetch('<https://api.peanut.to/api-keys/charge-webhook>', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
url: '<https://shopify.com/webhook>'
})
});
All payments users do will end up flowing to this destination.
If you wish to receive payments directly in your bank account, talk with us. We support the following fiat geographies: Supported geographies
POST
https://api.peanut.to/api-keys/receiving-wallet
Parameter | Type | Description |
---|---|---|
walletAddress |
string | Destination wallet address |
chainId |
number | Blockchain network ID |
tokenAddress |
string | Token contract address |
const res = await fetch('<https://api.peanut.to/api-keys/receiving-wallet>', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
walletAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
chainId: 10,
tokenAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7'
})
});