1. COD Wallet
Treek-Public
  • Authentication
    • User login with email and password
      POST
  • Orders
    • Create Order
      POST
    • List Orders
      GET
    • Order Details
      GET
    • Update Order
      PUT
    • Cancel Order
      POST
    • Reset Order
      POST
    • Get Statuses
      GET
    • Verify Item
      POST
    • Verify Order
      POST
    • Order Price
      GET
  • Shipments
    • Create Shipment
      POST
    • Return Shipment
      POST
    • Print Invoice
      GET
    • Get Pickup id
      GET
  • Packages
    • Create Package
      POST
    • Get Packages
      GET
    • Package Details
      GET
    • Update Package
      PUT
  • Merchants
    • Merchants Details
      GET
  • Profile
    • User Details
      GET
    • Update User
      PUT
    • Change Password
      PUT
  • Utilities
    • Countries List
    • Cities List
    • Couriers List
  • Warehouses
    • Warehouses List
    • Create warehouse
    • warehouse Details
  • Price Calculator
    • Price Calculator
  • Packaging Type
    • Packaging Types List
    • Packaging Type Details
  • COD Wallet
    • List COD wallets
      GET
    • Debit COD wallet
      POST
    • Get COD wallet summary
      GET
  • Wallet Transactions
    • List wallet transactions
  • Schemas
    • LoginRequest
    • CreateOrderRequest
    • UpdateOrderRequest
    • Price Calculator
    • VerifyItem
    • CreateWarehouseRequest
    • Shipment Package
    • Create Reverse Shipment
    • OrderPackages
    • OrderItem
    • Order
    • ErrorResponse
    • City
    • AutomationRuleCondition
    • Country
    • AutomationRule
    • User
    • PaginationMeta
    • OrderItem
    • PaginatedAutomationRules
    • SuccessResponse
    • CreateOrderItemRequest
    • CalculateRatesRequest
    • BoxDimensions
    • OrderShippingRate
    • RateCalculationParams
    • Warehouse
    • Box
    • CreateBoxRequest
    • UpdateBoxRequest
    • ValidationError
    • NotFoundError
    • UnauthorizedError
    • ForbiddenError
    • PaginationLinks
  1. COD Wallet

Debit COD wallet

POST
https://api.gotreek.com/api/cod-wallets
COD Wallet
Last modified:2026-08-21 10:24:38
Creates a debit request from the merchant’s COD Wallet, either as a bank payout or as a credit to the merchant shipping wallet.
💡
Authentication
Bearer token authentication is required.
The request must be made by an authenticated merchant with the required organisation permissions.
The token must be obtained using POST /api/auth/login and sent as Authorization: Bearer {token}.
💡
Debit Request
Send the debit amount and debit type in the request body.
amount: Debit amount in SAR, not cents.
type: Debit destination:
** bank → creates a bank payout request with status in_progress.
** wallet → credits the merchant shipping wallet, with the amount calculated net of 15% VAT and status paid immediately.
The requested amount must be greater than 0.
The amount cannot exceed debit_maximum_allowed returned by the COD Wallet summary endpoint.
📌
Request
Use POST /api/cod-wallets with a JSON body:
{"amount":115,"type":"wallet"}
For a bank payout:
{"amount":500,"type":"bank"}
The request returns the created COD wallet debit record in the data field.
💡
Amount & Maximum Limit
Debit amount is expressed in SAR.
Unlike the COD wallet list, the debit amount is not expressed in cents.
The maximum allowed debit amount is available through debit_maximum_allowed from GET /api/cod-wallets/summary.
If the requested amount exceeds the maximum allowed amount, the API returns a validation error.

Request

Authorization
OAuth 2.0
Client Credentials
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Token URL: https://app.gotreek.com/api/auth/login
or
Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
COD debit created
Bodyapplication/json

🟠401
🟠403
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.gotreek.com/api/cod-wallets' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "amount": 115,
    "type": "wallet"
}'
Response Response Example
201 - Example 1
{}
Modified at 2026-08-21 10:24:38
Previous
List COD wallets
Next
Get COD wallet summary
Built with