Wallets
Top-up a wallet
API Reference
- Getting started
- Add-ons
- Analytics
- Billable metrics
- Coupons
- Credit notes
- Customer usage
- Customers
- Events
- Fees
- Invoices
- Organizations
- Payments
- Payment receipts
- Payment requests
- Plans
- Resources
- Subscriptions
- Taxes
- Wallets
- Webhook endpoints
- Webhooks
Wallets
Top-up a wallet
This endpoint is used to top-up an active wallet.
POST
/
wallet_transactions
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/wallet_transactions" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"wallet_transaction": {
"wallet_id": "wallet_1234",
"paid_credits": "20.0",
"granted_credits": "10.0"
}
}'
{
"wallet_transactions": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"status": "settled",
"source": "manual",
"transaction_status": "purchased",
"transaction_type": "inbound",
"amount": "10.0",
"credit_amount": "100.0",
"invoice_requires_successful_payment": false,
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
],
"settled_at": "2022-04-29T08:59:51Z",
"failed_at": "2022-04-29T08:59:51Z",
"created_at": "2022-04-29T08:59:51Z"
}
]
}
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/wallet_transactions" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"wallet_transaction": {
"wallet_id": "wallet_1234",
"paid_credits": "20.0",
"granted_credits": "10.0"
}
}'
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Wallet transaction payload
The body is of type object
.
Response
200
application/json
Wallet transaction created
The response is of type object
.
Was this page helpful?
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request POST "$LAGO_URL/api/v1/wallet_transactions" \
--header "Authorization: Bearer $API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"wallet_transaction": {
"wallet_id": "wallet_1234",
"paid_credits": "20.0",
"granted_credits": "10.0"
}
}'
{
"wallet_transactions": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_wallet_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"status": "settled",
"source": "manual",
"transaction_status": "purchased",
"transaction_type": "inbound",
"amount": "10.0",
"credit_amount": "100.0",
"invoice_requires_successful_payment": false,
"metadata": [
{
"key": "example key",
"value": "example value"
},
{
"key": "another key",
"value": "another value"
}
],
"settled_at": "2022-04-29T08:59:51Z",
"failed_at": "2022-04-29T08:59:51Z",
"created_at": "2022-04-29T08:59:51Z"
}
]
}