Skip to navigation

Adjust Wallet Balance

Creates a manual wallet balance adjustment for a member.

Example curl:

curl --request POST '{{base_url}}/sp/wallet/adjust' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"idempotency_key": "{{$timestamp}}-wallet-adjust",
"contact_id": {{contact_id}},
"location_id": {{location_id}},
"amount": 20,
"adjustment_type": "credit",
"reason": "Manual credit adjustment"
}'

Example success response shape:

{
"success": true,
"message": "Wallet adjusted successfully.",
"data": {
"contact_id": 456,
"amount": 20,
"adjustment_type": "credit",
"balance_after": 95
},
"meta": {}
}

Example error response shape:

{
"success": false,
"message": "The same idempotency_key cannot be reused with a different payload.",
"error": {
"code": "idempotency_key_reused_with_different_payload",
"details": {}
}
}

Common platform errors:

  • idempotency_key_required
  • member_not_found
  • sp_scope_not_granted
  • sp_token_scope_missing
  • sp_location_not_allowed
  • legacy_field_not_allowed
  • query_parameters_not_allowed
  • invalid_content_type

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

AuthorizationstringOptional

Response

200 OK Example
successbooleanOptional
messagestringOptional
dataobjectOptional
metaobjectOptional