diff options
| author | Adam Soltys <[email protected]> | 2023-08-07 15:33:21 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-08-07 15:33:21 -0700 |
| commit | 4ff2326f44e00e2355f065da72251432b97a1e4c (patch) | |
| tree | 81e512806c802ea8be185ba6ddcb04f693b8d9db /src/lib | |
| parent | 0c80b81e7b93c63a68b105d9fc97782fce86bb0c (diff) | |
| download | coinos-ui-4ff2326f44e00e2355f065da72251432b97a1e4c.tar.gz coinos-ui-4ff2326f44e00e2355f065da72251432b97a1e4c.zip | |
update internal payment example
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/samples.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/samples.js b/src/lib/samples.js index efb11648..ac9e2d7e 100644 --- a/src/lib/samples.js +++ b/src/lib/samples.js @@ -26,12 +26,25 @@ export default { "amount": 5000, "hash": "bc1q3unh97w4rmelflrm2hvdwz37d8kray3vn4d5ca" }'`, - internal: `curl "https://coinos.io/api/payments" + internal: `HASH=$(curl "https://coinos.io/api/invoice" + -H "content-type: application/json" + -H "Authorization: Bearer $token" + -d '{ + "invoice": { + "amount": 1000, + "type": "lightning" + }, + "user": { + "username": "alice" + } + }' | jq -r '.hash'); + + curl "https://coinos.io/api/payments" -H "content-type: application/json" -H "Authorization: Bearer $token" -d '{ "amount": 5000, - "username": "alice" + "hash": $HASH }'`, rates: `curl "https://coinos.io/api/rates" -H "content-type: application/json" |
