Create a Transaction
users
transfers
payout-links
payments
payment-intents
payment-customers
checkout-sessions
accounts-payable
- GETList all vendors
- POSTCreate a vendor
- GETGet vendor details
- DELDelete a vendor
- GETList all payment methods for a vendor
- POSTCreate a payment method for a vendor
- GETGet vendor payment method details
- DELDelete a vendor payment method
- GETList all payables
- POSTCreate a payable
- POSTCreate a payable from a file
- GETGet payable details
- PATCHUpdate a payable
- POSTUpload file to the payable
- DELDelete file from the payable
- POSTCancel a payable
- POSTSubmit a payable for approval
- POSTApprove a payable
- POSTReject a payable
- POSTPay a payable
- GETList all approval policies
- POSTCreate an approval policy
- DELDelete an approval policy
- PATCHUpdate priority of an approval policy
- GETList all approvers for api app
apps
payment-methods
organizations
Create a Transaction
All requests to the /v2/transactions/*
endpoints must include both the
client_id
and api_key
as detailed in the
Authentication document.
Send Money to a User
Method
Make a request to /v2/transactions/create
To send money to a user,
amount
must be negative> curl https://pls.senddots.com/v2/transactions/create \
-X POST \
-H "Authorization: Basic <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"user_id": "8732b0e5-8d47-4be7-839f-5cdecbe2df99",
"amount": -1000,
"notes": {
"internal_id": "tr_213124"
}
}'
> response = {
"success": true,
"transaction": {
'id': "5cfabe15-d452-4558-8e46-56d90ebe48f7",
'date': "Mon, 21 Feb 2022 21:08:49 GMT",
'source_username': "test_app",
'destination_username': "bobloblaw",
'amount': 1000,
'completed': true,
"receipt": {},
"notes": {
"internal_id": "tr_213124"
}
}
}
Debit Money from a User
Method
Make a request to /v2/transactions/create
To debit money from a user,
amount
must be positivecurl https://pls.senddots.com/v2/transactions/create \
-X POST \
-H "Authorization: Basic <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"user_id": "8732b0e5-8d47-4be7-839f-5cdecbe2df99",
"amount": 1000,
"notes": {
"internal_id": "tr_213124"
}
}'
response = {
"success": true,
"transaction": {
'id': "5cfabe15-d452-4558-8e46-56d90ebe48f7",
'date': "Mon, 21 Feb 2022 21:08:49 GMT",
'source_username': "bobloblaw",
'destination_username': "test_app",
'amount': 1000,
'completed': true,
"receipt": {},
"notes": {
"internal_id": "tr_213124"
}
}
}