api.
one vouchmorph interface. the standards sit behind it as formats.
the description, openapi 3.1: openapi.yaml · openapi.json
/api/v1/atm/generate_code.php
livewe call your test system. your path: generate_token (endpoints.destination_cashout.generate_token)
a code the customer takes to your atm or agent, backed by the source's signed hold. answer success, the code (cashout_code, code or sat_number), the pin (atm_pin or pin), voucher_number and expires_at. we text the code and pin to beneficiary_phone; in the sandbox the text is kept for the console's messages tab instead.
- signed
- vouchmorph's certificate + the source's proof
- clock
- at least 60 s to answer
- repeats
- same reference: one code
request
POST /api/v1/atm/generate_code.php
host: test.yourbank.example
Content-Type: application/json
Accept: application/json
X-Correlation-ID: SWAP_1795935600_3f9a2c7e51b04d18
X-API-KEY: $BANK_KEY
{
"action": "GENERATE_TOKEN",
"reference": "SWAP_1795935600_3f9a2c7e51b04d18",
"amount": 200,
"currency": "BWP",
"hold_reference": "HLD-20261129-000231",
"expiry": "2026-11-30 09:00:00",
"expires_at": "2026-11-30 09:00:00",
"source_verification": {
"verified": true,
"signature": "<the source's signature>"
},
"source_hold": {
"hold_reference": "HLD-20261129-000231",
"signature": "<the source's signature>"
},
"beneficiary_phone": "26771000002",
"from_institution": "ORANGE",
"source_institution": "ORANGE",
"to_institution": "ZURUBANK",
"destination_institution": "ZURUBANK",
"source_identifier": "77100001",
"source_identifier_type": "account",
"timestamp": 1795935640,
"signature": "<base64 rsa-sha256>",
"requester": "VOUCHMORPH",
"certificate": "-----BEGIN CERTIFICATE-----\n…\n-----END CERTIFICATE-----"
}curl
# set BANK_KEY first: export BANK_KEY=...
curl -sS -X POST 'https://test.yourbank.example/api/v1/atm/generate_code.php' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Correlation-ID: SWAP_1795935600_3f9a2c7e51b04d18' \
-H "X-API-KEY: $BANK_KEY" \
--data-binary '{"action":"GENERATE_TOKEN","reference":"SWAP_1795935600_3f9a2c7e51b04d18","amount":200,"currency":"BWP","hold_reference":"HLD-20261129-000231","expiry":"2026-11-30 09:00:00","expires_at":"2026-11-30 09:00:00","source_verification":{"verified":true,"signature":"<the source'\''s signature>"},"source_hold":{"hold_reference":"HLD-20261129-000231","signature":"<the source'\''s signature>"},"beneficiary_phone":"26771000002","from_institution":"ORANGE","source_institution":"ORANGE","to_institution":"ZURUBANK","destination_institution":"ZURUBANK","source_identifier":"77100001","source_identifier_type":"account","timestamp":1795935640,"signature":"<base64 rsa-sha256>","requester":"VOUCHMORPH","certificate":"-----BEGIN CERTIFICATE-----\n…\n-----END CERTIFICATE-----"}'answer
200 OK
{
"success": true,
"cashout_code": "48213906",
"voucher_number": "48213906",
"atm_pin": "5521",
"expires_at": "2026-11-30 09:00:00",
"transaction_reference": "ATM-20261129-000112"
}other answers
4xx a refusal: the call failed, with your `message` shown to staff. say why in `message`
{ "success": false, "message": "Insufficient funds" }5xx a 5xx: failed. a 502 or 504, a timeout after the request left or a cut-short answer is an unknown outcome: never sent again, confirmed with you later
{ "success": false, "message": "Service unavailable" }
parameters
| name | in | needed | what it is |
|---|---|---|---|
| X-Correlation-ID | header | no | the body's reference, when it has one |
formats behind this interface
- jsonlive, every call
- iso 20022live, banks
- swift mtlive, banks
- iso 8583live, cards, atm
- fspiopoff, off until a partner needs it
you choose your format and how we sign in on your connection page. next: not in this build yet.
built to
- openapi 3.1, this file
- problem details · rfc 9457, settlement messages answer application/problem+json
- idempotency-key, a courier booking carries our reference as its Idempotency-Key
- mutual tls, offered for our calls to your test system
- oauth 2.0 client credentials · rfc 6749, offered for our calls to your test system