curl --request POST \
--url https://api.tirdad.ai/v1/wallets/{id}/top-up \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "<string>",
"credits_to_add": "<string>",
"description": "<string>",
"expiry_date_utc": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"priority": 123
}
'{
"invoice_id": "<string>",
"wallet": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"threshold": 123
},
"info": {
"threshold": 123
},
"warning": {
"threshold": 123
}
},
"auto_topup": {
"amount": 123,
"enabled": true,
"invoicing": true,
"threshold": 123
},
"balance": "<string>",
"config": {
"allowed_price_types": []
},
"conversion_rate": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_balance": "<string>",
"credits_available_breakdown": {
"free": "<string>",
"purchased": "<string>"
},
"currency": "<string>",
"customer_id": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"wallet_transaction": {
"amount": "<string>",
"conversion_rate": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_user": {
"email": "<string>",
"id": "<string>",
"roles": [
"<string>"
],
"tenant": {
"billing_details": {
"address": {
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"address_postal_code": "<string>",
"address_state": "<string>"
},
"email": "<string>",
"help_email": "<string>",
"phone": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
},
"credit_amount": "<string>",
"credit_balance_after": "<string>",
"credit_balance_before": "<string>",
"credits_available": "<string>",
"currency": "<string>",
"customer": {
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"address_postal_code": "<string>",
"address_state": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"email": "<string>",
"environment_id": "<string>",
"external_id": "<string>",
"id": "<string>",
"integrations": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"entity_id": "<string>",
"environment_id": "<string>",
"id": "<string>",
"provider_entity_id": "<string>",
"provider_type": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"metadata": {},
"name": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"customer_id": "<string>",
"description": "<string>",
"environment_id": "<string>",
"expiry_date": "2023-11-07T05:31:56Z",
"id": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"priority": 123,
"reference_id": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"wallet": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"threshold": 123
},
"info": {
"threshold": 123
},
"warning": {
"threshold": 123
}
},
"auto_topup": {
"amount": 123,
"enabled": true,
"invoicing": true,
"threshold": 123
},
"balance": "<string>",
"config": {
"allowed_price_types": []
},
"conversion_rate": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_balance": "<string>",
"credits_available_breakdown": {
"free": "<string>",
"purchased": "<string>"
},
"currency": "<string>",
"customer_id": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"wallet_id": "<string>"
}
}Top up wallet
Use when adding funds to a wallet (e.g. top-up, refund, or manual credit). Supports optional idempotency via reference.
curl --request POST \
--url https://api.tirdad.ai/v1/wallets/{id}/top-up \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": "<string>",
"credits_to_add": "<string>",
"description": "<string>",
"expiry_date_utc": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"priority": 123
}
'{
"invoice_id": "<string>",
"wallet": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"threshold": 123
},
"info": {
"threshold": 123
},
"warning": {
"threshold": 123
}
},
"auto_topup": {
"amount": 123,
"enabled": true,
"invoicing": true,
"threshold": 123
},
"balance": "<string>",
"config": {
"allowed_price_types": []
},
"conversion_rate": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_balance": "<string>",
"credits_available_breakdown": {
"free": "<string>",
"purchased": "<string>"
},
"currency": "<string>",
"customer_id": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"wallet_transaction": {
"amount": "<string>",
"conversion_rate": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_by_user": {
"email": "<string>",
"id": "<string>",
"roles": [
"<string>"
],
"tenant": {
"billing_details": {
"address": {
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"address_postal_code": "<string>",
"address_state": "<string>"
},
"email": "<string>",
"help_email": "<string>",
"phone": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
},
"credit_amount": "<string>",
"credit_balance_after": "<string>",
"credit_balance_before": "<string>",
"credits_available": "<string>",
"currency": "<string>",
"customer": {
"address_city": "<string>",
"address_country": "<string>",
"address_line1": "<string>",
"address_line2": "<string>",
"address_postal_code": "<string>",
"address_state": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"email": "<string>",
"environment_id": "<string>",
"external_id": "<string>",
"id": "<string>",
"integrations": [
{
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"entity_id": "<string>",
"environment_id": "<string>",
"id": "<string>",
"provider_entity_id": "<string>",
"provider_type": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"metadata": {},
"name": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"customer_id": "<string>",
"description": "<string>",
"environment_id": "<string>",
"expiry_date": "2023-11-07T05:31:56Z",
"id": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"priority": 123,
"reference_id": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"wallet": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"threshold": 123
},
"info": {
"threshold": 123
},
"warning": {
"threshold": 123
}
},
"auto_topup": {
"amount": 123,
"enabled": true,
"invoicing": true,
"threshold": 123
},
"balance": "<string>",
"config": {
"allowed_price_types": []
},
"conversion_rate": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"credit_balance": "<string>",
"credits_available_breakdown": {
"free": "<string>",
"purchased": "<string>"
},
"currency": "<string>",
"customer_id": "<string>",
"description": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"name": "<string>",
"tenant_id": "<string>",
"topup_conversion_rate": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
},
"wallet_id": "<string>"
}
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Wallet ID
Body
Top up request
INVOICE_PAYMENT, FREE_CREDIT_GRANT, SUBSCRIPTION_CREDIT_GRANT, PURCHASED_CREDIT_INVOICED, PURCHASED_CREDIT_DIRECT, CREDIT_NOTE, CREDIT_EXPIRED, WALLET_TERMINATION, MANUAL_BALANCE_DEBIT, CREDIT_ADJUSTMENT, INVOICE_VOID_REFUND amount is the amount in the currency of the wallet to be added NOTE: this is not the number of credits to add, but the amount in the currency amount = credits_to_add * conversion_rate if both amount and credits_to_add are provided, amount will be ignored ex if the wallet has a conversion_rate of 2 then adding an amount of 10 USD in the wallet wil add 5 credits in the wallet
credits_to_add is the number of credits to add to the wallet
description to add any specific details about the transaction
expiry_date_utc is the expiry date in UTC timezone ex 2025-01-01 00:00:00 UTC
idempotency_key is a unique key for the transaction
Show child attributes
Show child attributes
priority is the priority of the transaction lower number means higher priority default is nil which means no priority at all