@spritz-finance/api-client 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -30
- package/dist/spritz-api-client.cjs +70 -54
- package/dist/spritz-api-client.d.ts +27 -3
- package/dist/spritz-api-client.mjs +70 -54
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -23,17 +23,17 @@ A Typescript library for interacting with the Spritz Finance API
|
|
|
23
23
|
Get started with Spritz in minutes:
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
import {
|
|
27
|
-
SpritzApiClient,
|
|
28
|
-
Environment,
|
|
26
|
+
import {
|
|
27
|
+
SpritzApiClient,
|
|
28
|
+
Environment,
|
|
29
29
|
PaymentNetwork,
|
|
30
30
|
BankAccountType,
|
|
31
|
-
BankAccountSubType
|
|
31
|
+
BankAccountSubType,
|
|
32
32
|
} from '@spritz-finance/api-client'
|
|
33
33
|
|
|
34
34
|
// Initialize the client with your integration key
|
|
35
35
|
const client = SpritzApiClient.initialize({
|
|
36
|
-
environment: Environment.
|
|
36
|
+
environment: Environment.Sandbox,
|
|
37
37
|
integrationKey: 'YOUR_INTEGRATION_KEY_HERE',
|
|
38
38
|
})
|
|
39
39
|
|
|
@@ -150,7 +150,7 @@ and is returned once the user is created. Leave the api key blank if you haven't
|
|
|
150
150
|
import { SpritzApiClient, Environment } from '@spritz-finance/api-client'
|
|
151
151
|
|
|
152
152
|
const client = SpritzApiClient.initialize({
|
|
153
|
-
environment: Environment.
|
|
153
|
+
environment: Environment.Sandbox,
|
|
154
154
|
apiKey: 'YOUR_USER_API_KEY_HERE',
|
|
155
155
|
integrationKey: 'YOUR_INTEGRATION_KEY_HERE',
|
|
156
156
|
})
|
|
@@ -815,31 +815,32 @@ const onrampPayment = await client.onrampPayment.create({
|
|
|
815
815
|
### Retrieve all onramp payments for an account
|
|
816
816
|
|
|
817
817
|
```typescript
|
|
818
|
-
const payments =
|
|
819
|
-
|
|
818
|
+
const payments =
|
|
819
|
+
await client.onrampPayment.list()[
|
|
820
|
+
// Example response
|
|
820
821
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
]
|
|
822
|
+
{
|
|
823
|
+
id: '653fab35ad263e5ae8b0e605',
|
|
824
|
+
amount: 100,
|
|
825
|
+
feeAmount: 1.5,
|
|
826
|
+
depositInstructions: {
|
|
827
|
+
amount: 101.5,
|
|
828
|
+
currency: 'USD',
|
|
829
|
+
bankName: 'Bank of Nowhere',
|
|
830
|
+
bankAddress: '1800 North Pole St., Orlando, FL 32801',
|
|
831
|
+
bankBeneficiaryName: 'Bridge Ventures Inc',
|
|
832
|
+
bankRoutingNumber: '123456789',
|
|
833
|
+
bankAccountNumber: '11223344556677',
|
|
834
|
+
paymentMethod: 'WIRE',
|
|
835
|
+
depositMessage: 'BVI72D90851F051F4189',
|
|
836
|
+
},
|
|
837
|
+
network: 'ethereum',
|
|
838
|
+
token: 'USDC',
|
|
839
|
+
address: '0xbb76483e33e01315438d8f6cf1aee9c9b85f433b',
|
|
840
|
+
status: 'AWAITING_FUNDS',
|
|
841
|
+
createdAt: '2023-10-30T13:10:13.521Z',
|
|
842
|
+
}
|
|
843
|
+
]
|
|
843
844
|
```
|
|
844
845
|
|
|
845
846
|
## Webhooks
|