ClearBank API test endpoints for validating authentication and digital signatures.
Use these endpoints during integration development to verify your:
- API token (authentication)
- Digital signature computation (request signing)
- Webhook subscription (
FITestEvent)
These endpoints are available in both simulation and production.
Examples
client = ClearBank.default_client()
# Test auth only (GET — no DigitalSignature required)
{:ok, _} = ClearBank.TestEndpoints.ping(client)
# Test auth + DigitalSignature + trigger FITestEvent webhook
{:ok, %{"Message" => "hello!"}} = ClearBank.TestEndpoints.echo(client, "hello!")
Summary
Functions
POST /v1/Test — verifies authentication and digital signature.
GET /v1/Test — verifies your API token (authentication only).
Functions
@spec echo(ClearBank.Client.t(), String.t()) :: ClearBank.HTTP.result()
POST /v1/Test — verifies authentication and digital signature.
Echoes back the body string in the response as %{"Message" => body}.
If you are subscribed to the FITestEvent webhook, this also triggers
a test webhook delivery to your configured endpoint.
Params
body- any string to echo back (default:"ping")
Status codes
| Code | Meaning |
|---|---|
| 200 | Auth + signature valid, body echoed |
| 403 | Forbidden |
| 409 | Duplicate X-Request-Id |
| 500 | Internal server error |
| 503 | Service unavailable |
Examples
{:ok, %{"Message" => "hello world!"}} =
ClearBank.TestEndpoints.echo(client, "hello world!")
@spec ping(ClearBank.Client.t()) :: ClearBank.HTTP.result()
GET /v1/Test — verifies your API token (authentication only).
No DigitalSignature header required. Returns 200 OK on success.
Status codes
| Code | Meaning |
|---|---|
| 200 | Authentication successful |
| 403 | Forbidden — invalid or expired API token |
| 500 | Internal server error |
| 503 | Service unavailable |
Examples
{:ok, _} = ClearBank.TestEndpoints.ping(client)