Draft API Preview for the MorphosisBlock Payment API. This walkthrough targets a reserved non-routable domain. It demonstrates the proposed contract and cannot create a real payment.

Create a sandbox payment

This example signs a proposed POST /v2/payments request with Morphosis HMAC v1. It uses fixed documentation values so the request can be reviewed and reproduced without exposing a credential. The complete path is deliberately short: configure documentation values, sign one exact JSON body, and inspect the proposed payment resource.

1. Set documentation-only values

The .invalid top-level domain is reserved and cannot resolve to a real API. The displayed signing value is intentionally public and must never be used outside this documentation example.

2. Sign and send the request

Save the following as create-payment.mjs and run it with Node.js 18 or newer. The request will fail at network resolution by design, but the printed canonical request and headers demonstrate the complete signing flow.

3. Understand the proposed response

A successful draft response has the following shape. The address is deliberately invalid and must not receive funds.
Persist payment_id, external_reference, and the complete payment_instructions object before presenting instructions to a customer. Never send funds to a documentation address. See Errors and idempotency for ambiguous outcomes.