ZeroPointPayments

API reference

Merchants

Common headers

Every endpoint on this page takes these headers.

NameDescription
ZeroPoint-Accountheader, string or null

Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.

Stripe-Accountheader, string or null

Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...).

Common responses

Every endpoint on this page can answer with these.

StatusDescriptionBody
400

Invalid request. A parameter, header or body field failed validation (code parameter_invalid, with param naming it), or another invalid_request code this operation's description lists. Fix the request; do not retry it unchanged.

ErrorResponse
401

The API key is missing, malformed, unknown or revoked (api_key_missing, api_key_malformed, api_key_invalid). Fix the Authorization header.

ErrorResponse
403

The key is valid but may not do this: platform_suspended, insufficient_scope, live_mode_unavailable, or a permission code this operation's description lists (for example processor_currency_unsupported).

ErrorResponse
429

Too many requests (rate_limited). Wait for the Retry-After header, then retry.

ErrorResponse

List merchants

GET/v1/merchants

Lists your merchants, newest first.

Arguments: limit, cursor.

Returns a list of merchant objects.

Errors: authentication errors only.

Next step: GET /v1/merchants/{id}/terminals.

Parameters

NameDescription
limitquery, integer

Items per page, default 20.

cursorquery, string or null

next_cursor from the previous page.

starting_afterquery, string or null

Stripe's name for cursor: the id of the last object of the previous page. Same value, same meaning. Send cursor or starting_after, not both.

ending_beforequery, string or null

Not supported: answers 400 parameter_unavailable. Lists page newest first; page forward with starting_after.

Responses

StatusDescriptionBody
200

Successful Response

ListOut_MerchantOut_

Example

Shell
curl -X GET "https://api.zeropointapp.com/v1/merchants" \
  -H "Authorization: Bearer zp_test_..."

Create a merchant

POST/v1/merchants

Creates a merchant that can take payments through your software. In test mode it is active instantly and bound to the shared sandbox processor account when one is configured. In live mode it starts as invited: send its owner through the link from POST /v1/merchants/{id}/connect to bind their own processor account. Use it once per business you onboard.

Arguments: display_name, metadata.

Returns the merchant object.

Errors: idempotency_key_required, parameter_invalid.

Next step: in test mode, POST /v1/merchants/{id}/terminals with {"kind":"simulated"} to get a terminal you can drive without hardware; in live mode, POST /v1/merchants/{id}/connect.

Parameters

NameDescription
Idempotency-Keyheader, string or null

Required on this endpoint. Any unique string up to 255 characters (a UUID is fine). Reuse it only to retry the same request.

Request body

FieldDescription
display_namestringRequired

Business name shown on receipts.

metadataobject of string

Up to 50 string pairs.

Responses

StatusDescriptionBody
201

Successful Response

MerchantOut
409

Conflict with the current state: idempotency_in_progress (another request with this Idempotency-Key is still running; wait for Retry-After), or a conflict code this operation's description lists.

ErrorResponse
413

The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length.

ErrorResponse
422

This Idempotency-Key was already used with a different request body (code idempotency_key_reused). Send the original body to retry, or a new key for a new request.

ErrorResponse

Example

Shell
curl -X POST "https://api.zeropointapp.com/v1/merchants" \
  -H "Authorization: Bearer zp_test_..." \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
    "display_name": <display_name>
  }'

Retrieve a merchant

GET/v1/merchants/{merchant_id}

Returns one merchant.

Arguments: merchant_id (mch_...).

Returns the merchant object.

Errors: resource_missing when the id is unknown or belongs to another platform.

Next step: create a terminal or a payment for it.

Parameters

NameDescription
merchant_idpath, stringRequired

Responses

StatusDescriptionBody
200

Successful Response

MerchantOut
404

No such resource for this platform (resource_missing), or another not_found code this operation's description lists.

ErrorResponse

Example

Shell
curl -X GET "https://api.zeropointapp.com/v1/merchants/{merchant_id}" \
  -H "Authorization: Bearer zp_test_..."

POST/v1/merchants/{merchant_id}/connect

Returns a one-time link. Send the merchant to it in a browser: it opens a ZeroPoint consent page that names your platform and what the merchant is granting (taking payments and issuing refunds on their account). When they press Continue they sign in to their own processor account (the one they opened through ZeroPoint's referral link) and approve the connection, and ZeroPoint binds this merchant to that account. The merchant must finish in the browser that showed the consent page. From then on the merchant's payments run on its own account. Poll GET /v1/merchants/{id} for processor_connected, or listen for merchant.state_changed. Works for live merchants (required before any payment; a real payments account only) and for sandbox merchants that want their own processor test account instead of the shared one (a processor test account only).

Arguments: merchant_id, return_url (optional).

Returns a processor_connection object with connect_url and expires_at.

Errors: resource_missing, return_url_invalid, connect_unavailable (this deployment has no processor application credentials). A refused connection reaches return_url as status=failed with reason processor_mode_mismatch, processor_already_connected or connect_consent_required. A connection whose account is not a US, USD account succeeds but its card payments are held: return_url gets status=connected with hold=processor_currency_unsupported and the merchant object says card_payments_held.

Next step: open connect_url as the merchant; then GET /v1/merchants/{id}.

Parameters

NameDescription
merchant_idpath, stringRequired

Request body

FieldDescription
return_urlstring or null

Where to send the merchant afterwards (https, or http://localhost while developing). It receives merchant_id and status=connected|failed as query parameters, plus reason=<code> when ZeroPoint refused the connection. Without one, ZeroPoint shows the merchant a result page.

Responses

StatusDescriptionBody
201

Successful Response

ProcessorConnectionOut
404

No such resource for this platform (resource_missing), or another not_found code this operation's description lists.

ErrorResponse
413

The request body is over 1048576 bytes, its Content-Length is not a number, or it is sent chunked (code payload_too_large). Every write method is checked, before routing. Send a smaller body with a Content-Length.

ErrorResponse
503

No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).

ErrorResponse

Example

Shell
curl -X POST "https://api.zeropointapp.com/v1/merchants/{merchant_id}/connect" \
  -H "Authorization: Bearer zp_test_..." \
  -H "Content-Type: application/json" \
  -d '{}'

Get the keyed-entry (Collect) configuration

GET/v1/merchants/{merchant_id}/collect-config

Returns what your web page needs for keyed entry on this merchant: form_url, the ZeroPoint-hosted card form to embed in an iframe (it posts a one-time nonce to your page with window.postMessage), a stand-alone sandbox form URL, and test cards. Card numbers never touch your server or your page.

Arguments: merchant_id.

Returns a collect_config object.

Errors: resource_missing; processor_currency_unsupported (403) when the merchant's connected account is not a US, USD account (card payments are held and no card form is served); processor_mode_mismatch (403); sandbox_processor_unconfigured (503) when this sandbox has no processor account.

Next step: get a nonce in the browser, then POST /v1/payments with method keyed (see the accept-a-keyed-payment guide).

Parameters

NameDescription
merchant_idpath, stringRequired

Responses

StatusDescriptionBody
200

Successful Response

CollectConfigOut
404

No such resource for this platform (resource_missing), or another not_found code this operation's description lists.

ErrorResponse
502

The payments network failed or gave no decision (processor_unavailable). Nothing was changed by this request; retry it later.

ErrorResponse
503

No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable).

ErrorResponse

Example

Shell
curl -X GET "https://api.zeropointapp.com/v1/merchants/{merchant_id}/collect-config" \
  -H "Authorization: Bearer zp_test_..."