API reference
Payments
Common responses
Every endpoint on this page can answer with these.
| Status | Description | Body |
|---|---|---|
| 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 |
| 404 | No such resource for this platform (resource_missing), or another not_found code this operation's description lists. | ErrorResponse |
| 429 | Too many requests (rate_limited). Wait for the Retry-After header, then retry. | ErrorResponse |
List payments
GET/
Lists payments newest first. Use platform_reference to find your own order.
Arguments: merchant_id, platform_reference, state, payment_method, limit, cursor.
Returns a list of payment objects.
Errors: parameter_invalid.
Next step: GET /v1/payments/{id}.
Parameters
| Name | Description |
|---|---|
merchant_idquery, string or null | |
platform_referencequery, string or null | |
statequery, string or null | |
payment_methodquery, string or null | |
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. |
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_...). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ListOut_PaymentOut_ |
Example
curl -X GET "https://api.zeropointapp.com/v1/payments" \
-H "Authorization: Bearer zp_test_..."Create a payment
POST/
Charges a customer. method=terminal pushes the amount to a terminal and returns 202 with state pending: a simulated terminal answers when you call simulate, a physical one when the customer taps (about a minute); you learn the result from payment.* webhooks or by polling GET /v1/payments/{id}. method=keyed charges a Collect nonce and returns 201 with a final state in the same response. method=card_on_file charges a saved payment method the same way (payment_method and initiated_by required; needs the payment_methods:charge scope). method=keyed with save_payment_method {customer, consent {agreed_at, reference}, metadata} saves the card first and then charges the saved card (needs payment_methods:write; only a typed card form nonce, never a wallet one): the payment names the new payment_method; a declined charge keeps the saved card; card_not_saved or nonce_invalid as failure_code means nothing was saved and nothing charged.
Arguments: merchant_id (optional for card_on_file and the one-step save: without it the ZeroPoint-Account header, else the platform's only merchant in this mode), amount_cents, currency, platform_reference (unique per merchant), method, terminal_id or nonce or payment_method, initiated_by, save_payment_method, description, metadata, terminal_options {tip, receipt_screen} (terminal only; a tip lands in tip_cents).
Returns the payment object.
Errors: idempotency_key_required, parameter_invalid (terminal_id or nonce missing for the method, terminal_options on a keyed payment, platform_reference, description, metadata or nonce that looks like a card number, a platform_reference starting with zp:, reserved for ZeroPoint), resource_missing, insufficient_scope (403), card_on_file_unavailable (400, live mode), payment_method_unusable (409; the saved card cannot be charged, no payment was created and the reference is still free: save the card again, then retry with a new Idempotency-Key), payment_resume_method_unusable (409; a pending saved-card payment cannot be resumed because the merchant's processor account changed or its card can no longer be read: nothing was sent, do not charge it under a new reference; retry this request or GET the payment (never cached, Retry-After); unresolved it ends as processor_unverified), nonce_already_used (409; keyed or one-step: this nonce already saved a card or was already charged on this merchant, the message names the pm_ or pay_ id), resource_limit_exceeded and sandbox_daily_limit_exceeded (409, test mode ceilings on open payments, saved cards and save attempts), save_attempt_limit_exceeded (409, live one-step: the platform's daily allowance of card saves is used up), platform_reference_in_use (409), payment_resume_mismatch (409; a pending keyed payment retried with a different nonce or amount: send the original body or use a new platform_reference), payment_in_progress (409 with Retry-After, two cases: a keyed charge for this platform_reference is still in flight, Retry-After 2; or the processor answered and ZeroPoint is still recording it, Retry-After 60; retry the identical request with the same Idempotency-Key, which never charges twice; after 15 minutes the same key answers platform_reference_in_use and GET /v1/payments/{id} gives the outcome), terminal_busy (409; one payment at a time per physical terminal, the message names it), physical_terminal_unavailable (400; test mode reserves physical terminals, use a simulated one), terminal_offline (402), card_declined, nonce_invalid, processor_rejected, duplicate_transaction (the processor's duplicate screen refused a second equal charge on the card; not a card decline) and partial_approval (the card approved only part of the amount; ZeroPoint voided it, ask for another card) appear as failure_code on a 201 keyed response, processor_currency_unsupported (403; the merchant's connected account is not a US, USD account, so its card payments are held: no payment is created and nothing is sent), sandbox_processor_unconfigured (503), processor_unavailable (502; retry with the same Idempotency-Key, a physical push resumes).
Next step: for a simulated terminal call POST /v1/sandbox/terminals/{id}/simulate to choose the outcome; for a physical terminal ask the customer to tap.
Parameters
| Name | Description |
|---|---|
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. |
ZeroPoint-Accountheader, string or null | Optional, card on file and the one-step save only. The merchant (mch_...) this payment acts on, when the body has no merchant_id. |
Stripe-Accountheader, string or null | Optional. A synonym of ZeroPoint-Account; holds a merchant id (mch_...). |
Request body
| Field | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
merchant_idstring or null | Required for method terminal and a plain keyed payment. Optional for card_on_file and a keyed payment with save_payment_method: without it, the ZeroPoint-Account header, else the platform's only merchant in this mode. | ||||||||||||||
amount_centsintegerRequired | Integer cents, e.g. 1250 = $12.50. | ||||||||||||||
currencystring | Lowercase ISO 4217; usd only. Value: | ||||||||||||||
platform_referencestringRequired | Your own id for this payment (order id, invoice id). Unique per merchant. References starting with zp: (any case) are reserved for ZeroPoint. | ||||||||||||||
methodstringRequired | terminal: card-present on a terminal_id. keyed: a Collect nonce. card_on_file: a saved payment method (payment_method). One of: | ||||||||||||||
terminal_idstring or null | |||||||||||||||
noncestring or null | One-time value from the Collect form. Never logged. | ||||||||||||||
descriptionstring or null | Shown on the receipt. | ||||||||||||||
metadataobject of string | |||||||||||||||
terminal_optionsTerminalOptions or null | Terminal payments only: tip prompt and receipt screen. Both default false. Fields inside terminal_options
| ||||||||||||||
payment_methodstring or null | card_on_file only, required: the id of the saved payment method (pm_...) to charge. Needs the payment_methods:charge scope. | ||||||||||||||
initiated_bystring or null | card_on_file: required, customer (the cardholder is paying now) or merchant (a renewal or a staff action). keyed with save_payment_method: optional, customer only. A record only; never sent to the processor. One of: | ||||||||||||||
save_payment_methodSavePaymentMethod or null | keyed only: save the card for a customer, then charge the saved card, in one call (needs the payment_methods:write scope). The card is saved first; a declined charge keeps the saved card. Present the merchant's terms first. Fields inside save_payment_method
|
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Keyed payment finished. | PaymentOut |
| 202 | Successful Response | PaymentOut |
| 402 | The payment itself failed (type payment_error); branch on code. | ErrorResponse |
| 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 |
| 502 | The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body. | ErrorResponse |
| 503 | No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable). | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/payments" \
-H "Authorization: Bearer zp_test_..." \
-H "Idempotency-Key: <Idempotency-Key>" \
-H "Content-Type: application/json" \
-d '{
"amount_cents": <amount_cents>,
"platform_reference": <platform_reference>,
"method": <method>
}'Retrieve a payment
GET/
Returns the current state of one payment. Poll it after a terminal payment if you are not using webhooks.
Arguments: payment_id (pay_...).
Returns the payment object.
Errors: resource_missing.
Next step: branch on state and failure_code.
Parameters
| Name | Description |
|---|---|
payment_idpath, stringRequired | |
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_...). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PaymentOut |
Example
curl -X GET "https://api.zeropointapp.com/v1/payments/{payment_id}" \
-H "Authorization: Bearer zp_test_..."Cancel a terminal payment
POST/
Stops a card-present payment that is still pending or processing (the customer walked away).
Arguments: payment_id.
Returns the payment with state canceled and failure_code canceled_by_platform; emits payment.canceled.
Errors: idempotency_key_required, resource_missing, payment_state_invalid (already final, or a keyed payment), processor_unavailable (502; the merchant's processor account could not be verified), processor_not_connected (503; a live merchant with no processor connection). A 5xx releases the Idempotency-Key, so retry with the same Idempotency-Key and body. Works for a merchant whose card payments are held; a physical terminal is told to clear the sale first.
Next step: create a new payment if needed.
Parameters
| Name | Description |
|---|---|
payment_idpath, stringRequired | |
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. |
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_...). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PaymentOut |
| 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 |
| 502 | The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body. | ErrorResponse |
| 503 | No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable). | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/payments/{payment_id}/cancel" \
-H "Authorization: Bearer zp_test_..." \
-H "Idempotency-Key: <Idempotency-Key>"Get the hosted receipt URL
GET/
Returns a public HTML receipt link for a succeeded payment.
Arguments: payment_id.
Returns a receipt object with url.
Errors: resource_missing, receipt_unavailable (409) until the payment succeeded.
Next step: show or email the url to the customer.
Parameters
| Name | Description |
|---|---|
payment_idpath, stringRequired | |
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_...). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ReceiptOut |
| 409 | Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request. | ErrorResponse |
Example
curl -X GET "https://api.zeropointapp.com/v1/payments/{payment_id}/receipt" \
-H "Authorization: Bearer zp_test_..."Simulate a card outcome on a simulated terminal
POST/
Test mode only. Acts as the customer at the terminal: approve, decline, cancel, or timeout. Use it right after creating a terminal payment on a terminal whose sim_behavior is manual.
Arguments: terminal_id, payment_id, outcome.
Returns the payment in its new state; the same payment.* events fire as with a real terminal.
Errors: resource_missing, parameter_invalid (payment not on this terminal), payment_state_invalid (payment already final).
Next step: GET /v1/payments/{id}, then refund it to complete the checklist.
Parameters
| Name | Description |
|---|---|
terminal_idpath, stringRequired | |
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_...). |
Request body
| Field | Description |
|---|---|
payment_idstringRequired | |
outcomestringRequired | approve: card read and approved; decline: card read and declined; cancel: customer pressed cancel; timeout: nobody presented a card, the payment expires. One of: |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PaymentOut |
| 409 | Conflict with the current state. The code this operation's description lists says which, and whether to wait or change the request. | 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 |
Example
curl -X POST "https://api.zeropointapp.com/v1/sandbox/terminals/{terminal_id}/simulate" \
-H "Authorization: Bearer zp_test_..." \
-H "Content-Type: application/json" \
-d '{
"payment_id": <payment_id>,
"outcome": <outcome>
}'Refund a payment
POST/
Returns money to the customer after settlement, in full or in part. Use void instead for a payment that has not settled yet.
Arguments: payment_id, amount_cents (optional, partial).
Returns the refund object with state succeeded or failed (failure_code says why); emits refund.succeeded or refund.failed.
Errors: idempotency_key_required, resource_missing, payment_not_refundable (not succeeded, fully refunded, or partial refunds exist for a void), already_voided, refund_exceeds_balance, not_settled_use_void (explicit settlement rejection only; never inferred from HTTP 404), processor_currency_unsupported (403; card payments are held for this merchant, no refund is created), sandbox_processor_unconfigured, processor_unavailable (unknown outcome; retry the same key). Successful processor refunds return their own processor_transaction_id.
Next step: GET /v1/payments/{id} shows amount_refunded_cents.
Parameters
| Name | Description |
|---|---|
payment_idpath, stringRequired | |
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. |
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_...). |
Request body
| Field | Description |
|---|---|
amount_centsinteger or null | Partial amount; omit to refund the remaining balance. |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | RefundOut |
| 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 |
| 502 | The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body. | ErrorResponse |
| 503 | No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable). | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/payments/{payment_id}/refund" \
-H "Authorization: Bearer zp_test_..." \
-H "Idempotency-Key: <Idempotency-Key>" \
-H "Content-Type: application/json" \
-d '{}'Void a payment
POST/
Reverses a succeeded payment in full before it settles (same day). Use refund after settlement. The processor's settlement status is read first.
Arguments: payment_id.
Returns the refund object with state succeeded or failed (failure_code says why); kind refund if the processor executed the void as a refund (payment.needs_attention void_became_refund); emits refund.succeeded or refund.failed.
Errors: idempotency_key_required, resource_missing, payment_not_refundable (not succeeded, fully refunded, or partial refunds exist for a void; with Retry-After when the processor already shows it reversed or an earlier attempt is unresolved), already_voided, settled_use_refund (409; settled, nothing sent; refund instead, never automatic), processor_currency_unsupported (403; card payments are held for this merchant, nothing is voided), sandbox_processor_unconfigured, processor_unavailable (502; includes an unreadable settlement status, nothing sent; retry the same key).
Next step: GET /v1/payments/{id} shows amount_refunded_cents.
Parameters
| Name | Description |
|---|---|
payment_idpath, stringRequired | |
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. |
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_...). |
Request body
VoidBody or null
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | RefundOut |
| 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 |
| 502 | The payments network failed or gave no decision (processor_unavailable). The outcome may be unknown: a 5xx releases the Idempotency-Key, so retry with the same key and body. | ErrorResponse |
| 503 | No processor is available for this merchant or deployment (processor_not_connected, sandbox_processor_unconfigured, connect_unavailable). | ErrorResponse |
Example
curl -X POST "https://api.zeropointapp.com/v1/payments/{payment_id}/void" \
-H "Authorization: Bearer zp_test_..." \
-H "Idempotency-Key: <Idempotency-Key>" \
-H "Content-Type: application/json" \
-d '{}'List refunds and voids of a payment
GET/
Lists reversals for one payment, newest first.
Arguments: payment_id, limit, cursor.
Returns a list of refund objects.
Errors: resource_missing.
Next step: none.
Parameters
| Name | Description |
|---|---|
payment_idpath, stringRequired | |
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. |
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_...). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ListOut_RefundOut_ |
Example
curl -X GET "https://api.zeropointapp.com/v1/payments/{payment_id}/refunds" \
-H "Authorization: Bearer zp_test_..."Retrieve a refund
GET/
Returns one refund or void.
Arguments: refund_id (rfd_...).
Returns the refund object.
Errors: resource_missing.
Next step: none.
Parameters
| Name | Description |
|---|---|
refund_idpath, stringRequired | |
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_...). |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | RefundOut |
Example
curl -X GET "https://api.zeropointapp.com/v1/refunds/{refund_id}" \
-H "Authorization: Bearer zp_test_..."