Create (or find) a wallet for a contact
Idempotent per contact + program: if a wallet already exists for this contact and program, the existing wallet is returned rather than a duplicate created.
POST
/walletsAuthorization
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsoncontact_idintegerrequiredprogram_idintegerDefaults to the seller's active program of the given `type`.
typestringdefault: "points"
Allowed:
pointscreditResponses
201Wallet created (or found)
_linksHalLinksidintegertypestringAllowed:
pointscreditnamestringstatestringAllowed:
activeinactivebalanceintegercontact_idintegerprogram_idintegerconsentedbooleanlimit_amountintegerCredit wallets only — maximum spendable balance.
overdue_limit_amountintegerCredit wallets only — percentage of `limit_amount` allowed as overdue.
loan_termstringCredit wallets only — e.g. "2.days", "3.months".
created_onstring<date-time>updated_onstring<date-time>Request
curl -X POST "https://api.onbolder.com/v2/wallets" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"contact_id": 3001
}'const response = await fetch("https://api.onbolder.com/v2/wallets", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"contact_id": 3001
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/wallets",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"contact_id": 3001
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": 0,
"type": "points",
"name": "string",
"state": "active",
"balance": 0,
"contact_id": 0,
"program_id": 0,
"consented": true,
"limit_amount": 0,
"overdue_limit_amount": 0,
"loan_term": "string",
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z"
}