- Introduction
- Authentication
- Errors
- Change Logs
- Promotion
- Loyalty
- Wallet
- PIM
- Merchant
- Common
- How to
Spend
Production
Production
POST
https://api.b2b.retter.io/5p1hp1d2t
Wallet
Last modified:2024-09-17 11:22:35
Request
Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
B2B_WALLET_PROJECT_ID
string
required
B2B_WALLET_ACCOUNT_ID
string
required
Body Params application/json
amount
integer
required
description
string
optional
channel
string
required
additionalData
object
optional
referenceId
string
optional
userId
string
optional
storeId
string
optional
storeName
string
optional
accountNumber
string
optional
walletId
string
optional
currency
string
optional
Example
{
"amount": 0,
"description": "string",
"channel": "string",
"additionalData": {},
"referenceId": "string",
"userId": "string",
"storeId": "string",
"storeName": "string",
"accountNumber": "string",
"walletId": "string",
"currency": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.b2b.retter.io/5p1hp1d2t/CALL/WalletAPI/spend/-' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"amount": 0,
"description": "string",
"channel": "string",
"additionalData": {},
"referenceId": "string",
"userId": "string",
"storeId": "string",
"storeName": "string",
"accountNumber": "string",
"walletId": "string",
"currency": "string"
}'
Responses
🟢200OK
application/json
Body
transaction
object
optional
transactionId
string
optional
type
string
optional
amount
integer
optional
description
string
optional
channel
string
optional
createdAt
string
optional
balance
integer
optional
Example
{
"transaction": {
"transactionId": "string",
"type": "string",
"amount": 0,
"description": "string",
"channel": "string",
"createdAt": "string"
},
"balance": 0
}
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
Modified at 2024-09-17 11:22:35