Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
version: 1.0.0
title: Accrue Merchant Wallets API
x-links:
- name: View Alternative Version
url: /api-fs/
description: View API documentation with alternative enum-based WebhookIncluded schema
description: Wallets are where users save money and collect rewards for future payments to merchants. Each wallet is linked to a specific merchant and tracks the balance of deposits and rewards. Users can contribute to their wallet's balance as part of their payment planning, while also accruing rewards.
servers:
- description: Production API
url: https://merchant-api.accruesavings.com
- description: Sandbox API
url: https://merchant-api-sandbox.accruesavings.com
tags:
- name: Wallets
description: Wallets are where users save money and collect rewards for future payments to merchants. Each wallet is linked to a specific merchant and tracks the balance of deposits and rewards. Users can contribute to their wallet's balance as part of their payment planning, while also accruing rewards.
paths:
/api/v1/wallets/:walletId:
get:
operationId: getWallet
tags:
- Wallets
summary: Get Wallet
parameters:
- schema:
type: string
format: uuid
description: ID of the wallet to fetch.
example: 123e4567-e89b-12d3-a456-426614174000
required: false
name: walletId
in: path
- schema:
type: string
description: 'Comma-separated list of resources to include. Supported resources: `user`'
required: false
name: include
in: query
- schema:
type: string
format: uuid
description: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: Client-ID
in: header
- schema:
type: string
format: uuid
description: Secure secret to access privileged endpoints.
example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef
required: true
name: Authorization
in: header
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/GetWalletResponse'
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/GetWalletErrorResponse'
'404':
description: Not Found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/WalletNotFoundResponse'
'500':
description: Internal Server Error
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/UnexpectedErrorForWalletResponse'
x-codeSamples:
- lang: Shell
source: "curl --request GET \\\n --url 'https://merchant-api.accruesavings.com/api/v1/wallets/:walletId?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \\\n --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'"
- lang: Node
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://merchant-api.accruesavings.com/api/v1/wallets/:walletId',\n qs: {include: 'SOME_STRING_VALUE'},\n headers: {\n 'Client-ID': '123e4567-e89b-12d3-a456-426614174000',\n Authorization: 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Python
source: "import http.client\n\nconn = http.client.HTTPSConnection(\"merchant-api.accruesavings.com\")\n\nheaders = {\n 'Client-ID': \"123e4567-e89b-12d3-a456-426614174000\",\n 'Authorization': \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\"\n }\n\nconn.request(\"GET\", \"/api/v1/wallets/:walletId?include=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
- lang: Ruby
source: 'require ''uri''
require ''net/http''
require ''openssl''
url = URI("https://merchant-api.accruesavings.com/api/v1/wallets/:walletId?include=SOME_STRING_VALUE")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Client-ID"] = ''123e4567-e89b-12d3-a456-426614174000''
request["Authorization"] = ''Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef''
response = http.request(request)
puts response.read_body'
- lang: Java
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://merchant-api.accruesavings.com/api/v1/wallets/:walletId?include=SOME_STRING_VALUE\")\n .get()\n .addHeader(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n .addHeader(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n .build();\n\nResponse response = client.newCall(request).execute();"
- lang: Go
source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://merchant-api.accruesavings.com/api/v1/wallets/:walletId?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n\treq.Header.Add(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- lang: Csharp
source: 'var client = new RestClient("https://merchant-api.accruesavings.com/api/v1/wallets/:walletId?include=SOME_STRING_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("Client-ID", "123e4567-e89b-12d3-a456-426614174000");
request.AddHeader("Authorization", "Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef");
IRestResponse response = client.Execute(request);'
- lang: Php
source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://merchant-api.accruesavings.com/api/v1/wallets/:walletId');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'include' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n 'Client-ID' => '123e4567-e89b-12d3-a456-426614174000',\n 'Authorization' => 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"
/api/v1/wallets/barcode/{lookUpId}:
get:
operationId: getWalletByBarcode
tags:
- Wallets
summary: Get Wallet by Barcode
description: 'Fetch a wallet by barcode `lookUpId`.
The barcode is validated and scoped to the merchant derived from the request. Use `include=user` to request user information.'
parameters:
- schema:
type: string
description: Lookup identifier for the barcode
example: SCAN-LOOKUP-ID
required: true
name: lookUpId
in: path
- schema:
type: string
description: 'Comma-separated list of resources to include. Supported resources: `user`'
required: false
name: include
in: query
- schema:
type: string
format: uuid
description: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: Client-ID
in: header
- schema:
type: string
format: uuid
description: Secure secret to access privileged endpoints.
example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef
required: true
name: Authorization
in: header
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/GetWalletByBarcodeResponse'
'400':
description: Barcode expired or invalid
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/WalletBarcodeExpiredOrInvalidResponse'
'404':
description: Wallet for barcode not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/WalletForBarcodeNotFoundResponse'
x-codeSamples:
- lang: Shell
source: "curl --request GET \\\n --url 'https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID?include=SOME_STRING_VALUE' \\\n --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \\\n --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'"
- lang: Node
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID',\n qs: {include: 'SOME_STRING_VALUE'},\n headers: {\n 'Client-ID': '123e4567-e89b-12d3-a456-426614174000',\n Authorization: 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Python
source: "import http.client\n\nconn = http.client.HTTPSConnection(\"merchant-api.accruesavings.com\")\n\nheaders = {\n 'Client-ID': \"123e4567-e89b-12d3-a456-426614174000\",\n 'Authorization': \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\"\n }\n\nconn.request(\"GET\", \"/api/v1/wallets/barcode/SCAN-LOOKUP-ID?include=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
- lang: Ruby
source: 'require ''uri''
require ''net/http''
require ''openssl''
url = URI("https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID?include=SOME_STRING_VALUE")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Client-ID"] = ''123e4567-e89b-12d3-a456-426614174000''
request["Authorization"] = ''Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef''
response = http.request(request)
puts response.read_body'
- lang: Java
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID?include=SOME_STRING_VALUE\")\n .get()\n .addHeader(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n .addHeader(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n .build();\n\nResponse response = client.newCall(request).execute();"
- lang: Go
source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID?include=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n\treq.Header.Add(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- lang: Csharp
source: 'var client = new RestClient("https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID?include=SOME_STRING_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("Client-ID", "123e4567-e89b-12d3-a456-426614174000");
request.AddHeader("Authorization", "Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef");
IRestResponse response = client.Execute(request);'
- lang: Php
source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://merchant-api.accruesavings.com/api/v1/wallets/barcode/SCAN-LOOKUP-ID');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'include' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n 'Client-ID' => '123e4567-e89b-12d3-a456-426614174000',\n 'Authorization' => 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"
/api/v1/wallets:
post:
operationId: createWallet
tags:
- Wallets
summary: Create Wallet
parameters:
- schema:
type: string
format: uuid
description: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: Client-ID
in: header
- schema:
type: string
format: uuid
description: Secure secret to access privileged endpoints.
example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef
required: true
name: Authorization
in: header
requestBody:
required: true
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
type:
type: string
enum:
- Wallet
attributes:
type: object
properties:
userId:
type: string
format: uuid
description: The ID of the user to associate with this wallet.
example: 123e4567-e89b-12d3-a456-426614174000
required:
- userId
required:
- type
- attributes
required:
- data
responses:
'201':
description: 201 Created
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/CreateWalletResponse'
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/CreateWalletErrorResponse'
'500':
description: Internal Server Error
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/UnexpectedErrorForWalletResponse'
x-codeSamples:
- lang: Shell
source: "curl --request POST \\\n --url https://merchant-api.accruesavings.com/api/v1/wallets \\\n --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \\\n --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'"
- lang: Node
source: "const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://merchant-api.accruesavings.com/api/v1/wallets',\n headers: {\n 'Client-ID': '123e4567-e89b-12d3-a456-426614174000',\n Authorization: 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Python
source: "import http.client\n\nconn = http.client.HTTPSConnection(\"merchant-api.accruesavings.com\")\n\nheaders = {\n 'Client-ID': \"123e4567-e89b-12d3-a456-426614174000\",\n 'Authorization': \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\"\n }\n\nconn.request(\"POST\", \"/api/v1/wallets\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
- lang: Ruby
source: 'require ''uri''
require ''net/http''
require ''openssl''
url = URI("https://merchant-api.accruesavings.com/api/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Client-ID"] = ''123e4567-e89b-12d3-a456-426614174000''
request["Authorization"] = ''Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef''
response = http.request(request)
puts response.read_body'
- lang: Java
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://merchant-api.accruesavings.com/api/v1/wallets\")\n .post(null)\n .addHeader(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n .addHeader(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n .build();\n\nResponse response = client.newCall(request).execute();"
- lang: Go
source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://merchant-api.accruesavings.com/api/v1/wallets\"\n\n\treq, _ := http.NewRequest(\"POST\", url, nil)\n\n\treq.Header.Add(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n\treq.Header.Add(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- lang: Csharp
source: 'var client = new RestClient("https://merchant-api.accruesavings.com/api/v1/wallets");
var request = new RestRequest(Method.POST);
request.AddHeader("Client-ID", "123e4567-e89b-12d3-a456-426614174000");
request.AddHeader("Authorization", "Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef");
IRestResponse response = client.Execute(request);'
- lang: Php
source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://merchant-api.accruesavings.com/api/v1/wallets');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n 'Client-ID' => '123e4567-e89b-12d3-a456-426614174000',\n 'Authorization' => 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"
/api/v1/wallets/:walletId/balance:
get:
operationId: getWalletBalance
tags:
- Wallets
summary: Get Wallet Balance
parameters:
- schema:
type: string
description: ID of the wallet for which the balance is being fetched.
example: 123e4567-e89b-12d3-a456-426614174000
required: false
name: walletId
in: path
- schema:
type: string
description: 'Comma-separated list of resources to include. Supported resources: `user`'
required: false
name: include
in: query
- schema:
type: string
description: Attached User Profile Reference ID
example: 123e4567-e89b-12d3-a456-426614174000
required: false
name: userReference
in: query
- schema:
type: integer
description: Purchase amount in cents. When provided, conditional reward calculations may use this value (e.g. minimum purchase thresholds).
example: 5000
required: false
name: purchaseAmount
in: query
- schema:
type: boolean
description: When true, the response includes the withdrawable amount in the balance.
example: true
required: false
name: includeWithdrawableAmount
in: query
- schema:
type: string
format: uuid
description: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: Client-ID
in: header
- schema:
type: string
format: uuid
description: Secure secret to access privileged endpoints.
example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef
required: true
name: Authorization
in: header
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/GetWalletBalanceResponse'
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/GetWalletBalanceErrorResponse'
'404':
description: Not Found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/NoWalletFoundForBalanceResponse'
'500':
description: Internal Server Error
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/UnexpectedErrorForWalletResponse'
x-codeSamples:
- lang: Shell
source: "curl --request GET \\\n --url 'https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE&userReference=123e4567-e89b-12d3-a456-426614174000&purchaseAmount=5000&includeWithdrawableAmount=true' \\\n --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \\\n --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'"
- lang: Node
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance',\n qs: {\n include: 'SOME_STRING_VALUE',\n userReference: '123e4567-e89b-12d3-a456-426614174000',\n purchaseAmount: '5000',\n includeWithdrawableAmount: 'true'\n },\n headers: {\n 'Client-ID': '123e4567-e89b-12d3-a456-426614174000',\n Authorization: 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Python
source: "import http.client\n\nconn = http.client.HTTPSConnection(\"merchant-api.accruesavings.com\")\n\nheaders = {\n 'Client-ID': \"123e4567-e89b-12d3-a456-426614174000\",\n 'Authorization': \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\"\n }\n\nconn.request(\"GET\", \"/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE&userReference=123e4567-e89b-12d3-a456-426614174000&purchaseAmount=5000&includeWithdrawableAmount=true\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
- lang: Ruby
source: 'require ''uri''
require ''net/http''
require ''openssl''
url = URI("https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE&userReference=123e4567-e89b-12d3-a456-426614174000&purchaseAmount=5000&includeWithdrawableAmount=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Client-ID"] = ''123e4567-e89b-12d3-a456-426614174000''
request["Authorization"] = ''Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef''
response = http.request(request)
puts response.read_body'
- lang: Java
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE&userReference=123e4567-e89b-12d3-a456-426614174000&purchaseAmount=5000&includeWithdrawableAmount=true\")\n .get()\n .addHeader(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n .addHeader(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n .build();\n\nResponse response = client.newCall(request).execute();"
- lang: Go
source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE&userReference=123e4567-e89b-12d3-a456-426614174000&purchaseAmount=5000&includeWithdrawableAmount=true\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Client-ID\", \"123e4567-e89b-12d3-a456-426614174000\")\n\treq.Header.Add(\"Authorization\", \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- lang: Csharp
source: 'var client = new RestClient("https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance?include=SOME_STRING_VALUE&userReference=123e4567-e89b-12d3-a456-426614174000&purchaseAmount=5000&includeWithdrawableAmount=true");
var request = new RestRequest(Method.GET);
request.AddHeader("Client-ID", "123e4567-e89b-12d3-a456-426614174000");
request.AddHeader("Authorization", "Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef");
IRestResponse response = client.Execute(request);'
- lang: Php
source: "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://merchant-api.accruesavings.com/api/v1/wallets/:walletId/balance');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'include' => 'SOME_STRING_VALUE',\n 'userReference' => '123e4567-e89b-12d3-a456-426614174000',\n 'purchaseAmount' => '5000',\n 'includeWithdrawableAmount' => 'true'\n]);\n\n$request->setHeaders([\n 'Client-ID' => '123e4567-e89b-12d3-a456-426614174000',\n 'Authorization' => 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n]);\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}"
/api/v1/wallets/:
get:
operationId: listWallets
tags:
- Wallets
summary: List Wallets
parameters:
- schema:
type: string
description: Filter the list of objects by the value of the phoneNumber field.
required: false
name: filter[phoneNumber]
in: query
- schema:
type: string
description: Filter the list of objects by the value of the email field.
required: false
name: filter[email]
in: query
- schema:
type: string
description: Filter the list of objects by the value of the referenceId field.
required: false
name: filter[referenceId]
in: query
- schema:
type: number
minimum: 1
maximum: 50
default: 10
description: Maximum number of objects that will be returned. Can not be greater than 50.
required: false
name: page[limit]
in: query
- schema:
type: number
minimum: 0
default: 0
description: Offset from the beginning of the list of objects. Can not be negative.
required: false
name: page[offset]
in: query
- schema:
type: string
format: uuid
description: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: Client-ID
in: header
- schema:
type: string
format: uuid
description: Secure secret to access privileged endpoints.
example: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef
required: true
name: Authorization
in: header
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/ListWalletsResponse'
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/WalletQueryValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/UnexpectedErrorForWalletResponse'
x-codeSamples:
- lang: Shell
source: "curl --request GET \\\n --url 'https://merchant-api.accruesavings.com/api/v1/wallets/?filter%5BphoneNumber%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5BreferenceId%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE' \\\n --header 'Authorization: Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef' \\\n --header 'Client-ID: 123e4567-e89b-12d3-a456-426614174000'"
- lang: Node
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://merchant-api.accruesavings.com/api/v1/wallets/',\n qs: {\n 'filter[phoneNumber]': 'SOME_STRING_VALUE',\n 'filter[email]': 'SOME_STRING_VALUE',\n 'filter[referenceId]': 'SOME_STRING_VALUE',\n 'page[limit]': 'SOME_NUMBER_VALUE',\n 'page[offset]': 'SOME_NUMBER_VALUE'\n },\n headers: {\n 'Client-ID': '123e4567-e89b-12d3-a456-426614174000',\n Authorization: 'Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Python
source: "import http.client\n\nconn = http.client.HTTPSConnection(\"merchant-api.accruesavings.com\")\n\nheaders = {\n 'Client-ID': \"123e4567-e89b-12d3-a456-426614174000\",\n 'Authorization': \"Bearer 633b336e4f57f095a405f6685e208cc7dd16de3e82494662f2acfeec3af1cdef\"\n }\n\nconn.request(\"GET\", \"/api/v1/wallets/?filter%5BphoneNumber%5D=SOME_STRING_VALUE&filter%5Bemail%5D=SOME_STRING_VALUE&filter%5BreferenceId%5D=SOME_STRING_VALUE&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
- lang: Ruby
source: 'require ''uri''
require ''net/http''
require ''openssl''
# --- truncated at 32 KB (135 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/accrue-savings/refs/heads/main/openapi/accrue-savings-wallets-api-openapi.yml