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 Simulations API
x-links:
- name: View Alternative Version
url: /api-fs/
description: View API documentation with alternative enum-based WebhookIncluded schema
description: Simulations are used to simulate payments authorizations and captures for Card Rails (Virtual Debit Cards).
servers:
- description: Production API
url: https://merchant-api.accruesavings.com
- description: Sandbox API
url: https://merchant-api-sandbox.accruesavings.com
tags:
- name: Simulations
description: Simulations are used to simulate payments authorizations and captures for Card Rails (Virtual Debit Cards).
paths:
/api/v1/simulation/{paymentId}/card/auth:
post:
operationId: simulateCardAuthorization
description: 'Simulate a card authorization request.
This endpoint will call our bank simulation service to authorize the amount specified.
After the request is received, system will create a `Authorization Request` resource, asynchronously, and it''s `authorizationRequestId` will be required to capture the funds using the Simulate Card Capture endpoint.
This `Authorization Request` resource can be fetched using the Get Authorization Request List endpoint.
**This endpoint is available for Card Rails (Virtual Debit Cards) only**.
Refer to Merchant API Guide for more information.'
summary: Simulate Card Authorization
tags:
- Simulations
parameters:
- schema:
type: string
format: uuid
description: Payment ID
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: paymentId
in: path
- 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:
$ref: '#/components/schemas/SimulateCardAuthorization'
required:
- data
responses:
'201':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties: {}
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulateCardErrorResponse'
'404':
description: Not Found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulationPaymentNotFoundResponse'
x-codeSamples:
- lang: Shell
source: "curl --request POST \\\n --url https://merchant-api.accruesavings.com/api/v1/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth \\\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth',\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth\", 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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth")
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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth\")\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth\"\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth");
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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth');\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}"
get:
operationId: getAuthorizationRequestList
summary: Get Authorization Request List
description: 'Get a list of all the `Authorization Requests` for a given payment.
The `Authorization Requests` are created as a result of the Simulate Card Authorization endpoint.
**This endpoint is available for Card Rails (Virtual Debit Cards) only**.
Refer to Merchant API Guide for more information.'
tags:
- Simulations
parameters:
- schema:
type: string
format: uuid
description: Payment ID
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: paymentId
in: path
- 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/ListAuthorizationRequestsResponse'
'404':
description: Not Found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulationPaymentNotFoundResponse'
x-codeSamples:
- lang: Shell
source: "curl --request GET \\\n --url https://merchant-api.accruesavings.com/api/v1/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth \\\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth',\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth\", 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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth")
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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth\")\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth\"\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth");
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/simulation/123e4567-e89b-12d3-a456-426614174000/card/auth');\n$request->setMethod(HTTP_METH_GET);\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/simulation/{paymentId}/card/capture:
post:
operationId: simulateCardCapture
summary: Simulate Card Capture
description: 'Simulate a card capture request.
This endpoint will call our bank simulation service to capture the funds specified.
The `authorizationRequestId` is required to be passed in the request body.
The `authorizationRequestId` can be found in the `Authorization Request` resource, that was created as a result of the Simulate Card Authorization endpoint.
**This endpoint is available for Card Rails (Virtual Debit Cards) only**.
Refer to Merchant API Guide for more information.'
tags:
- Simulations
parameters:
- schema:
type: string
format: uuid
description: Payment ID
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: paymentId
in: path
- 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:
$ref: '#/components/schemas/SimulateCardCapture'
required:
- data
responses:
'201':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties: {}
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulateCardErrorResponse'
'404':
description: Not Found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulationPaymentNotFoundResponse'
x-codeSamples:
- lang: Shell
source: "curl --request POST \\\n --url https://merchant-api.accruesavings.com/api/v1/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture \\\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture',\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture\", 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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture")
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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture\")\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture\"\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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture");
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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture');\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}"
get:
operationId: getCapturesList
summary: Get Captures List
description: 'Get a list of all the `Captures` for a given payment.
The `Captures` are created as a result of the Simulate Card Authorization endpoint.
**This endpoint is available for Card Rails (Virtual Debit Cards) only**.
Refer to Merchant API Guide for more information.'
tags:
- Simulations
parameters:
- schema:
type: string
format: uuid
description: Payment ID
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: paymentId
in: path
- schema:
type: string
description: Filter the list of objects by the value of the method field.
required: false
name: filter[method]
in: query
- schema:
type: string
example: 'true'
required: false
name: filter[success]
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
default: sort=-createdAt
description: Sorts the list of objects by the given criteria. The sort parameter value is a comma separated list of sort criteria. Each sort criteria is a field name optionally followed by a minus sign (-) to indicate descending order. Ascending order is assumed if no minus sign is present. The sort criteria are applied in the order in which they appear in the sort parameter.
required: false
name: sort
in: query
- schema:
type: string
description: 'Comma-separated list of resources to include. Supported resources: `payments`'
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/CardCapturesRequestsResponse'
'404':
description: Not Found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulationPaymentNotFoundResponse'
x-codeSamples:
- lang: Shell
source: "curl --request GET \\\n --url 'https://merchant-api.accruesavings.com/api/v1/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture?filter%5Bmethod%5D=SOME_STRING_VALUE&filter%5Bsuccess%5D=true&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture',\n qs: {\n 'filter[method]': 'SOME_STRING_VALUE',\n 'filter[success]': 'true',\n 'page[limit]': 'SOME_NUMBER_VALUE',\n 'page[offset]': 'SOME_NUMBER_VALUE',\n sort: 'SOME_STRING_VALUE',\n include: 'SOME_STRING_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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture?filter%5Bmethod%5D=SOME_STRING_VALUE&filter%5Bsuccess%5D=true&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture?filter%5Bmethod%5D=SOME_STRING_VALUE&filter%5Bsuccess%5D=true&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture?filter%5Bmethod%5D=SOME_STRING_VALUE&filter%5Bsuccess%5D=true&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture?filter%5Bmethod%5D=SOME_STRING_VALUE&filter%5Bsuccess%5D=true&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture?filter%5Bmethod%5D=SOME_STRING_VALUE&filter%5Bsuccess%5D=true&page%5Blimit%5D=SOME_NUMBER_VALUE&page%5Boffset%5D=SOME_NUMBER_VALUE&sort=SOME_STRING_VALUE&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/simulation/123e4567-e89b-12d3-a456-426614174000/card/capture');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n 'filter[method]' => 'SOME_STRING_VALUE',\n 'filter[success]' => 'true',\n 'page[limit]' => 'SOME_NUMBER_VALUE',\n 'page[offset]' => 'SOME_NUMBER_VALUE',\n 'sort' => 'SOME_STRING_VALUE',\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/simulation/{paymentId}/card/auth-capture:
post:
operationId: simulateCardAuthorizationCapture
description: 'Simulate a card authorization/capture request.
This endpoint aggregates the Simulate Card Authorization and Simulate Card Capture endpoints.
**This endpoint is available for Card Rails (Virtual Debit Cards) only**.
Refer to Merchant API Guide for more information.'
summary: Simulate Card Authorization/Capture
tags:
- Simulations
parameters:
- schema:
type: string
format: uuid
description: Payment ID
example: 123e4567-e89b-12d3-a456-426614174000
required: true
name: paymentId
in: path
- 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:
$ref: '#/components/schemas/SimulateCardAuthorizationCapture'
required:
- data
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
success:
type: boolean
description: Indicates whether the authorization/capture was successful.
example: true
error:
type:
- string
- 'null'
description: Error message if the authorization/capture was not successful.
example: Error message
required:
- success
- error
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/SimulationCardAuthorizationValidationResponse'
x-codeSamples:
- lang: Shell
source: "curl --request POST \\\n --url https://merchant-api.accruesavings.com/api/v1/simulation/123e4567-e89b-12d3-a456-42661417
# --- truncated at 32 KB (116 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/accrue-savings/refs/heads/main/openapi/accrue-savings-simulations-api-openapi.yml