Download OpenAPI specification:
Every response to an API request includes an X-Request-Id header. JSON errors include a safe message, a stable code, the status and the request id.
This reference contains every operation that accepts a merchant API credential or a developer's platform key. Each operation lists its method, required scope, parameters, schemas, examples, and errors. Download the OpenAPI contract or Postman collection.
customers:read and the additional permissions your integration needs. Copy the secret once and store it in your server's secret manager.ZENYTH_API_KEY from your secret manager; never embed it in browser code, mobile binaries, source control, URLs, or logs.curl 'https://api.zenythpay.com/api/v1/merchant/customers' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Accept: application/json'
A new business returns an empty collection:
{"data": [], "pagination": {"next_cursor": null, "has_more": false}}
Collections use cursor pagination. Pass limit and the returned next_cursor as cursor until has_more is false. Follow the maximum limit documented for each resource.
To use Postman, download the collection above and select a resource folder. Set base_url to the origin only (for example, https://api.zenythpay.com, without /api/v1), and partner_environment. Store partner_api_key as a local secret. The folder includes every operation accepting API credentials, with the required environment header and scope descriptions. For money-moving requests, set partner_idempotency_key explicitly and retain it for retries of that operation. Replace example IDs, dates, and payment tokens before sending individual requests. Never share an export containing credentials.
merchants:read and customers:read. Copy the secret once and keep it on your server.cm_.curl 'https://api.zenythpay.com/api/v1/platform/merchants' \
-H "Authorization: Bearer ${ZENYTH_PLATFORM_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Accept: application/json'
X-ZenythPay-Merchant.curl 'https://api.zenythpay.com/api/v1/merchant/customers' \
-H "Authorization: Bearer ${ZENYTH_PLATFORM_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'X-ZenythPay-Merchant: cm_Ab12Cd34' \
-H 'Accept: application/json'
The base origin is https://api.zenythpay.com for both environments. Every documented request path includes /api/v1. Sandbox keys start with zp_sandbox_; Production keys start with zp_production_. Always send the matching X-ZenythPay-Environment: sandbox or production header. A mismatched environment header returns 403 without executing the action. Merchant selection fields in the request return 422.
Only operations marked x-partner-scopes accept API keys. The allowed-resource list in Settings is authoritative and corresponds to this reference. For each resource choose None, Read, Write or Read & Write. Write does not grant Read. A resource that is only read, such as Transactions and receipts, offers Read only; one that is only written, such as Refunds and Voids, offers Write only. Credentials have an explicit list of scopes and never grant wildcards. Refunds and voids require their own write grants.
Explicit resource permissions cover payments (payments: charges, payment operations, billing field requirements, and the publishable and tokenization keys), transactions and receipts, voids, refunds, customers, invoices, payment links, and payouts (read only). Only the financial and customer operations below are available. Business settings and administration are managed in the dashboard.
Create, rotate, and revoke credentials only as the business owner, on the business's page at developers.zenythpay.com. Webhook configuration, testing, secret rotation, and delivery history are also managed only there. Credential secrets are shown once and stored hashed. There are at most 20 active credentials per business or location. Rotation immediately revokes the predecessor and returns a new secret once. Revocation blocks new authenticated requests; already accepted requests may finish. Last-used timestamps are updated at most once per minute.
Production credential creation requires an active Production business. Existing credentials cannot operate while that business is suspended or unavailable. Complete business approval and required service activation in the dashboard before charging. Card-present capability remains subject to processor approval. ACH requires a live merchant to accept its service fees and have activation confirmed; a sandbox merchant is chargeable by ACH with no acceptance, because the gateway attaches electronic-check processing to every test account. API permissions do not enable either rail.
A business can have several locations, each taking payments on its own. When the business owner creates a credential for such a business, they choose one location or All locations.
location_id with it returns 422.location_id when it creates a charge, a customer charge, an invoice or a Payment Link: the record is made at that location. Without it the request returns 422 "Choose the location this is for.". Reads, updates, refunds and voids of an existing record act at that record's own location. Its lists of transactions, invoices, Payment Links, payment operations and payouts, and the transaction and invoice summaries, cover every location that is not suspended, or one location when you pass location_id. Naming a suspended location returns 403.error_code location_off.merchant_id is the location it happened at. A customer's merchant_id is the business.location_id. Once it is set up for locations, a key for one location that sends location_id starts getting 422, so don't send it unless you use a key for all locations.Sandbox businesses have a single location and can't have a key for all locations, so test the location rules on your Production business before taking normal traffic.
If you build for the merchants connected to your ZenythPay developer account, call the API with a platform key instead of each merchant's own key. Create, roll and revoke platform keys in your developer account, each with the permissions you choose. A key is shown once. You can have up to 20 active keys in each environment. Sandbox keys start with zp_platform_sandbox_; Production keys start with zp_platform_production_.
X-ZenythPay-Environment only.PlatformApiKey works for any merchant connected to you. Name the merchant in X-ZenythPay-Merchant with its id: cm_ and 8 letters or digits, the same id in both environments. A Sandbox key acts for the merchant's Sandbox business, and a Production key for its live business. The call then works as that business's key for all locations would, so a charge, customer charge, invoice or Payment Link for a business with several locations sends location_id (GET /api/v1/platform/merchants lists the ids).GET /api/v1/merchant/publishable-key (use your own publishable key, see Developers: your own publishable key) and GET /api/v1/merchant/events (use your own list, GET /api/v1/platform/events).merchant_id is left out unless the business is set up for locations, when it is one of the ids GET /api/v1/platform/merchants lists. The people of the business who created, changed, sent, cancelled or took something (created_by, updated_by, sent_by, canceled_by, performed_by) are never included, and neither is developer, which shows the business your company name on a payment your key made. Know a merchant by its cm_ id.curl 'https://api.zenythpay.com/api/v1/merchant/customers' \
-H "Authorization: Bearer ${ZENYTH_PLATFORM_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'X-ZenythPay-Merchant: cm_4kT9xWq2' \
-H 'Accept: application/json'
Each call is checked in this order, and the first refusal is the answer:
| Answer | When |
|---|---|
| 401 "Unauthenticated." | The key is unknown, revoked or expired. |
| 403 "This developer account is turned off. Contact ZenythPay support." | Our team turned your developer account off. |
| 403 "This API credential does not allow this resource or action." | The key doesn't have the permission, or the call is closed to platform keys. |
| 403 "This is a Sandbox key. Send X-ZenythPay-Environment: sandbox with it." | A Sandbox key was sent with another environment, or none. |
| 403 "This is a Live key. Send X-ZenythPay-Environment: production with it." | A Live key was sent with another environment, or none. |
| 422 "Name the merchant in the X-ZenythPay-Merchant header." | A merchant's call names no merchant. |
| 404 "We can't find that merchant." | The id is unknown, or the merchant isn't connected to you. |
| 403 "Your access to this merchant is turned off." | Our team turned off your access to this merchant. |
| 403 "This merchant isn't live yet." | A Production key, for a merchant that isn't approved and live yet. |
| 403 "API access is unavailable for this business. Check its account status." | The business is suspended or unavailable. |
Limits, each answering 429 with Retry-After. Refused calls count too.
In Postman, store your platform key as the secret platform_api_key for the Developer Platform requests. For a merchant's requests, store it as partner_api_key too, turn on each request's X-ZenythPay-Merchant header and set platform_merchant to the merchant's id.
For a hosted checkout, create a Payment Link with payment_links:write and send the returned data.payment_url to the customer. Replace the example due date with an appropriate future date.
curl 'https://api.zenythpay.com/api/v1/merchant/payment-links' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Content-Type: application/json' \
-d '{"amount":"25.50","description":"Order 1001","due_date":"2027-12-31","available_payment_methods":["card"]}'
The Payment Link response appears under Payment Links. Its payment_url is returned only when the link is created or shared; save it then. Sharing a link again makes a new URL, and the earlier one stops working. The due date is the last day the link can be paid (until the end of that day, UTC); move it later with a PATCH if needed.
Each Payment Link created or shared through the API e-mails the business owner a copy of the link. In a live business these e-mails count against two limits: 60 an hour for the business owner, shared with all of the owner's businesses and their invoice e-mails from the dashboard, and 300 a day for each business location. Over either limit, creating or sharing a link returns 429. Sandbox businesses aren't counted, so plan for these limits before going live if you create a link for every order.
An invoice is paid from the e-mail ZenythPay sends to its recipient; the API never returns an invoice's payment URL, and sending an invoice again replaces its link. Use a Payment Link when your integration needs the URL itself. In Sandbox, invoices can be e-mailed only to the business's own team.
Customers belong to the business, across its locations; use customers:write to create them and customers:read to query them. To save a customer's card and charge it later, see Saved cards below. Payment methods saved before Saved cards (GET /api/v1/merchant/customers/{customer}/payment-methods) require customers:read; their card and account numbers are masked, and they include the saved billing name, address and phone. Deleting a customer deletes the customer, their saved payment methods, and every card saved for them through the API (removed ones included); each card that may still be stored at the payment gateway is queued for deletion there. Their payments and refunds are kept and no longer link to a customer; their receipts are kept as they were issued.
For a custom checkout, read the merchant's billing field requirements, tokenize payment details through the supported payment frontend, and send the one-time token to POST /api/v1/merchant/charges with payments:write. Use the card, wallet, or ACH example under that operation and provide the required billing fields. Payment fields (below) make card tokens; there is no way yet to make ACH or wallet tokens on your own page, so take ACH and wallet payments through Payment Links or invoices. ZenythPay's API does not accept raw card numbers, CVVs, or bank-account payment credentials. The public tokenization key must not be substituted for a server API credential.
New card integrations should use payment fields (see Payment fields below), which show ZenythPay card inputs inside your own checkout page.
Use payments:read to inspect payment operations and transactions:read for transaction details and receipts. A checkout redirect alone is not proof of payment. Confirm the recorded final status through the API or a verified webhook followed by a resource fetch. Before fulfilling an order or starting another charge, settle any pending or uncertain payment: check its status with GET /api/v1/merchant/payment-operations, using term with your order_id or status=pending to find it. Send an order_id with every charge so you can find it later. Refunds and voids follow the rules described under those operations.
A successful charge, refund or void comes with a receipt, and so does the transaction when you read it. Its view_url opens the receipt as a PDF. The link doesn't expire and works for anyone who has it, so share it only with the payer.
Payment fields put ZenythPay card inputs (card number, expiration date and security code) inside your own checkout page, or bank account inputs for ACH payments (see Bank account fields below). The card or bank details are typed into a ZenythPay frame, so they never reach your page or your server. Your page gets back a one-time payment token, and your server charges it with POST /api/v1/merchant/charges.
The fields use two keys from the same business: one for your page, one for your server.
| Key | Starts with | Where it goes | What it does |
|---|---|---|---|
| Publishable key | zp_pk_sandbox_ or zp_pk_production_ |
Your web page, in Zenyth(...) |
Shows the payment fields and makes one-time payment tokens. Nothing else, so it is safe in a web page. |
| API credential | zp_sandbox_ or zp_production_ |
Your server only | Reads the publishable key (payments:read), charges the token (payments:write), and anything else its permissions allow. Create it on your business's page at developers.zenythpay.com, as the business owner. |
Use both from the same business: a token can only be charged by that business.
zp_pk_sandbox_ (Sandbox) or zp_pk_production_ (Production). It can only show the payment fields, so it is safe in a web page. Read it from your server with GET /api/v1/merchant/publishable-key, which needs payments:read. The first read creates it, and later reads return the same key until the merchant replaces it in the dashboard. A replaced key stops working at once for fields that load after that: they show "Card payments aren't available right now". Fields already open on a page keep working until it reloads. So read the key on your server and cache it for a few minutes, instead of copying it into your page code. Never put your API credential in a web page.https://pay.zenythpay.com to your existing script-src and frame-src directives (or to default-src, if that is the only directive you set). Nothing else is needed for the fields. Keep your own page code in a script file, as in the example below, so it needs no unsafe-inline.zp_pk_sandbox_ key from your Sandbox business. The fields also load on http://localhost and http://127.0.0.1, for Sandbox keys only. Production keys need an https page: on any other page the fields don't load and createToken answers network.<div id="card"></div>
<button id="pay" type="button">Pay</button>
<p id="card-error" role="alert"></p>
<script src="https://pay.zenythpay.com/js/v1/zenyth.js"></script>
<script src="/checkout.js"></script>
/checkout.js, served from your own site:
const zp = Zenyth('zp_pk_sandbox_00000000000000000000000000000000');
const card = zp.fields('card', {
appearance: { theme: 'light', variables: { colorText: '#01182B', borderRadius: '6px' } },
});
card.mount('#card');
card.on('change', ({ complete, error }) => {
document.getElementById('card-error').textContent = error ? error.message : '';
});
const pay = document.getElementById('pay');
pay.addEventListener('click', async () => {
pay.disabled = true;
const result = await zp.createToken(card);
if (result.error) {
document.getElementById('card-error').textContent = result.error.message;
pay.disabled = false;
return;
}
// Send the whole result (payment_type, payment_token and card) to your server.
// Card details never pass through your page.
const response = await fetch('/checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(result),
});
if (!response.ok) {
document.getElementById('card-error').textContent = 'The payment did not go through. Please try again.';
pay.disabled = false;
}
});
Disable your Pay button while a payment is in progress, so a second click doesn't start a second payment.
Mount the fields as soon as your checkout page opens, not when the payer reaches the payment step. They take a moment to load, often one to three seconds, and that time then passes while the payer fills in the rest of your form. Until they are ready, the fields keep their place on the page and show their placeholders. Listen for ready if you need to know when they can take input. ready never fires when the fields can't load; createToken then answers unavailable or network.
Zenyth(publishableKey) returns a client. It throws a TypeError for anything that is not a publishable key, including an API credential. Load zenyth.js with its own script tag, as above: bundled into your code, it throws an Error.
client.fields('card', { appearance }) returns a group with these methods; client.fields('ach', { appearance }) returns bank account fields with the same methods. Any other name throws a TypeError.
| Method | What it does |
|---|---|
mount(selectorOrElement) |
Shows the fields inside that element. Calling it again while mounted does nothing. Throws an Error if the element doesn't exist. If your page removes the element, call unmount() and then mount() again. |
unmount() |
Removes the fields. A token request still waiting answers incomplete. |
clear() |
Empties the three inputs, and fires change. It does nothing before ready. |
on(event, handler) |
Listens for an event. Names other than ready and change are ignored. |
off(event, handler) |
Stops listening. |
| Event | When | Handler receives |
|---|---|---|
ready |
The fields are showing and can take input. | Nothing. |
change |
The details are checked. | { complete, error }. complete is true when all three inputs are filled in correctly. error is null or { field, message } for the first field that needs fixing, where field is number, expiry or cvv (bank account fields: name, account or routing). |
Pass appearance to fields(). All of it is optional, and any value that does not match the rules below is ignored.
| Key | Allowed values |
|---|---|
theme |
light (default) or dark. |
variables.colorText, colorBackground, colorBorder, colorPlaceholder, colorDanger |
A hex color: #rgb or #rrggbb. |
variables.fontFamily |
The name of a Google Fonts family: letters, digits and spaces, up to 40 characters. Its regular weight is loaded inside the fields. By default the fields use the device's own font and load none. |
variables.fontSize, variables.borderRadius |
A size in whole pixels from 0px to 32px, such as 16px. |
client.createToken(group) never rejects. It resolves with one of two shapes.
{
"payment_token": "…",
"payment_type": "card",
"card": { "type": "visa", "first6": "411111", "last4": "1111", "exp_month": 12, "exp_year": 2030 }
}
{ "error": { "code": "invalid_number", "message": "Check the card number." } }
error.code |
error.message |
When it happens |
|---|---|---|
incomplete |
Enter the card details. | An input is empty, or the fields are not ready yet, or they were unmounted. |
invalid_number |
Check the card number. | The card number is wrong. |
invalid_expiry |
Check the expiration date. | The expiration date is wrong. |
invalid_cvv |
Check the security code. | The security code is wrong. |
timeout |
The card details couldn't be checked. Try again. | Checking the card took too long, or createToken was called again with changed card details while a request was still running. |
unavailable |
Card payments aren't available right now. | The publishable key is unknown, replaced or for the other environment, or the business can't take card payments yet. |
network |
The payment form couldn't load. Check your connection and try again. | The fields didn't load within 15 seconds: often your Content Security Policy, a Production key on a page that isn't https, or the payer's connection. |
After a timeout, the fields may keep answering timeout for up to a minute. Ask the payer to wait a moment and try again. card.type is the card brand in lower case, such as visa, or card when the brand is not known.
On your server, send the result to POST /api/v1/merchant/charges with payments:write. Pass payment_type, payment_token and card exactly as you received them, and add the amount and the payer's billing details. Some businesses need more billing details than the name, country and postal code below: read them once from GET /api/v1/merchant/billing-field-requirements.
curl 'https://api.zenythpay.com/api/v1/merchant/charges' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-1001-payment-1' \
-d '{
"amount": "10.00",
"payment_type": "card",
"payment_token": "00000000-000000-000000-000000000000",
"billing_details": { "name": "Grace Hopper", "country": "US", "postal_code": "94107" },
"card": { "type": "visa", "first6": "411111", "last4": "1111", "exp_month": 12, "exp_year": 2030 }
}'
Charge from your server, never from the browser. A token works once and expires 24 hours after it is made, so create it when the payer submits and charge straight away.
Idempotency-Key and the same body, including the same payment_token. Then check the payment's status through the API or a verified webhook before you do anything else. A different body with the same key returns 409. The same body can also return 409 while the first attempt is still being settled ("Payment operation is already processing.") or when it could not be settled automatically ("…requires reconciliation."): don't start a new payment, wait and check the payment's status.createToken and a new Idempotency-Key. Sending the declined request again with its key answers 402 again, with Idempotency-Replayed: true and data.status declined: always read data.status.Bank account fields take ACH payments the same way: the payer types the name on the account, the account number and the routing number into a ZenythPay frame, and your server charges the token. Ask for the account type and the account holder type in your own page, as they are not part of the fields.
const bank = zp.fields('ach', { appearance });
bank.mount('#bank');
const result = await zp.createToken(bank);
{
"payment_token": "…",
"payment_type": "ach",
"account_name": "Grace Hopper",
"ach": { "last4": null, "routing_number_last4": "0018" }
}
ach.last4 and ach.routing_number_last4 are the last 4 digits of the account number and the routing number when the bank details come back with them, and null when they don't; the account number's often don't. account_name is left out when no name came back. The methods, events and appearance are those of the card fields. Their answers use their own words:
error.code |
error.message |
When it happens |
|---|---|---|
incomplete |
Enter the bank account details. | An input is empty, or the fields are not ready yet, or they were unmounted. |
invalid_name |
Check the name on the account. | The name on the account is shorter than 3 characters or longer than 150. |
invalid_account_number |
Check the account number. | The account number is wrong, or isn't 4 to 17 digits. |
invalid_routing_number |
Check the routing number. | The routing number is wrong, or isn't 9 digits. |
timeout |
The bank account details couldn't be checked. Try again. | As for card fields. |
unavailable |
Bank payments aren't available right now. | As for card fields, or the business can't take bank payments: it hasn't turned them on in the dashboard. |
network |
The payment form couldn't load. Check your connection and try again. | As for card fields. |
On your server, send payment_type, payment_token and account_name as you received them, and ach with the account type (checking or savings) and the account holder type (personal or business) added:
curl 'https://api.zenythpay.com/api/v1/merchant/charges' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-1002-payment-1' \
-d '{
"amount": "10.00",
"payment_type": "ach",
"payment_token": "00000000-000000-000000-000000000000",
"account_name": "Grace Hopper",
"ach": { "account_type": "checking", "account_holder_type": "personal", "last4": null, "routing_number_last4": "0018" }
}'
The rules for timeouts, declines and the Idempotency-Key above apply to bank payments too.
With a zp_pk_sandbox_ key, use the card 4111 1111 1111 1111 with any future expiration date and any 3-digit security code. For bank account fields, use the name Grace Hopper (any name of at least 3 characters), the routing number 490000018 and the account number 24413815. The same card and amount charged twice within 20 minutes can be refused as a duplicate (422 duplicate_payment), so vary the amount between tests.
If you build checkouts for the merchants connected to your ZenythPay developer account, use your own publishable key and name the merchant on each page:
const zp = Zenyth('zp_pk_platform_sandbox_00000000000000000000000000000000', { merchant: 'cm_4kT9xWq2' });
Your publishable keys are in your developer account: one starting zp_pk_platform_sandbox_ and, once your email is verified, your company profile is complete and your login has a security method, one starting zp_pk_platform_production_. Your Sandbox key also shows the fields on http://localhost and http://127.0.0.1, so you can test on your own machine; your Live key needs an https page. merchant is the connected merchant's id (cm_ and 8 letters or digits), the same id your server sends in X-ZenythPay-Merchant. Without it, Zenyth() throws a TypeError: "Name the merchant: Zenyth(key, { merchant: 'cm_…' })."
The fields show "Card payments aren't available right now." (bank account fields: "Bank payments aren't available right now.") when your key was replaced, the merchant isn't connected to you, your access to it or your developer account is turned off, or the merchant can't take card payments yet in that environment (a Live merchant until it is live). Before createToken sends complete card details, the fields check your access again, so a page that is already open stops too: once access is refused, createToken answers unavailable until the page reloads. Charge the token from your server with your platform API key and the same merchant in X-ZenythPay-Merchant.
Save a customer's card, with their agreement, while they pay. Then charge it again later: when they pay again, or, if they agreed to it, without them. A saved card belongs to one customer of the business, and you name it by its id, which starts with sc_. The card number never reaches your server: you save the card from the one-time token that payment fields give you.
| Step | Call | Permission |
|---|---|---|
| 1. Check that Saved cards is on | GET /api/v1/merchant/saved-cards |
customers:read |
| 2. Save a card while the customer pays | POST /api/v1/merchant/customers/{customer}/charges with save_card |
payments:write |
| Or save a card without a charge | POST /api/v1/merchant/customers/{customer}/saved-cards |
customers:write and payments:write |
| 3. List or read the customer's cards | GET /api/v1/merchant/customers/{customer}/saved-cards and …/saved-cards/{card} |
customers:read |
| 4. Charge a saved card | POST /api/v1/merchant/customers/{customer}/charges with source saved_card |
payments:write |
| 5. Remove a card | DELETE /api/v1/merchant/customers/{customer}/saved-cards/{card} |
customers:write |
Only a card typed into the card fields can be saved, on a charge of a customer or without a charge. Apple Pay, Google Pay and bank accounts can't be saved, and POST /api/v1/merchant/charges, which names no customer, answers 422 to save_card.
The examples below use a business's own API credential. With a platform key, also send X-ZenythPay-Merchant with the merchant's cm_ id, as on every call for a merchant (see Platform keys).
Each business turns Saved cards on itself and pays for it. You can't turn it on for a business; you can read whether it is on, and give its owner the link to turn it on.
curl 'https://api.zenythpay.com/api/v1/merchant/saved-cards' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: production' \
-H 'Accept: application/json'
{
"data": {
"state": "off",
"available": false,
"paused_reason": null,
"activation_url": "https://app.zenythpay.com/settings/service-agreement?service=vault&business=123"
}
}
available is the one thing to check: when it is true, cards can be saved and charged now. state says why it is not:
state |
What it means | What to do |
|---|---|---|
unavailable |
Saved cards isn't offered to this business. | Don't offer to save cards. |
off |
The business hasn't turned it on. | Give the business owner activation_url. |
pending |
The owner accepted, and it is being switched on. | Read the status again later. |
on |
It is on. | Save and charge cards while available is true. |
turning_off |
The owner turned it off. | Stop saving and charging cards. |
activation_url is there only while state is off. Use it exactly as you get it: how it names the business depends on the key, and a platform key's link can name it by the merchant's cm_ id instead of the business shown here. The owner, or an admin of the business, opens it, signs in to ZenythPay, reads the fees and accepts them. The link holds no secret, so you can show it in your app or email it to the owner.
The business pays the fees, not you: $8.00 a month, and $0.08 each time a card is added, updated or removed. There is no set-up fee. Sending billing_details with a charge of a saved card may count as an update, so send them only when they changed (see Charge a saved card).
paused_reason is three_ds_required, and available is false, when the business turned Saved cards on but requires 3-D Secure, which saved cards don't support yet. A business that requires 3-D Secure and never turned Saved cards on reads unavailable. paused_reason is null in every other case. While Saved cards is paused for every business, a business that turned it on keeps its state, such as on, with available false and paused_reason null: rely on available, not on state.
While available is false, the cards already saved stay saved: they are still listed, each with available false, and you can still remove them. Saving or charging a card answers 409 saved_cards_unavailable. When the business turns Saved cards on again, its saved cards can be charged again.
A location answers its business's status: Saved cards is on or off for the whole business.
A card is saved only with the customer's agreement, given in your checkout before they pay. Show them the words they agree to, and let them choose to save the card. Send those exact words with the save, as consent.text. We keep them for disputes and never return them. ZenythPay doesn't write these words for you. They should say that the card will be saved, when and why the business may charge it, how the amount is set, and how the customer can cancel. For a plan, they should also say how often it is charged, or how many payments there are.
What the customer agrees to is consent.type. It is fixed when the card is saved:
consent.type |
Who may charge the card |
|---|---|
customer_present |
Only the customer, when they pay with it themselves. A charge by the business answers 422 consent_not_given. |
business_unscheduled |
The customer when they pay, and the business without the customer, when needed. For example, an invoice paid when it falls due. |
business_recurring |
The customer when they pay, and the business without the customer, on a fixed schedule. For example, a monthly subscription. |
business_installment |
The customer when they pay, and the business without the customer, in a set number of payments for one purchase. Each of these payments carries installment_number (see below). |
For business_recurring and business_installment, the payment that saves the card and the business's later charges are all sent as payments of the plan. So save a card under one of them only on a payment that belongs to the subscription or the plan, never on a one-off order, and use them only for what the customer agreed to. ZenythPay runs no schedule: your server decides when each payment is due and charges the card each time.
A card's consent never changes. To change it, remove the card, and let the customer save it again under the new words on their next payment.
An example of words for business_unscheduled. It is only an example; write your own for the business:
Save this card for future payments. Example Co may charge it for orders you place and for invoices when they fall due, for the amount of each order or invoice. You can remove the card at any time in your account settings.
Charge the customer as usual, with the token from the card fields (see Get a token and charge it), and add save_card:
curl 'https://api.zenythpay.com/api/v1/merchant/customers/123/charges' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: order-1003-payment-1' \
-d '{
"amount": "10.00",
"source": "new_card",
"payment_token": "00000000-000000-000000-000000000000",
"billing_details": { "name": "Grace Hopper", "country": "US", "postal_code": "94107" },
"card": { "type": "visa", "first6": "411111", "last4": "1111", "exp_month": 12, "exp_year": 2030 },
"order_id": "1003",
"save_card": {
"consent": {
"type": "business_unscheduled",
"text": "Save this card for future payments. Example Co may charge it for orders you place and for invoices when they fall due, for the amount of each order or invoice. You can remove the card at any time in your account settings.",
"accepted_at": "2026-11-25T10:00:00Z",
"ip_address": "203.0.113.20"
}
}
}'
consent.type and consent.text (up to 2,000 characters) are required.business_installment, the payment that saves the card is a payment of the plan: send its number in the plan as installment_number at the top level of the body, next to amount. It is a JSON number from 1 to 99, usually 1, not a string: "1", 0 or 100 answer 422 with errors.installment_number, and so does an installment save without it. Send installment_number with no other kind of save: it answers 422 with errors.installment_number "installment_number is sent only with an installment sale."consent.accepted_at is when the customer agreed. Without it, it is the time of your request. A time more than 5 minutes ahead answers 422.consent.ip_address is the customer's IP address when they agreed, if you have it. We keep it encrypted and never return it.The answer is the charge, as for any charge, with saved_card added:
{
"data": {
"status": "succeeded",
"saved_card": {
"id": "sc_7Hq2LmX9",
"customer_id": 123,
"status": "saved",
"available": true,
"brand": "visa",
"first6": "411111",
"last4": "1111",
"exp_month": 12,
"exp_year": 2030,
"billing_details": { "name": "Grace Hopper", "country": "US", "postal_code": "94107" },
"consent": { "type": "business_unscheduled", "accepted_at": "2026-11-25T10:00:00+00:00" },
"saved_at": "2026-11-25T10:00:02+00:00",
"last_used_at": null
}
}
}
Read the charge's own data.status as for any charge. Then read saved_card:
status saved: the card is saved. Keep its id with the customer.null: nothing was saved, usually because the charge was declined (402). The customer can try again with another payment.status saving: we couldn't confirm the card was saved yet, so it can't be charged. This can come with an approved or a declined charge. Our checks settle it by themselves, usually within an hour or two, as saved or failed, and send saved_card.created or saved_card.failed (see Configure and verify webhooks); or read the card again. Meanwhile, saving the same card again for this customer answers 409 card_already_saved and names this card. If a card is still saving after a day, our team is checking it: remove it, or contact ZenythPay support with its id.If you get no answer, or a 5xx, send the same request again with the same Idempotency-Key and body, as for any charge (see Errors, idempotency, and rate limits). A replay answers saved_card as it stands now.
These refusals come before anything is charged or saved. Each of them, except a 422 with errors, records the key with that body; so does a 404 "Customer not found." when the customer is deleted during the request. For these, the same request, with the same Idempotency-Key and exactly the same body, runs again, for example once the business has turned Saved cards on. If you change anything in the body (another consent type, no save_card, a saved card instead), use a new Idempotency-Key: the old key with a changed body answers 409 "Idempotency-Key was already used with a different request payload." A 422 with errors comes before the key is recorded, so correct the body and send it with the same key.
| Answer | message |
What to do |
|---|---|---|
409 saved_cards_unavailable |
Saved cards is not available for this business. | Read the status (see Turn it on). Charge without save_card meanwhile. |
409 card_already_saved |
This customer already has this card saved. | The answer's saved_card_id and consent_type name the card already saved. Charge that card, or remove it first to save it under other words. A card is the same when its brand, first 6 and last 4 digits and expiry are the same. |
409 saved_cards_limit_reached |
This customer already has 10 saved cards. Remove one to save another. | Remove a card the customer no longer uses. Cards still saving count toward the 10. |
422 with errors.save_card |
Only a new typed card can be saved. | Save only a card typed into the card fields, with source new_card. |
Other answers are those of every customer charge, listed under that operation in the reference: for example 404 "Customer not found.", 429 with Retry-After, and 502.
{
"message": "This customer already has this card saved.",
"error_code": "card_already_saved",
"saved_card_id": "sc_7Hq2LmX9",
"consent_type": "business_unscheduled",
"error": {
"code": "conflict",
"message": "This customer already has this card saved.",
"status": 409,
"request_id": "00000000-0000-0000-0000-000000000000"
}
}
When the customer adds a card to their account before they buy anything, save it without charging it. The card is checked with the card network for $0 and saved in the same request, under the customer's agreement (see Ask for the customer's agreement). It needs both customers:write and payments:write, and an Idempotency-Key.
curl 'https://api.zenythpay.com/api/v1/merchant/customers/123/saved-cards' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Idempotency-Key: 6f3e2a10-card-add-123' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"payment_token": "00000000-000000-000000-000000000000",
"card": { "type": "visa", "first6": "411111", "last4": "1111", "exp_month": 12, "exp_year": 2030 },
"billing_details": { "name": "Grace Hopper", "country": "US", "postal_code": "94107" },
"consent": {
"type": "business_unscheduled",
"text": "Save this card for future payments. Example Co may charge it for orders you place and for invoices when they fall due, for the amount of each order or invoice. You can remove the card at any time in your account settings."
}
}'
Send payment_token and card exactly as the card fields gave them. There is no amount, and installment_number is refused: a check is not a payment of a plan.
| Answer | What it means | What to do |
|---|---|---|
201 with the card, status saved |
The card is saved. | Keep its id with the customer. |
202 with the card, status saving |
The card network's answer wasn't clear. | As for a save on a charge (above): it settles by itself as saved or failed. |
402 card_declined |
The customer's bank declined the card. Nothing was saved. | Ask them to contact their bank or use another card. |
422 card_not_verified |
The card couldn't be verified. Nothing was saved. | Ask the customer to check it or use another. |
| 409 | Refused before anything was sent: saved_cards_unavailable, card_already_saved, saved_cards_limit_reached as for a save on a charge, or location_off / app_payments_off when the location can't take payments. |
As in the table above; for a location, try again once it can take payments. |
429 with Retry-After |
Too many attempts (below). Nothing was written or sent. | Wait, then send the same request again with the same Idempotency-Key. |
| 502 | The card couldn't be saved, and nothing was kept. | Try again in a minute. |
The same Idempotency-Key and body answer the card as it is now, with Idempotency-Replayed: true; another body with that key answers 409. After a 402, 422 or 502 nothing was kept, so the same key sends a new check.
Every check counts toward the same per-minute attempt budget as customer charges, and each declined check counts toward the same failed-attempt limit, counted for the business per location and IP address. A saved card doesn't reset that count; declines expire on their own. So many checks, or several declines, in a minute can briefly refuse charges too.
curl 'https://api.zenythpay.com/api/v1/merchant/customers/123/saved-cards' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Accept: application/json'
The list is newest first, up to 20 cards a page (limit 1 to 20), with cursor as in every list. It leaves out removed and failed cards; read those by their id, with GET /api/v1/merchant/customers/{customer}/saved-cards/{card}. Another customer's card, or an id that doesn't exist, answers 404 "Saved card not found."; an id that isn't sc_ and 8 letters or digits also answers 404.
A card has the fields in the example above:
status: saving (not confirmed yet), saved, failed (it couldn't be saved) or removed.available: whether you can charge it now. Only a saved card, while the business has Saved cards on.brand, first6, last4, exp_month and exp_year describe the card. You never get the card number or a token.billing_details: the name, country and postal code saved with the card. null once the card is removed.consent: its type and accepted_at. The words are never returned.saved_at, and last_used_at: the last time it was used for a charge, or null.Name the card, and say who starts the payment:
curl 'https://api.zenythpay.com/api/v1/merchant/customers/123/charges' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: invoice-2041-payment-1' \
-d '{
"amount": "25.00",
"source": "saved_card",
"saved_card_id": "sc_7Hq2LmX9",
"initiated_by": "business",
"order_id": "invoice-2041"
}'
initiated_by is required: customer when the customer is there and starts the payment, business when the business charges without them. Use business only on a card saved under business_unscheduled, business_recurring or business_installment.business charge of a business_installment card needs installment_number: the number of this payment in the plan, a JSON number from 1 to 99, for example 3 for the third of six. A string such as "3", 0 or 100 answers 422 with errors.installment_number. Send it with no other saved-card charge, including the customer's own charge of that card.billing_details is optional. Without it, only the card is sent with the charge. A field you send is used for this charge, with the card's other saved details, and the card's details as we answer them don't change. Sending them may count as an update of the card, which the business pays $0.08 for, so send them only when they changed.Idempotency-Key rules and rate limits. A decline doesn't change the card: it stays saved. The transaction's source is payment_method.location_id, as on every customer charge.| Answer | message |
What to do |
|---|---|---|
| 404 | Saved card not found. | The card isn't this customer's, or doesn't exist. |
409 saved_card_unavailable |
This saved card can't be charged. | The card is saving, failed or removed. Read it; ask the customer for another card. |
409 saved_cards_unavailable |
Saved cards is not available for this business. | Read the status (see Turn it on). |
422 consent_not_given |
This card was saved for charges with the customer present only. | Charge it only with initiated_by customer, when the customer pays. |
422 installment_number_required |
Send installment_number with a business charge of an installment card. | Add the payment's number in the plan. |
422 installment_number_not_allowed |
installment_number is sent only with a business charge of an installment card. | Leave installment_number out. |
422 with errors.saved_card_id or errors.initiated_by |
The field's message says what is wrong. | The field is missing, or saved_card_id isn't sc_ and 8 letters or digits. |
Nothing is charged after these answers. As after a refused save, every refusal in this table except a 422 with errors records the key, the 404 "Saved card not found." included: to change the body (another card id, initiated_by or installment_number), use a new Idempotency-Key. A 422 with errors can be corrected and sent with the same key. Other answers are those of every customer charge.
curl -X DELETE 'https://api.zenythpay.com/api/v1/merchant/customers/123/saved-cards/sc_7Hq2LmX9' \
-H "Authorization: Bearer ${ZENYTH_API_KEY}" \
-H 'X-ZenythPay-Environment: sandbox' \
-H 'Accept: application/json'
The answer is the card, with status removed and billing_details null. No new charge can start with it from that moment; a charge of it that had already started may still go through. Its stored copy is queued for deletion. Removing it again answers the same. You can remove cards while the business has Saved cards off. A removed card is never usable again: to use the same card, the customer saves it again on a payment, and it gets a new id.
Remove a card when the customer asks you to. Deleting a customer deletes all of their saved cards (see Payments, checkout, and customers).
on, or unavailable while Saved cards isn't offered in Sandbox. It never reads off, so you only get activation_url from a Production business that hasn't turned Saved cards on.business_unscheduled, then charge it with initiated_by business and with customer.card_already_saved), charge a customer_present card with initiated_by business (422 consent_not_given), and charge a business_installment card with initiated_by business and no installment_number (422 installment_number_required).duplicate_payment), and the card isn't saved then. Sending it again with the same Idempotency-Key answers the same refusal, so vary the amount and use a new key for each test.A payout is one transfer the processor sent to the merchant's bank account. Read them with payouts:read: GET /api/v1/merchant/payouts lists them, newest sent first, and GET /api/v1/merchant/payouts/{id} returns one with the card payments it includes. Nothing creates a payout through the API: the processor sends them.
sent_on is the day the transfer was sent and arrives_by the day it usually reaches the bank account by. Neither confirms that the bank received it.withdrawal is money taken back from the bank account. Its amount is negative and its arrives_by is null.payment_count is how many card payments the processor says the payout includes, or null when it does not say. payments_status says whether they can be listed: complete (all of them are in payments), pending (they are still being matched, and payments is empty for now) or unavailable (they can't be shown for this payout). A list never includes payments; get one payout to read them.breakdown is the lines that add up to the amount, such as sales, refunds and fees. It is null when it can't be shown, so treat a missing breakdown as normal.payout.sent and payout.withdrawn events carry a reference to the payout and no amounts. Fetch the payout for the figures.location_id.payout.sent.Every response to an API request includes X-Request-Id. To trace a request end to end, send your own X-Request-Id (8 to 128 letters, digits, ., _, : or -); we use it and return it. Errors include a safe public message and a standardized error with code, message, status, and request_id. Validation responses additionally contain errors by field. Preserve the public message when presenting an error to the merchant. Never treat an HTTP success as a payment approval without checking the documented payment status.
error.code names the kind of answer, from its HTTP status: bad_request, authentication_required, payment_declined, forbidden, not_found, method_not_allowed, conflict, gone, validation_failed, idempotency_key_required, rate_limit_exceeded, service_unavailable, or internal_error for anything else. Some refusals also carry a top-level error_code with the exact reason, such as duplicate_payment or location_off: branch on error_code when it is present.
| HTTP status | Integration action |
|---|---|
| 401 | Check the API secret; revoked or malformed keys are rejected. |
| 402 | The payment was declined. The response's data holds the declined transaction. A new attempt needs a new token and a new Idempotency-Key. |
| 403 | Check resource permissions, environment header, and business availability. |
| 404 | Check the merchant-owned resource ID. |
| 409 | Resolve the documented state or idempotency conflict before retrying. |
| 422 | Correct the fields in errors; do not retry unchanged input. A refusal without errors, such as duplicate_payment, payment_not_charged (our checks found no sale for a payment whose answer was lost: nothing was charged) or payment_refunded (our team found the payment refunded in full at the gateway), says why in message and error_code. |
| 428 | Send the required Idempotency-Key header. |
| 429 | Honor Retry-After, then retry with backoff and jitter. |
| 5xx or transport failure | The outcome may be uncertain. Reuse the original idempotency key where supported and query status before creating another operation. |
Money-moving endpoints marked with the required Idempotency-Key header require a stable, unique key for each logical operation: up to 128 printable characters. Retrying the same operation uses the same key and body, and answers with the recorded result. A different body with the same key returns 409. The same body returns 409 while the first attempt is still being settled ("Payment operation is already processing.") or after it could not be settled automatically ("…requires reconciliation."): wait, then check the payment's status; don't start a new one. A key is never reused for another payment and does not expire. Do not reuse a key for a new order.
A replayed charge answers with the charge's recorded outcome as it stands now and Idempotency-Replayed: true: 200 when it is approved, and 402 with the decline message when it is declined. A later correction from the gateway can change that outcome, so a replay is not always the first answer again. A replayed refund or void answers with its original status (201 or 402) and Idempotency-Replayed: true. Customer, invoice, and Payment Link creation do not implement a generic idempotency contract; do not blindly repeat a timed-out creation.
Limits, each answering 429 with Retry-After:
All API-key responses use Cache-Control: no-store, private.
Dates in the API are calendar days in UTC: date filters, daily summaries and due dates.
A business can have up to 5 webhook endpoints, and a developer account up to 5 in each environment; an endpoint that is off still counts. Each has its own URL, events and signing secret, and can be turned off and on again. Set a business's endpoints on its page at developers.zenythpay.com, and yours as a developer in your developer account: enter a public HTTPS URL on port 443, choose events, and save. Copy the signing secret once. Secrets are encrypted at rest and masked afterward. URLs cannot contain user credentials or fragments, must be at most 2048 characters, and must use a domain name, not an IP address; names such as .local, .test or .internal are refused. Every delivery checks all DNS answers, pins an approved public IP, verifies TLS, and refuses redirects and private or reserved network targets. Use a publicly reachable HTTPS tunnel for local development.
A business's endpoints serve all of its locations: set them on the business. Each event's data.location_id names the location it happened at. With a key for one location, fetching another location's transaction, invoice, Payment Link, payment operation or payout returns 404.
A business's events contain the event ID, type, occurrence time, the business's ID (merchant_id), environment, and resource reference. They do not include customer, payment-card, or bank details. For resources exposed by this reference, fetch the current resource using the appropriate API scope. A deleted resource may return 404; use the verified deletion event to remove its local reference.
{
"id": "bf674cef-5ea5-49a4-8061-84668e5499cc",
"type": "customer.created",
"api_version": "v1",
"created_at": "2026-09-06T12:00:00+00:00",
"merchant_id": "42",
"environment": "sandbox",
"data": {"resource": "customers", "id": "123", "location_id": "42"}
}
| Event | data.resource |
Fetch with | Permission |
|---|---|---|---|
payment.succeeded, payment.failed |
payment_operations (or transactions when the payment has no operation) |
GET /api/v1/merchant/payment-operations/{id} (or /transactions/{id}) |
payments:read (or transactions:read) |
transaction.refunded, transaction.voided |
transactions |
GET /api/v1/merchant/transactions/{id} |
transactions:read |
invoice.created, invoice.updated, invoice.deleted, invoice.sent, invoice.canceled, invoice.paid |
invoices |
GET /api/v1/merchant/invoices/{id} |
invoices:read |
payment_link.created, payment_link.shared, payment_link.updated, payment_link.canceled, payment_link.paid |
payment_links |
GET /api/v1/merchant/payment-links/{id} |
payment_links:read |
customer.created, customer.updated, customer.deleted |
customers |
GET /api/v1/merchant/customers/{id} |
customers:read |
saved_card.created, saved_card.removed, saved_card.failed |
saved_cards (the card's sc_ id), with data.customer_id |
GET /api/v1/merchant/customers/{customer_id}/saved-cards/{id} |
customers:read |
saved_cards.state_changed |
merchants (to a developer, the merchant's cm_ id) |
GET /api/v1/merchant/saved-cards |
customers:read |
payout.sent, payout.withdrawn |
payouts |
GET /api/v1/merchant/payouts/{id} |
payouts:read |
application.created, application.sent, application.joined, application.submitted, application.more_info_needed, application.approved, application.declined (developers only) |
applications |
GET /api/v1/platform/applications/{id} |
applications:read |
merchant.live, connection.revoked (developers only) |
merchants |
GET /api/v1/platform/merchants/{id} |
merchants:read |
For hosted checkout, listen for payment_link.paid or invoice.paid, then fetch the link or invoice.
saved_card.created is sent when a card becomes saved: with the charge that saved it, or later when a lost answer from
the card network is settled. saved_card.failed is sent when a card that was saving ends failed that way.
saved_card.removed is sent when a saved or saving card is removed: by you, or with its customer, and when a save
or a check is declined or refused and its saving card is dropped (you may have listed it while the sale or the check
was out). When a business
is deleted, its cards go with it and no event is sent.
saved_cards.state_changed is sent when the business's Saved cards state or available changes, as that endpoint
shows them; we check every five minutes, so it can arrive up to about five minutes after the change.
payout.requested is retired: payouts are sent automatically, so nothing requests one. An endpoint saved with it keeps it and can still be saved, but the event is never sent and can't be chosen for a new endpoint.
A developer's endpoints receive the events above for the merchants connected to it, in the environment of the business the event happened at, and the platform's own events: application.created when an application is started; application.sent when its owner is first sent a link; application.joined when the owner joins and the merchant is connected to you; application.submitted, application.more_info_needed, application.approved and application.declined as the application moves through our review; merchant.live when the merchant can take payments in that environment; and connection.revoked when our team turns off your access to the merchant. A developer's event names the connected merchant as merchant (its cm_ id) and the application as application (its app_ id, or null), never the business's merchant_id; data.location_id is present only when the business is set up for locations.
{
"id": "0b8c5f3e-2a71-4c1d-9e6a-7d4f2b1c8a90",
"type": "application.approved",
"api_version": "v1",
"created_at": "2026-11-12T12:00:00+00:00",
"environment": "sandbox",
"merchant": "cm_4kT9xWq2",
"application": "app_7Hq2Lm9P",
"data": {"resource": "applications", "id": "app_7Hq2Lm9P"}
}
ZenythPay-Event-Id equals the payload's id. ZenythPay-Signature has the form t=<unix timestamp>,v1=<hex signature>, with one signature by your current signing secret. Verify HMAC-SHA256 of timestamp + "." + raw_body using your signing secret. Verify the exact received bytes before parsing JSON. This Node.js example rejects stale or malformed signatures:
import { createHmac, timingSafeEqual } from 'node:crypto';
export function verifyWebhook(rawBody, header, signingSecret) {
if (!Buffer.isBuffer(rawBody) || typeof header !== 'string' ||
typeof signingSecret !== 'string' || !signingSecret) return false;
const match = /^t=(\d+),v1=([a-f0-9]{64})$/.exec(header);
if (!match) return false;
const timestamp = Number(match[1]);
if (!Number.isSafeInteger(timestamp) ||
Math.abs(Math.floor(Date.now() / 1000) - timestamp) > 300) return false;
const expected = createHmac('sha256', signingSecret)
.update(match[1] + '.').update(rawBody).digest();
return timingSafeEqual(expected, Buffer.from(match[2], 'hex'));
}
After verification, validate the expected merchant and environment and atomically deduplicate the payload id in your database. Persist the event before returning 2xx, then process it asynchronously. Delivery is at least once, may arrive out of order, and retries retain the event ID while receiving a fresh signature timestamp. Use the API's current resource state when ordering matters. Any 2xx answer counts as delivered. A failed delivery retries with exponential backoff, up to 12 attempts within 24 hours. We wait up to 3 seconds to connect and 10 seconds for your answer, and an answer body over 64 KB counts as a failure. Requests come with the User-Agent ZenythPay-Webhooks/1.0. Each endpoint's delivery log shows its deliveries of the last 30 days, in the dashboard or your developer account.
To catch up on events you missed, list them: a business's with GET /api/v1/merchant/events and its own key, and yours as a developer with GET /api/v1/platform/events and your platform key, each with events:read. Each lists the events of the last 30 days, newest first, exactly as they were sent; test events are never listed. Read every page: follow next_cursor across every page, including empty ones, until has_more is false, and keep the first page's pagination.checkpoint. Your list as a developer leaves out events about a merchant or application you may no longer see, so a page may hold fewer events than limit, even none, while has_more is true. Next time, list with since set to that checkpoint: you get every event published after it, including events whose delivery failed, arrived out of order or were recorded late, and a new checkpoint to keep. If since answers 422, list again without it, every page, and keep the new checkpoint.
You can send any delivery from the last 30 days to its endpoint again: the replay carries the same event id and is signed by the endpoint's current secret. You can also send an endpoint a test event of any type it can receive: it looks like a real event, names no real record, and ends with "test": true. In the dashboard, Send test webhook sends webhook.test with data: null to a business's main webhook.
Changing an endpoint's URL or events, or turning it off, cancels deliveries still waiting under the previous settings. Rotating an endpoint's signing secret gives you a new secret, shown once. A rotation takes effect at once: every delivery after it is signed by the new secret, and it cancels deliveries still waiting, which you get back from the events list or by replaying them. In-flight deliveries may finish. Coordinate receiver changes before rotating and reconcile resource state afterward. Webhook settings are independent for Sandbox and Production.
For a developer's endpoints, we check that you may still receive an event immediately before every attempt, after the address is resolved and with nothing else between that check and the request, and again before every replay and in your delivery log. Once our team turns a connection off, or turns your developer account off, no new attempt starts: at most the one attempt already past its check completes, within the 3-second connect and 10-second answer limits. A turned-off connection still sends its own connection.revoked. A replay of an event you may no longer receive answers 409, and your delivery log leaves it out, so a page may hold fewer deliveries than asked, even none, while has_more is true: follow next_cursor until has_more is false.
Use only approved processor test payment data in your Sandbox business. Enter test payment values only in the tokenizing payment frontend; send its resulting token to ZenythPay. Never switch a live integration into testing by changing a request body flag: use the dedicated Sandbox merchant, Sandbox credential, and Sandbox environment header.
Before going live, verify successful and declined payments, double-submit retries, timeouts, partial and full refunds where eligible, voids, saving, charging and removing a saved card if you use them, expired checkout links, validation errors, webhook signatures, duplicate events, retry delivery, credential rotation, and revocation. Confirm that your database records the correct merchant and environment for every resource.
Complete Production business approval and service activation in the dashboard, generate a separate least-privilege Production credential, configure a separate Production webhook and signing secret, and change the environment header to production. Confirm your own background jobs, webhook delivery, and a controlled live transaction before normal traffic. Keep Sandbox and Production secrets in separate secret-manager entries.
ZenythPay for WooCommerce takes card and US bank account (ACH) payments on a WooCommerce checkout through this API. Card and bank details are entered in secure fields hosted by the payment gateway and never touch the store's server; the store sends ZenythPay only the resulting payment token.
Download ZenythPay for WooCommerce 1.0.0 (zip, SHA-256 dbd6d4c14c23059438a38d06ed5cdbd755510468f70b7cda98ef1c62351c2260).
This version of the plugin doesn't save cards or take subscriptions. To save cards in your own integration, see Saved cards above.
zenythpay-for-woocommerce-1.0.0.zip, and click Install Now.To update, upload the newer zip the same way and confirm replacing the installed version. Settings are kept.
Sign in at developers.zenythpay.com as the business owner, open the business the store will charge under Your businesses, and create an API credential with exactly these permissions. If the business has several locations, make the key for the store's location, not All locations: the plugin doesn't name a location, so with a key for all locations every checkout payment is refused.
| Resource | Permission | Used for |
|---|---|---|
| Payments and checkout | Read & Write | Loading the checkout's tokenization key, charging orders, verifying interrupted payments |
| Refunds | Write | Refunds from the order screen |
| Voids | Write | Voiding a cancelled, unsettled order |
| Transactions and receipts | Read | Reading refunds and voids reported by webhooks |
Copy the secret when it is shown; it is not shown again. Sandbox keys start with zp_sandbox_ and Production keys with zp_production_. The plugin chooses the environment from the key, so no other environment setting exists.
Saving checks the connection and reports the result at the top of the screen:
| Message | What to do |
|---|---|
| Connected to ZenythPay. | The key works and the business can take card payments. Check that the key has all four permissions above, and place a test order. |
| ZenythPay rejected the API key. | Paste the complete key again, or generate a new one if it was revoked. |
| The API key is missing a permission, or the business is not active. | Regenerate the key with the permissions above, or finish business approval in the dashboard. |
| Connected, but this ZenythPay business has no tokenization key yet. | Finish gateway setup for the business in the dashboard. Checkout hides ZenythPay until it is done. |
| ZenythPay could not be reached. | Check the store's outbound network access and the API base URL, then save again. |
Leave API base URL (advanced) empty: the plugin then uses https://api.zenythpay.com. Debug log writes each API request and its outcome under WooCommerce → Status → Logs with source zenythpay. The API key and payment token are redacted, but customer billing details are included, so turn it off when you are done troubleshooting.
Open WooCommerce → Settings → Payments → ZenythPay – ACH, tick Enable, optionally change the title and description, and save. ACH uses the API key and webhook secret saved on the card method.
A Production business must first accept the ACH service fees in the dashboard and have ACH activation confirmed. A Sandbox business can take ACH payments without that step.
Webhooks are optional but recommended: they update orders when a payment, refund or void changes outside the store, for example a refund made in the ZenythPay dashboard.
https://your-store.example/?wc-api=zenythpay_webhook.payment.succeeded, payment.failed, transaction.refunded and transaction.voided, and save.The plugin verifies every signature, rejects events for the other environment, ignores duplicates, and reads the current payment or transaction from the API instead of trusting the event body. A refund made in the dashboard is recorded on the order as a WooCommerce refund for the amount WooCommerce is missing, without moving money again, and a fully refunded order becomes Refunded; stock is not restocked automatically. A void made in the dashboard cancels the order. If ZenythPay later corrects a payment's outcome, the order follows it: a payment first reported as declined and then approved is marked paid, and one approved and then reported as declined is put On hold with a note for you to check, never cancelled automatically. Webhooks are configured separately for Sandbox and Production.
If an order is On hold with a note that the payment is being verified, ZenythPay did not answer in time. The plugin checks the payment again automatically over the next 24 hours and marks the order paid or failed. Do not ship the order until it is marked paid.
Lists transactions for an accessible merchant using newest-first cursor pagination for infinite loading. The optional term searches full or partial customer first_name, customer last_name, customer email, including one- and two-character customer terms, card first6, card last4, and YYYY-MM-DD transaction dates. Optional from and to filters apply an inclusive transaction creation-date range, in calendar days in UTC; date is refused (422), so use them instead. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires transactions:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of transactions to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| term | string <= 255 characters Optional search term matched against full or partial customer first_name, customer last_name, customer email, including one- and two-character customer terms, card first6, card last4, or transaction date when the term is YYYY-MM-DD. |
| from | string <date> Optional first day of the creation-date range, inclusive; a calendar day in UTC (YYYY-MM-DD). |
| to | string <date> Optional last day of the creation-date range, inclusive; a calendar day in UTC (YYYY-MM-DD). Must be on or after from when from is supplied. |
| type | string Enum: "sale" "refund" "void" Optional exact transaction type filter. Combined with the other filters before pagination; empty values are ignored. |
| status | string Enum: "succeeded" "declined" Optional exact transaction status filter. Combined with the other filters before pagination; empty values are ignored. |
| source | string Enum: "new_card" "new_ach" "payment_method" "tap_to_pay" Optional exact transaction source filter. Combined with the other filters before pagination; empty values are ignored. |
| payment_type | string Enum: "card" "ach" Optional exact transaction payment type filter. Combined with the other filters before pagination; empty values are ignored. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Returns one transaction for an accessible merchant, including related customer, saved payment method display details, and decrypted billing details when present. Billing details are disclosed only on this authorized detail route and the response is not cacheable. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires transactions:read.
| transaction required | integer Transaction id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "billing_details": {
- "name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "city": "string",
- "state": "string",
- "country": "st",
- "postal_code": "string",
- "phone": "string"
}
}
}Returns all-time or exact-date transaction summary totals for an accessible merchant. Volume and count are net successful sale totals after successful refund and void transactions are deducted. Sale, refund, and void totals are returned separately, and success_rate is the successful sale authorization percentage before refunds and voids. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires transactions:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| date | string <date> Optional day to total; a calendar day in UTC (YYYY-MM-DD). Omit for all time. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "volume": "6.00",
- "count": 0,
- "success_rate": "66.67",
- "sales": {
- "amount": "20.00",
- "count": 2
}, - "refunds": {
- "amount": "4.00",
- "count": 1
}, - "voids": {
- "amount": "10.00",
- "count": 1
}
}
}Returns daily graph buckets, each a calendar day in UTC, for successful payments, successful refunds, successful voids, and sale authorization success rate. When both from and to are provided, the response includes zero-filled days for the inclusive range. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires transactions:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| from | string <date> Optional first day, inclusive; a calendar day in UTC (YYYY-MM-DD). Must be on or after 2000-01-01. |
| to | string <date> Optional last day, inclusive; a calendar day in UTC (YYYY-MM-DD). Must be on or after 2000-01-01 and on or after from when from is supplied. When both from and to are supplied, the range can be at most 366 days, counting both ends; a longer range returns 422. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "date": "2026-05-18",
- "payments": {
- "amount": "10.00",
- "count": 1
}, - "refunds": {
- "amount": "10.00",
- "count": 1
}, - "voids": {
- "amount": "10.00",
- "count": 1
}, - "success_rate": "50.00"
}
]
}Create tokenized payments, read the payment keys and billing field requirements, and inspect payment operations.
Returns which billing fields must be collected for a card charge on this merchant to be accepted, so a payment form can mark inputs required or optional instead of hardcoding them. Keys mirror the POST /api/v1/merchant/charges request body: read fields.billing_details.city for the input sent as billing_details.city. A field is true when it must be sent. The answer is the union of what the merchant's attached card processor requires and what this API's own charge validation requires, so billing_details.name, billing_details.country and billing_details.postal_code are always true — omitting them is a 422 from this API regardless of the processor. billing_details.address_line_2 is not described because no processor requirement exists for a second address line; treat it as always optional. Fields absent from fields are not gated. Authorization matches the charge endpoint. source is processor when the merchant's own card processor answered, and fallback when that could not be established — no gateway yet, no card processor attached, an attached processor that does not identify itself as a card processor, or a processor that could not be read — in which case every described field is reported as required so the form over-collects rather than being declined. Answers are cached briefly per gateway, so a processor change can take up to a few minutes to appear. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:read.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "source": "processor",
- "fields": {
- "billing_details": {
- "name": true,
- "address_line_1": false,
- "city": false,
- "state": false,
- "postal_code": true,
- "country": true,
- "phone": false
}, - "email": false
}
}
}Returns the public tokenization key for this merchant's gateway, so a payment form can tokenize card or ACH details in the payer's browser and send the resulting one-time token to POST /api/v1/merchant/charges. Use this key only for tokenization; never place the API credential in browser code. The key only produces tokens; it cannot charge, refund, or read anything. It is null until the merchant's gateway provisioning has created it, in which case no payment form can tokenize yet. Authorization matches the charge endpoint. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:read.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "collect_js_tokenization_key": "00000000-000000-000000-000000000000"
}
}Returns the public key that shows this merchant's card fields in a checkout page. The key can only show the card fields; it cannot charge, refund, or read anything, so it is safe to place in a web page. Never place the API credential in browser code. The first read creates the key, and later reads return the same key until the merchant replaces it in the dashboard. While the merchant can't take card payments (suspended, or not yet active), this call answers 403, like every Developer API call. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:read.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": {
- "key": "zp_pk_sandbox_00000000000000000000000000000000",
- "environment": "sandbox",
- "created_at": "2019-08-24T14:15:22Z"
}
}Charges a merchant with a tokenized typed card, Apple Pay, Google Pay, or ACH payment method. Card and wallet payments require billing_details.name, billing_details.country, and billing_details.postal_code; ACH accepts optional account_name and billing details. When email is omitted, the transaction is recorded as an anonymous guest charge and no customer or payment method is saved. When email is provided, the charge is associated to the existing merchant customer with that email or a new email-only customer is created. The payment method is charged and not stored. This operation saves no card, and save_card answers 422 "A card can be saved only on a customer's charge." (save a card with save_card on POST /api/v1/merchant/customers/{customer}/charges). Submitted billing names fill only null customer name fields; otherwise, the API queries the exact approved transaction and fills only null values. Existing non-null customer names are not overwritten, and unavailable or mismatched query enrichment does not change the completed payment outcome. Billing details are encrypted at rest and omitted from this charge response; authorized users may retrieve them from the no-store transaction-detail response. If you get no answer, or a 502, send the same request again with the same Idempotency-Key and body; the Idempotency-Key header lists every answer a retry can get. A replayed charge answers with its recorded outcome as it stands now (a later correction from the gateway can change it), 200 with the transaction when it is approved and 402 with the decline message and the transaction when it is declined. ACH is available to a sandbox merchant with no acceptance, and to a live merchant only after they accept its service fees and activation is confirmed; the merchant turns ACH on in the dashboard, and until then submitting ach returns 422 and reaches no gateway. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:write.
| Idempotency-Key required | string [ 1 .. 128 ] characters ^[ -~]+$ A key you choose for one payment, so that the request can be retried safely. To retry, send the same key with the same body. A payment that was approved or declined answers with its recorded result again, marked |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| payment_type required | string Enum: "card" "ach" |
object (WalletDetailsInput) Safe display metadata returned by the same wallet tokenization as | |
object (NewAchDisplayData) | |
| account_name | string [ 1 .. 150 ] characters Optional ACH account-holder name. Accepted only when |
| location_id | integer Developer API, keys for all locations only. Required with such a key, and must be the business or one of its locations; the payment is created there. Any other key always acts at its own location, and |
| amount required | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Decimal amount in major currency units. Up to two decimal places. |
| currency | string or null = 3 characters ^[A-Z]{3}$ Default: "USD" ISO currency code. Omit or send null to use the configured default currency. |
| payment_token required | string <= 255 characters One-time token generated by the payment frontend. Put payer identity in |
string or null <email> <= 255 characters Optional customer email. Omit for an anonymous guest charge. | |
required | object (NewCardDisplayData) Pass the |
required | object (BillingDetailsInput) Required when |
| order_id | string or null <= 64 characters |
| description | string or null <= 255 characters |
{- "amount": "10.00",
- "payment_type": "card",
- "payment_token": "00000000-000000-000000-000000000000",
- "billing_details": {
- "name": "Grace Hopper",
- "country": "US",
- "postal_code": "94107"
}, - "card": {
- "type": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030
}
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "saved_card": {
- "id": "sc_7Hq2LmX9",
- "customer_id": 0,
- "status": "saving",
- "available": true,
- "brand": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030,
- "billing_details": {
- "name": "string",
- "country": "string",
- "postal_code": "string"
}, - "consent": {
- "type": "customer_present",
- "accepted_at": "2019-08-24T14:15:22Z"
}, - "saved_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z"
}
}
}Charges a merchant-owned customer using a new tokenized typed card, Apple Pay, Google Pay, or ACH payment method, or a payment method saved before ZenythPay retired its gateway customer vault. New card and wallet payments require billing_details.name, billing_details.country, and billing_details.postal_code; new ACH accepts optional account_name and billing details; saved methods may send partial billing details that merge over the encrypted method snapshot. A new typed card sent with save_card is charged and saved for the customer in the same sale, and the response adds saved_card (see save_card). source saved_card charges a card saved that way, by the customer or the business (see initiated_by). A business charge of a card saved for recurring or installment payments is sent as one; an installment carries installment_number. Otherwise new payment methods are charged directly and are not stored — no card or payment method is saved, and payment_method and payment_method_id are null on the response. Saved-method charges remain available for methods stored before the vault was retired, and use the customer's vault id, selected method billing id, and merchant-initiated flags; no new saved method can be created. Billing details are encrypted at rest and omitted from this charge response (a card saved with save_card returns its name, country and postal code in saved_card.billing_details); authorized users may retrieve them from the no-store transaction-detail response, and from the saved-payment-method response for methods stored before the vault was retired. If you get no answer, or a 502, send the same request again with the same Idempotency-Key and body; the Idempotency-Key header lists every answer a retry can get. A replayed charge answers with its recorded outcome as it stands now (a later correction from the gateway can change it), 200 with the transaction when it is approved and 402 with the decline message and the transaction when it is declined. ACH is available to a sandbox merchant with no acceptance, and to a live merchant only after they accept its service fees and activation is confirmed; the merchant turns ACH on in the dashboard, and until then submitting ach returns 422 and reaches no gateway. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:write.
| customer required | integer Customer id that belongs to this business. |
| Idempotency-Key required | string [ 1 .. 128 ] characters ^[ -~]+$ A key you choose for one payment, so that the request can be retried safely. To retry, send the same key with the same body. A payment that was approved or declined answers with its recorded result again, marked |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| source required | string Enum: "new_card" "new_ach" "payment_method" "saved_card"
|
object (WalletDetailsInput) Safe display metadata returned by the same wallet tokenization as | |
object (NewAchDisplayData) | |
| account_name | string [ 1 .. 150 ] characters Optional ACH account-holder name. Accepted only when |
| payment_method_id | integer >= 1 Saved local payment method id. Required when source is payment_method. |
object Developer API only, with | |
| location_id | integer Developer API, keys for all locations only. Required with such a key, and must be the business or one of its locations; the payment is created there. Any other key always acts at its own location, and |
| amount required | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Decimal amount in major currency units. Up to two decimal places. |
| currency | string or null = 3 characters ^[A-Z]{3}$ Default: "USD" ISO currency code. Omit or send null to use the configured default currency. |
| saved_card_id | string^sc_[0-9A-Za-z]{8}$ The customer's saved card to charge. Required when |
| initiated_by | string Enum: "customer" "business" Required when |
| installment_number | integer [ 1 .. 99 ] The number of this payment in an installment plan, for example 3 for the third of six. Required with a |
| payment_token required | string <= 255 characters One-time payment token. Required when source is new_card or new_ach. |
required | object (NewCardDisplayData) Pass the |
required | object (BillingDetailsInput) Required when |
| order_id | string or null <= 64 characters |
| description | string or null <= 255 characters |
{- "amount": "10.00",
- "source": "new_card",
- "payment_token": "00000000-000000-000000-000000000000",
- "billing_details": {
- "name": "Grace Hopper",
- "country": "US",
- "postal_code": "94107"
}, - "card": {
- "type": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030
}
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "saved_card": {
- "id": "sc_7Hq2LmX9",
- "customer_id": 0,
- "status": "saving",
- "available": true,
- "brand": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030,
- "billing_details": {
- "name": "string",
- "country": "string",
- "postal_code": "string"
}, - "consent": {
- "type": "customer_present",
- "accepted_at": "2019-08-24T14:15:22Z"
}, - "saved_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z"
}
}
}Lists this business's payment operations using newest-first cursor pagination for infinite loading. The optional term searches operation metadata (your order_id included), card display fields, gateway identifiers, customer names/email, invoice recipient names/email, exact amount, numeric ids, and YYYY-MM-DD operation dates. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of payment operations to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| term | string <= 255 characters Optional search term matched against operation metadata, customer or invoice recipient names/email, exact amount, numeric ids, or operation date when the term is YYYY-MM-DD. |
| date | string <date> Optional creation day; a calendar day in UTC (YYYY-MM-DD). |
| operation_type | string Enum: "merchant_charge" "tap_to_pay_payment" "customer_charge" "invoice_payment" "refund" "void" Optional operation type filter. |
| status | string Enum: "pending" "gateway_confirmed" "succeeded" "declined" "failed" "reconciliation_failed" "held" Optional local operation status filter. |
| source | string Enum: "new_card" "new_ach" "payment_method" "tap_to_pay" Optional payment source filter. |
| payment_type | string Enum: "card" "ach" Optional payment method type filter. |
| customer_id | integer >= 1 Optional local customer id filter. |
| invoice_id | integer >= 1 Optional local invoice id filter. |
| transaction_id | integer >= 1 Optional resulting local transaction id filter. |
| subject_transaction_id | integer >= 1 Optional subject local transaction id filter for refund and void operations. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "invoice_id": 0,
- "subject_transaction_id": 0,
- "transaction_id": 0,
- "operation_type": "merchant_charge",
- "amount": "10.00",
- "currency": "USD",
- "source": "new_card",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "order_id": "string",
- "description": "string",
- "status": "pending",
- "held_resolution": "recorded_as_sale",
- "gateway": "nmi",
- "gateway_device_id": "string",
- "gateway_payment_request_id": "string",
- "gateway_payment_request_status": "string",
- "gateway_transaction_id": "string",
- "gateway_auth_code": "string",
- "gateway_response_code": "string",
- "gateway_response_text": "string",
- "gateway_approved": true,
- "gateway_confirmed_at": "2019-08-24T14:15:22Z",
- "reconciled_at": "2019-08-24T14:15:22Z",
- "reconciliation_attempted_at": "2019-08-24T14:15:22Z",
- "failure_message": "string",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "invoice": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "subject_transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Returns one payment operation of this business. Operations outside the credential-bound merchant are hidden with a 404 response. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payments:read.
| paymentOperation required | integer Payment operation id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "invoice_id": 0,
- "subject_transaction_id": 0,
- "transaction_id": 0,
- "operation_type": "merchant_charge",
- "amount": "10.00",
- "currency": "USD",
- "source": "new_card",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "order_id": "string",
- "description": "string",
- "status": "pending",
- "held_resolution": "recorded_as_sale",
- "gateway": "nmi",
- "gateway_device_id": "string",
- "gateway_payment_request_id": "string",
- "gateway_payment_request_status": "string",
- "gateway_transaction_id": "string",
- "gateway_auth_code": "string",
- "gateway_response_code": "string",
- "gateway_response_text": "string",
- "gateway_approved": true,
- "gateway_confirmed_at": "2019-08-24T14:15:22Z",
- "reconciled_at": "2019-08-24T14:15:22Z",
- "reconciliation_attempted_at": "2019-08-24T14:15:22Z",
- "failure_message": "string",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "invoice": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "subject_transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Creates a local void transaction linked to the original sale and sends the void to the gateway. Unresolved refunds or voids block another void with 409 until their outcome is definitive. If you get no answer, or a 502, send the same request again with the same Idempotency-Key and body. A finished void answers its original 201 or 402 again, with Idempotency-Replayed set; the Idempotency-Key header lists every other answer a retry can get. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires voids:write.
| transaction required | integer Id of an approved sale of this business. |
| Idempotency-Key required | string [ 1 .. 128 ] characters ^[ -~]+$ A key you choose for one payment, so that the request can be retried safely. To retry, send the same key with the same body. A payment that was approved or declined answers with its recorded result again, marked |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| description | string or null <= 255 characters Local void note stored on the void transaction. |
{- "description": "Customer canceled before settlement"
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}
}Creates a local refund transaction linked to the original sale and sends the refund to the gateway. Omitting amount refunds the remaining local transaction amount. Unresolved refunds reserve their amounts until completion or definitive rejection; an unresolved void blocks refunds with 409. If you get no answer, or a 502, send the same request again with the same Idempotency-Key and body. A finished refund answers its original 201 or 402 again, with Idempotency-Replayed set; the Idempotency-Key header lists every other answer a retry can get. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires refunds:write.
| transaction required | integer Id of an approved sale of this business. |
| Idempotency-Key required | string [ 1 .. 128 ] characters ^[ -~]+$ A key you choose for one payment, so that the request can be retried safely. To retry, send the same key with the same body. A payment that was approved or declined answers with its recorded result again, marked |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| amount | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Optional decimal amount in major currency units. Omit to refund the remaining local transaction amount. |
| order_id | string or null <= 64 characters Optional refund order id, stored on the refund and sent to the gateway as its order id. |
| description | string or null <= 255 characters Local refund note stored on the refund transaction. |
{- "amount": "5.00",
- "order_id": "REF-1001",
- "description": "Customer return"
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}
}Lists this business's customers, oldest first, using cursor pagination for infinite loading. Customers belong to the whole business, across its locations. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of customers to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| term | string <= 255 characters Optional search term matched against first_name, last_name, and email. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Creates a customer of this business, shared by all its locations. Customer email addresses are unique within the business. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:write.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| first_name required | string [ 1 .. 100 ] characters |
| last_name required | string [ 1 .. 100 ] characters |
| email required | string <email> <= 255 characters Unique within the merchant. |
{- "first_name": "Grace",
- "last_name": "Hopper",
- "email": "[email protected]"
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Returns one customer of this business. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| customer required | integer Customer id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Updates a customer's first name, last name, or email. Customer email addresses are unique within the business. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:write.
| customer required | integer Customer id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| first_name required | string [ 1 .. 100 ] characters |
| last_name | string [ 1 .. 100 ] characters |
string <email> <= 255 characters Unique within the merchant. |
{- "first_name": "Grace",
- "last_name": "Hopper",
- "email": "[email protected]"
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Deletes a customer and its saved payment methods. Its payments, refunds and voids are kept and no longer name a customer (their customer_id becomes null); their receipts are kept as issued. If a payer saved cards with this business under the customer's current email, the deletion also removes those cards, queues their deletion at the payment gateway, and closes the payer's saved-cards account, erasing the email, name, phone and address kept on it. And every card saved for the customer through the Developer API is deleted too, removed ones and their consent records included, and each one that may still be stored at the payment gateway is queued for deletion there. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:write.
| customer required | integer Customer id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "message": "Unauthenticated.",
- "error": {
- "code": "authentication_required",
- "message": "Unauthenticated.",
- "status": 401,
- "request_id": "018f2b44-7e92-7e44-9f50-88c74c8148e3"
}
}Returns the overall customer count and cursor-paginated per-customer successful sale transaction count and net charged amount, oldest customer first. Net customer amount is successful sale volume minus successful refunds and voids. Customers, and count, cover the whole business; with a key made for one location, each customer's sale count and net amount cover only that location's transactions. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of customer summary rows to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "count": 3,
- "customers": [
- {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "transaction_count": 1,
- "amount_charged": "6.00"
}
]
}, - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Lists locally saved payment method display records and available billing details for a merchant-owned customer. Billing details are decrypted only for this authorized response. Card PAN, CVV, payment tokens, and internal billing provenance are never returned. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| customer required | integer Customer id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "billing_details": {
- "name": "string",
- "address_line_1": "string",
- "address_line_2": "string",
- "city": "string",
- "state": "string",
- "country": "st",
- "postal_code": "string",
- "phone": "string"
}
}
]
}Whether the business can save and charge customers' cards. state is unavailable (not offered to this business), off, pending (being switched on), on or turning_off; available says whether cards can be saved and charged now. While state is off, activation_url is the link the business owner opens, signed in to ZenythPay, to accept the Saved cards fees and switch it on; no API call can accept for them. paused_reason is three_ds_required, and available false, while state is on or pending, Saved cards is open to live businesses, and the business requires 3-D Secure, which saved cards don't support yet. It is null otherwise, including while Saved cards is paused for every business. A location answers its business's status. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "state": "unavailable",
- "available": true,
- "paused_reason": "three_ds_required",
}
}Lists a customer's saved cards, newest first, 20 a page. Removed and failed cards are left out; read one by its id. Cards stay listed while the business has Saved cards off, with available false. Never the card number, a token or the consent words. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| customer required | integer Customer id that belongs to this business. |
| limit | integer [ 1 .. 20 ] Default: 20 |
| cursor | string <= 2048 characters The previous page's |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": "sc_7Hq2LmX9",
- "customer_id": 0,
- "status": "saving",
- "available": true,
- "brand": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030,
- "billing_details": {
- "name": "string",
- "country": "string",
- "postal_code": "string"
}, - "consent": {
- "type": "customer_present",
- "accepted_at": "2019-08-24T14:15:22Z"
}, - "saved_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Developer API only. Verifies the customer's card with no charge and saves it in the same request, under the consent given here. Refused with nothing sent, as a charge's save_card: 409 saved_cards_unavailable, card_already_saved (with saved_card_id and consent_type) or saved_cards_limit_reached; 409 location_off when the key's location can't take payments right now, or app_payments_off when the business takes card-terminal payments only or is moving to another processor; 404 "Customer not found.". installment_number is refused: a check is not a payment of a plan. Answers 201 with the saved card; 402 card_declined when the card is declined; 422 card_not_verified when the card can't be used; 502 when it couldn't be saved and nothing was kept (try again); 202 with the card saving when the answer from the card network is not clear, until our checks settle it as saved or failed. Every check counts toward the per-minute attempt budget it shares with customer charges (per business owner, acting location and IP); only declines count toward the failed-attempt limit, they expire on their own, and a saved card doesn't clear them. Over either, 429 with Retry-After: nothing is written or sent and the Idempotency-Key stays unspent. The same Idempotency-Key and body answer the card as it is now (Idempotency-Replayed: true), even if the location was switched off since: 200 with the card, saving while the first request is still waiting for its answer; with another body it is 409. After a 402, 422 or 502 nothing was kept, so the same key sends a new check. Requires customers:write and payments:write.
| customer required | integer Customer id that belongs to this business. |
| Idempotency-Key required | string <= 128 characters |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| payment_token required | string <= 255 characters One-time payment token of the typed card. |
required | object (NewCardDisplayData) Pass the |
required | object (BillingDetailsInput) Optional payer billing data. Card payment branches make |
required | object |
{- "payment_token": "00000000-000000-000000-000000000000",
- "card": {
- "type": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030
}, - "billing_details": {
- "name": "Pat Customer",
- "country": "US",
- "postal_code": "60601"
}, - "consent": {
- "type": "business_unscheduled",
- "text": "I agree that Example Co may charge this card for my orders when I am not present."
}
}{- "data": {
- "id": "sc_7Hq2LmX9",
- "customer_id": 0,
- "status": "saving",
- "available": true,
- "brand": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030,
- "billing_details": {
- "name": "string",
- "country": "string",
- "postal_code": "string"
}, - "consent": {
- "type": "customer_present",
- "accepted_at": "2019-08-24T14:15:22Z"
}, - "saved_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z"
}
}Reads one of a customer's saved cards, removed ones included (status: removed). available is true only for a saved card while the business has Saved cards on. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:read.
| customer required | integer Customer id that belongs to this business. |
| card required | string^sc_[0-9A-Za-z]{8}$ The saved card's id. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": "sc_7Hq2LmX9",
- "customer_id": 0,
- "status": "saving",
- "available": true,
- "brand": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030,
- "billing_details": {
- "name": "string",
- "country": "string",
- "postal_code": "string"
}, - "consent": {
- "type": "customer_present",
- "accepted_at": "2019-08-24T14:15:22Z"
}, - "saved_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z"
}
}Removes a customer's saved card: no new charge can start with it, a charge of it that had already started may still go through, and its stored record is queued for deletion. The answer is the card, status: removed. Removing a removed card answers the same. Works whether or not the business has Saved cards on. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires customers:write.
| customer required | integer Customer id that belongs to this business. |
| card required | string^sc_[0-9A-Za-z]{8}$ The saved card's id. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": "sc_7Hq2LmX9",
- "customer_id": 0,
- "status": "saving",
- "available": true,
- "brand": "visa",
- "first6": "411111",
- "last4": "1111",
- "exp_month": 12,
- "exp_year": 2030,
- "billing_details": {
- "name": "string",
- "country": "string",
- "postal_code": "string"
}, - "consent": {
- "type": "customer_present",
- "accepted_at": "2019-08-24T14:15:22Z"
}, - "saved_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z"
}
}Lists invoices for an accessible merchant using newest-first cursor pagination for infinite loading. The optional term searches description, recipient email, status, customer first_name, customer last_name, customer email, and due date when the term is YYYY-MM-DD. Optional from and to filters apply an inclusive due-date range; date is refused (422), so use them instead. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of invoices to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| term | string <= 255 characters Optional search term matched against description, recipient email, status, customer first_name, customer last_name, customer email, or due date when the term is YYYY-MM-DD. |
| from | string <date> Optional inclusive invoice due-date range start in YYYY-MM-DD format. |
| to | string <date> Optional inclusive invoice due-date range end in YYYY-MM-DD format. Must be on or after from when from is supplied. |
| status | string Enum: "draft" "sent" "processing" "paid" "canceled" Optional exact invoice status filter. Combined with the other filters before pagination; empty values are ignored. |
| customer_id | integer >= 1 Optional filter to invoices of one customer. The customer must belong to this merchant; any other id returns 422 with a |
| overdue | integer Enum: 0 1 Send |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Creates an invoice for either an existing customer of this business or a recipient email. Omit send or set it to false to create a draft. Set send to true to create and send it in one step, returning status sent and e-mailing the invoice to its recipient. If recording the send fails, invoice creation also rolls back. available_payment_methods is a nonempty set of methods for this invoice that can't be changed later; Apple Pay or Google Pay requires card. Omission enables every method currently offerable. ach is offered to a sandbox merchant with no acceptance, and to a live merchant only after they accept its service fees and activation is confirmed; the merchant turns ACH on in the dashboard. For any other merchant, omission returns apple_pay, google_pay, card and an explicit ach is rejected with 422. A stored invoice may retain ach, but for a live merchant it neither offers nor accepts ACH until activation is confirmed. A payer's device may still not show a wallet it doesn't support. The invoice is not payable until it is sent. With send true the send's rules apply first, and a refusal creates nothing. The credential's business owner must have a verified email (403 email_not_verified). A Sandbox business emails invoices only to its own team, the owner and accepted members by addresses their accounts verified (422 sandbox_recipient_not_allowed). A Production business's invoice emails, sends and resends alike, are capped at ten a day per recipient, three hundred a day per location of the business (or the business, if it has no locations) and sixty an hour for the business owner, shared with payment links (429 with Retry-After). The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:write.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| location_id | integer Developer API, keys for all locations only. Required with such a key, and must be the business or one of its locations; the invoice is created there. Any other key always acts at its own location, and |
| amount required | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Decimal amount in major currency units. Up to two decimal places. |
| currency | string or null = 3 characters ^[A-Z]{3}$ Default: "USD" ISO currency code. Omit or send null to use the configured default currency. |
| description required | string [ 1 .. 255 ] characters |
| due_date required | string <date> The last day the invoice can be paid (YYYY-MM-DD). After the end of that day, UTC, payment is refused. Must be today or later. |
| send | boolean Default: false Set true to create and send atomically. Omit or set false to create a draft without sending. |
| available_payment_methods | Array of strings (AvailablePaymentMethods) [ 1 .. 4 ] items unique Items Enum: "apple_pay" "google_pay" "card" "ach" The payment methods this invoice or payment link offers; they can't be changed later. Apple Pay or Google Pay requires |
| customer_id required | integer >= 1 Existing merchant customer id. Provide either customer_id or email. |
string <email> <= 255 characters Recipient email. Provide either customer_id or email. |
{- "amount": "25.50",
- "description": "Implementation services",
- "due_date": "2027-06-30",
- "customer_id": 1,
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card"
]
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Returns one invoice for an accessible merchant, including related customer and transaction details when present. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:read.
| invoice required | integer Invoice id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Updates a draft invoice. Sent, processing, paid, and canceled invoices cannot be edited. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:write.
| invoice required | integer Draft invoice id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| amount required | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Decimal amount in major currency units. Up to two decimal places. |
| currency | string = 3 characters ^[A-Z]{3}$ |
| description | string [ 1 .. 255 ] characters |
| due_date | string <date> The last day the invoice can be paid (YYYY-MM-DD). After the end of that day, UTC, payment is refused. Must be today or later. |
| customer_id | integer >= 1 Existing merchant customer id. Sending this switches the draft invoice recipient to the customer. |
string <email> <= 255 characters Recipient email. Sending this switches the draft invoice to an email-only recipient. | |
| available_payment_methods | any Prohibited. Enabled payment methods are immutable after invoice creation. |
{- "amount": "42.75",
- "description": "Updated services",
- "due_date": "2027-07-15",
- "email": "[email protected]"
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Deletes a draft invoice. Sent, processing, paid, and canceled invoices cannot be deleted. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:write.
| invoice required | integer Draft invoice id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "message": "Unauthenticated.",
- "error": {
- "code": "authentication_required",
- "message": "Unauthenticated.",
- "status": 401,
- "request_id": "018f2b44-7e92-7e44-9f50-88c74c8148e3"
}
}Returns invoice count, total invoice amount, paid invoice count, paid invoice amount, and paid rate for an accessible merchant. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "count": 3,
- "amount": "76.50",
- "paid_count": 2,
- "paid_amount": "51.00",
- "paid_rate": "66.67"
}
}Sends a draft invoice, or sends a sent invoice again. Each send e-mails the invoice to its recipient with a new payment link; a resend's link replaces the earlier one, which stops working. Processing, paid, and canceled invoices cannot be sent or resent. The credential's business owner must have a verified email (403 email_not_verified). A Sandbox business emails invoices only to its own team, the owner and accepted members by addresses their accounts verified (422 sandbox_recipient_not_allowed). A Production business's invoice emails, sends and resends alike, are capped at ten a day per recipient, three hundred a day per location of the business (or the business, if it has no locations) and sixty an hour for the business owner, shared with payment links (429 with Retry-After). The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:write. A draft whose recipient is changed while it is being sent is refused with 409 and sent to no one.
| invoice required | integer Invoice id owned by the merchant. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Cancels a sent invoice and invalidates its public payment link. Draft invoices should be deleted instead of canceled. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires invoices:write.
| invoice required | integer Sent invoice id owned by the merchant. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "draft",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "transaction": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "payment_method_id": 0,
- "parent_transaction_id": 0,
- "amount": "10.00",
- "currency": "USD",
- "status": "succeeded",
- "source": "new_card",
- "type": "sale",
- "gateway": "nmi",
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "processor_response_code": "string",
- "processor_response_text": "string",
- "order_id": "string",
- "description": "string",
- "customer": {
- "id": 0,
- "merchant_id": 0,
- "first_name": "string",
- "last_name": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "payment_method": {
- "id": 0,
- "customer_id": 0,
- "payment_type": "card",
- "card_type": "string",
- "first6": "string",
- "last4": "string",
- "exp_month": 1,
- "exp_year": 2000,
- "ach_account_type": "checking",
- "ach_account_holder_type": "personal",
- "ach_routing_number_last4": "string",
- "created_at": "2019-08-24T14:15:22Z"
}, - "payment_operation": {
- "id": 0,
- "operation_type": "merchant_charge",
- "status": "pending",
- "performed_by": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email": "[email protected]"
}, - "developer": {
- "name": "string"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z"
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Lists payment links for an accessible merchant using newest-first cursor pagination. The optional term searches description, payer email after payment, status, customer first_name, customer last_name, customer email, and due date when the term is YYYY-MM-DD. Optional from and to filters apply an inclusive due-date range; date is refused (422), so use them instead. customer_id is refused (422) too, since a payment link has no customer until it is paid. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payment_links:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of payment links to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| term | string <= 255 characters Optional search term matched against description, payer email, status, customer names, customer email, or due date when the term is YYYY-MM-DD. |
| from | string <date> Optional inclusive payment-link due-date range start in YYYY-MM-DD format. |
| to | string <date> Optional inclusive payment-link due-date range end in YYYY-MM-DD format. Must be on or after from when from is supplied. |
| status | string Enum: "draft" "sent" "processing" "paid" "canceled" Optional exact payment-link status filter. Combined with the other filters before pagination; empty values are ignored. |
| overdue | integer Enum: 0 1 Send |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "sent",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Creates a payment link, already sent, and returns its URL in payment_url. Only this response and a share return payment_url, so store it. The link's payment methods can't be changed later. Apple Pay or Google Pay requires card. Omission enables every method currently offerable. ach is offered to a sandbox merchant with no acceptance, and to a live merchant only after they accept its service fees and activation is confirmed; the merchant turns ACH on in the dashboard. For any other merchant, omission returns apple_pay, google_pay, card and an explicit ach is rejected with 422. A stored invoice may retain ach, but for a live merchant it neither offers nor accepts ACH until activation is confirmed; runtime wallet capability may further hide a wallet. The merchant does not provide customer_id or email at creation time; payer email is collected optionally when the public link is paid. Each link created here also e-mails the business owner a "your link is ready" message with the link, so the owner's e-mail address must be verified (403 email_not_verified). In a live business it counts against two limits: 60 an hour for the business owner, shared with every invoice e-mail and payment link sent as the owner at any of their businesses, from the dashboard or the API; and 300 a day for this location of the business (or the business, if it has no locations), shared with its invoice e-mails. Over either limit the request answers 429 with Retry-After. Sandbox businesses aren't counted. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payment_links:write.
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| location_id | integer Developer API, keys for all locations only. Required with such a key, and must be the business or one of its locations; the payment link is created there. Any other key always acts at its own location, and |
| amount required | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Decimal amount in major currency units. Up to two decimal places. |
| currency | string or null = 3 characters ^[A-Z]{3}$ Default: "USD" ISO currency code. Omit or send null to use the configured default currency. |
| description required | string [ 1 .. 255 ] characters |
| due_date required | string <date> The last day the link can be paid (YYYY-MM-DD). After the end of that day, UTC, payment is refused. Must be today or later. A sent link's due date can be moved later with |
| available_payment_methods | Array of strings (AvailablePaymentMethods) [ 1 .. 4 ] items unique Items Enum: "apple_pay" "google_pay" "card" "ach" The payment methods this invoice or payment link offers; they can't be changed later. Apple Pay or Google Pay requires |
| customer_id | integer >= 1 Prohibited for payment-link creation. Payer identity is collected from the public payment form instead. |
string <email> <= 255 characters Prohibited for payment-link creation. Optional payer email is accepted only when paying the public link. |
{- "amount": "25.50",
- "description": "Hosted checkout",
- "due_date": "2027-07-31",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
]
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "sent",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Returns one payment link of this business. payment_url is null here; the link's URL is returned only when the link is created or shared. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payment_links:read.
| paymentLink required | integer Payment-link id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "sent",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Updates an unpaid, uncanceled payment link. Only sent payment links can be edited; processing, paid, and canceled payment links are locked. Merchants may change amount, currency, description, and due_date, but cannot assign a customer or recipient email. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payment_links:write.
| paymentLink required | integer Sent payment-link id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
| amount required | string^(?!0+(?:\.0{1,2})?$)\d{1,10}(?:\.\d{1,2})?$ Decimal amount in major currency units. Up to two decimal places. |
| currency | string = 3 characters ^[A-Z]{3}$ |
| description | string [ 1 .. 255 ] characters |
| due_date | string <date> The last day the link can be paid (YYYY-MM-DD). After the end of that day, UTC, payment is refused. Must be today or later. Move it later to give the payer more time, even once it has passed. |
| customer_id | integer >= 1 Prohibited for payment-link updates. |
string <email> <= 255 characters Prohibited for payment-link updates. Optional payer email is accepted only when paying the public link. | |
| available_payment_methods | any Prohibited. Enabled payment methods are immutable after payment-link creation. |
{- "amount": "42.75",
- "currency": "USD",
- "description": "Updated hosted checkout",
- "due_date": "2027-08-15"
}{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "sent",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Cancels a sent payment link and invalidates its public token. Paid, processing, and already-canceled payment links cannot be canceled. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payment_links:write.
| paymentLink required | integer Sent payment-link id owned by the merchant. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "merchant_id": 0,
- "customer_id": 0,
- "transaction_id": 0,
- "amount": "25.50",
- "currency": "USD",
- "description": "string",
- "due_date": "2019-08-24",
- "status": "sent",
- "available_payment_methods": [
- "apple_pay",
- "google_pay",
- "card",
- "ach"
], - "sent_at": "2019-08-24T14:15:22Z",
- "paid_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
}Lists the payouts sent to the merchant's bank account, and the withdrawals taken back from it, newest sent first, with cursor pagination. A payout is one transfer the processor sent; it has the day it was sent and the day it usually arrives by, and is never a confirmation that the bank received it. A list item carries no payments; get one payout to read them. Payouts exist for live merchants only, so a sandbox key answers 409. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payouts:read.
| location_id | integer Keys for all locations only. Lists one location of the business; without it the list covers every location. Refused (422) for a location outside this business. With any other key it is refused (422) at a business set up for locations, and ignored at a business without them. |
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of payouts to return. |
| cursor | string <= 2048 characters Opaque cursor returned by the previous response. |
| date_from | string <date> Optional first day the payout was sent, inclusive (YYYY-MM-DD). |
| date_to | string <date> Optional last day the payout was sent, inclusive (YYYY-MM-DD). Must be on or after date_from when date_from is supplied. |
| amount_min | string^(?:0|[1-9]\d{0,9})(?:\.\d{1,2})?$ Optional smallest amount, in dollars. Compared with the size of the amount, so a withdrawal of 42.10 matches 42.10. |
| amount_max | string^(?:0|[1-9]\d{0,9})(?:\.\d{1,2})?$ Optional largest amount, in dollars, compared the same way. Must be greater than or equal to amount_min when amount_min is supplied. |
| kind | string Enum: "payout" "withdrawal" Optional. Only payouts, or only withdrawals. |
| card_brand | string Enum: "visa" "mastercard" "amex" "discover" "other" Optional. Only payouts that include a payment made with this card brand. |
| search | string <= 64 characters Optional. Matches a card's last 4 digits, an amount (a payment's, or the payout's own; |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": [
- {
- "id": 0,
- "kind": "payout",
- "amount": "500.00",
- "currency": "USD",
- "sent_on": "2019-08-24",
- "arrives_by": "2019-08-24",
- "reference": "string",
- "location": {
- "id": 0,
- "name": "Main St store"
}, - "payment_count": 0,
- "payments_status": "complete",
- "breakdown": [
- {
- "line": "sales",
- "amount": "-20.00",
- "count": 0
}
], - "payments": [
- {
- "id": 0,
- "date": "2019-08-24",
- "amount": "300.00",
- "type": "sale",
- "card_brand": "visa",
- "card_last4": "4242",
- "entry_method": "chip",
- "terminal": "string",
- "transaction_id": 0
}
]
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Returns one payout with the card payments it includes. The payments are listed only when all of them are known (payments_status is complete); otherwise payments is empty. A key for all locations opens a payout of any location of the business. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires payouts:read.
| payout required | integer Payout id that belongs to this business. |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| X-ZenythPay-Merchant | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 With a platform key, the connected merchant this call is for: cm_ and 8 letters or digits. Not sent with a merchant's own API key. |
{- "data": {
- "id": 0,
- "kind": "payout",
- "amount": "500.00",
- "currency": "USD",
- "sent_on": "2019-08-24",
- "arrives_by": "2019-08-24",
- "reference": "string",
- "location": {
- "id": 0,
- "name": "Main St store"
}, - "payment_count": 0,
- "payments_status": "complete",
- "breakdown": [
- {
- "line": "sales",
- "amount": "-20.00",
- "count": 0
}
], - "payments": [
- {
- "id": 0,
- "date": "2019-08-24",
- "amount": "300.00",
- "type": "sale",
- "card_brand": "visa",
- "card_last4": "4242",
- "entry_method": "chip",
- "terminal": "string",
- "transaction_id": 0
}
]
}
}List the current merchant's webhook events from the last 30 days, to catch up on any you missed.
This business's events from the last 30 days, newest first, each exactly as its webhooks carried it (id is the ZenythPay-Event-Id header). Test events are never listed. To catch up after webhooks you missed, follow next_cursor until has_more is false and keep the first page's pagination.checkpoint, which every page of that scan carries. Next time, list with since set to it: you get every event published after it, newest first, including events that failed, arrived out of order or were recorded late, and a new checkpoint. Events belong to the whole business, so a key for one location answers 409. The merchant is resolved from the credential. Merchant selection through request fields is rejected with 422. Requires events:read.
| limit | integer [ 1 .. 100 ] Default: 20 Maximum number of events to return. |
| cursor | string <= 2048 characters The previous page's |
| since | string <= 2048 characters A |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "string",
- "api_version": "v1",
- "created_at": "2019-08-24T14:15:22Z",
- "merchant_id": "string",
- "environment": "sandbox",
- "merchant": "string",
- "application": "string",
- "data": {
- "resource": "string",
- "id": "string",
- "location_id": "string"
}
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true,
- "checkpoint": "string"
}
}For developers, with a platform key: board merchants, read the merchants connected to you, and list your webhook events.
The merchants connected to your developer account, newest first, test merchants included. Each shows its business name, whether it is a test merchant, and its status: live, approved, submitted, more_info_needed, declined or joined. key_works says whether a key of each environment can act for the merchant now. turned_off_at is set when the merchant's access to you was turned off. locations lists the ids to send as location_id when you create a payment, invoice or payment link for a business with several locations; it is null for any other business, and reads the business of the key's environment. No owner details are shown. Needs a key with merchants:read. This call names no merchant, so it spends your account's budget for the key's environment and no merchant's. Every answer is Cache-Control: no-store, private.
| limit | integer [ 1 .. 100 ] |
| cursor | string <= 2048 characters The previous page's |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": [
- {
- "id": "cm_Ab12Cd34",
- "business_name": "string",
- "test_merchant": true,
- "status": "live",
- "key_works": {
- "sandbox": true,
- "production": true
}, - "connected_at": "2019-08-24T14:15:22Z",
- "turned_off_at": "2019-08-24T14:15:22Z",
- "locations": [
- {
- "id": 0,
- "name": "string"
}
]
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}One merchant connected to your developer account, with the same fields as the list. A merchant that does not exist and one connected to another developer answer alike. Needs a key with merchants:read. Every answer is Cache-Control: no-store, private.
| connectedMerchant required | string^cm_[0-9A-Za-z]{8}$ Example: cm_Ab12Cd34 The merchant's id, |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": {
- "id": "cm_Ab12Cd34",
- "business_name": "string",
- "test_merchant": true,
- "status": "live",
- "key_works": {
- "sandbox": true,
- "production": true
}, - "connected_at": "2019-08-24T14:15:22Z",
- "turned_off_at": "2019-08-24T14:15:22Z",
- "locations": [
- {
- "id": 0,
- "name": "string"
}
]
}
}Your applications, newest first: each one's id, status, business name, how it was started and, once the owner joined, the merchant's id. Applications that are not yours, or that our team moved away from you, are never listed. Needs a key with applications:read. Every answer is Cache-Control: no-store, private.
| limit | integer [ 1 .. 100 ] |
| cursor | string <= 2048 characters The previous page's |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": [
- {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "merchant": "cm_Ab12Cd34",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api"
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true
}
}Starts an application for a business: its name and the owner's name and email, held to the same rules as any application start. In production it starts the application for the real business; nobody is emailed until you send it. A production start needs your company profile and a security method first: until then it answers 403 "Add your company profile and a security method before boarding real merchants." before anything is written, and spends none of the hour's starts. A login whose email is not verified gets 403 email_not_verified first. In sandbox it starts a test application, kept apart from real ones: checked by the same rules, but only against your own test applications, and nobody is emailed. Starts are limited to 20 an hour per developer per environment, through the API and the portal together. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| Idempotency-Key | string [ 1 .. 128 ] characters ^[ -~]+$ Optional: a key you choose for one request, so that it can be retried safely. Keys are kept 24 hours, for your account and this environment. A retry with the same key and the same request (the route, the application, the body and any file) answers the first answer again, with |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| business_name required | string [ 2 .. 45 ] characters ^[A-Za-z0-9 #&*'-]+$ Becomes both the legal and the DBA name, so it follows the application's rule for both: 2 to 45 letters, digits, spaces and # & * - '. Typographic quotes and dashes are stored as ' and -. |
| owner_first_name required | string <= 100 characters |
| owner_last_name required | string <= 100 characters |
| owner_email required | string <email> <= 255 characters Trimmed and lowercased. Letters, digits and _ ' + . - before the @ (no leading, trailing or doubled dot) and a dotted domain whose last part is letters only. Anything else reads "The owner email field must be a valid email address.". |
{- "business_name": "string",
- "owner_first_name": "string",
- "owner_last_name": "string",
- "owner_email": "[email protected]"
}{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}The application as you may read it: what you entered, less what only the merchant or our team holds. An SSN, a date of birth and the business tax ID are never read back: write_only says which are on file. more_info_requests lists what our review team asked the merchant for. Documents are never listed. merchant is the merchant's id once the owner joined. started_via says how it was started. An id that is unknown, another developer's, not an application id, or no longer yours answers the same 404. Needs a key with applications:read. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}Saves sections of the application with the same rules and messages as the merchant's own save, and answers the application. Send currentStep with every save of application fields; a field left out keeps its value. Bank details, pricing, the legal acceptances, the business category, ID document pointers and submitting are the merchant's or our team's, each refused with its own sentence. After the merchant joins, the owner's identity is theirs alone. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| currentStep | string or null Enum: "business" "control_person" "owners" "processing" "bank_account" "pricing" "biz_type" "tax_details" "biz_details" "products_services" "public_details" "representative" "rep_verification" "secure_account" "review_submit" null Required when the request saves application fields. |
| status | string or null Enum: "draft" null
|
object or null (ApplicationBusiness) The application's business details as you read and write them: every business field except | |
object or null (ApplicationPersonInput) The control person or an owner as you write them: every field except the ID document pointers ("Upload ID documents as files."). | |
Array of objects or null or null (ApplicationPersonInput) <= 4 items | |
object or null (ApplicationProcessing) Expected processing amounts satisfy | |
| notes | string or null <= 2000 characters |
object or null (ApplicationUnderwriting) Underwriting answers, asked only when our review team requests them. Sending this group while the application is a draft is refused with 422 ( | |
| bankAccount | any "Only the merchant can enter bank details." |
| bank_account | any The payout-shaped alias of |
| pricing | any "ZenythPay sets the prices for this application." |
| legal | any "Only the merchant can accept the legal terms." |
{- "currentStep": "business",
- "status": "draft",
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "dob": "2019-08-24",
- "ssn": "string",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "dob": "2019-08-24",
- "ssn": "string",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string",
- "underwriting": {
- "businessDescription": "string",
- "locationTypes": {
- "storefront": true,
- "home": true,
- "customer_site": true,
- "online": true
}, - "acceptanceDevice": "terminal",
- "refundPolicy": "string",
- "hasProcessedBefore": true
}, - "bankAccount": null,
- "bank_account": null,
- "pricing": null,
- "legal": null
}{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}Uploads a document to the application, with the merchant's own file rules and its limit of 10 files per document. The answer is given once: a document is never listed or downloaded back. Bank proof is the merchant's alone, and uploads are taken only until the merchant joins and only while the application is a draft. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| Idempotency-Key | string [ 1 .. 128 ] characters ^[ -~]+$ Optional: a key you choose for one request, so that it can be retried safely. Keys are kept 24 hours, for your account and this environment. A retry with the same key and the same request (the route, the application, the body and any file) answers the first answer again, with |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| idDocumentType required | string Enum: "drivers_license" "state_id" "passport" "business_license" "tax_return" "articles_of_incorporation" "financial_statements" "voided_check" "bank_statement" "processing_statement" "bank_letter" "ein_letter" "ein_application" "sellers_permit" "professional_license" "proof_of_address" "social_security_card" "paid_invoice" "irs_determination_letter" "business_photo" Photo ID (drivers_license, state_id and passport) requires |
| side | string Enum: "front" "back" Required for photo ID. Business documents and Social Security cards have no front or back: omit it, or send null. A non-empty value is rejected with 422; an empty or whitespace-only string is normalised to null and accepted. |
| client_upload_id | string or null <uuid> ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3... Not read here. To retry an upload safely, send an |
Array of integers or string Not read here: an upload never replaces an earlier one. | |
| file required | string <binary> JPEG, PNG, PDF, HEIC, or HEIF, up to 10 MB. Photo ID and social_security_card take only these scan formats. Business documents also take TXT, MD (.md or .markdown), DOC, DOCX or XLSX, each only under its own extension (a .txt may hold comma-separated text). A DOCX or XLSX must be a package of that type (its main part, named by _rels/.rels, carries the type's main content type) and is refused when its [Content_Types].xml declares a macro, VBA, ActiveX or OLE-object content type, when a relationship part relates a VBA project or ActiveX control or embeds an OLE object, when it relates an attached template, OLE object, frame or subdocument at a target that is not plainly local (only a file:/// URL of a drive or absolute path, a bare drive path or a bare absolute path is allowed; any other scheme, a scheme no URL can have, a UNC path, a file: URL with a host, a relative path or a garbled target is refused), when an entry has a program's extension, or when one of those XML parts cannot be read in full. The 422 lists the formats the chosen type accepts. A file over 10 MB is a 422 reading "The file is too large. The maximum size is 10 MB.", and one that fails to upload for any other reason a 422 reading "The file failed to upload."; a request body over 28 MB is refused before validation runs. |
{- "data": {
- "type": "drivers_license",
- "filename": "string",
- "uploaded_at": "2019-08-24T14:15:22Z"
}
}Changes whose application this is, until the merchant joins, under the same checks as a start; earlier links stop working and nothing is sent, so the status is draft again. The email the owner already has changes nothing. Limited to 5 attempts a day per application. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| owner_email required | string <email> <= 255 characters Held to exactly the start's owner email rules and message. |
{- "owner_email": "[email protected]"
}{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}Emails the owner a link to the application. In sandbox nobody is emailed: the answer's preview_url is a read-only preview of what the owner would see (POST /api/v1/platform/application-previews), handed out by this answer only. A send before that link expires changes nothing and has no preview_url, and neither does a replay under the same Idempotency-Key: resend for a new link. In production the owner gets the link by email, in an email that names your company; the link is never in the answer. A production send needs your company profile and a security method first: until then it answers 403 "Add your company profile and a security method before boarding real merchants." before anything is looked up, counted or sent. A login whose email is not verified gets 403 email_not_verified first. Links are limited to 5 a day per application, and to 5 a day per owner's inbox across all your applications in each environment: addresses that differ only by a +tag, or by dots in a Gmail address, count as one inbox. The owner's sign-in codes, and the link we email when someone signs up or resets a password with the owner's address, count too; a new link the owner asks for themselves has a limit of its own. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| Idempotency-Key | string [ 1 .. 128 ] characters ^[ -~]+$ Optional: a key you choose for one request, so that it can be retried safely. Keys are kept 24 hours, for your account and this environment. A retry with the same key and the same request (the route, the application, the body and any file) answers the first answer again, with |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}Emails the owner a new link to an application already sent; the earlier link stops working. In sandbox nobody is emailed: the answer's preview_url is the new preview link, handed out by this answer only; a replay under the same Idempotency-Key has none: resend again for a new link. In production the owner gets the new link by email, in an email that names your company; the link is never in the answer. A production resend needs your company profile and a security method first: until then it answers 403 "Add your company profile and a security method before boarding real merchants." before anything is looked up, counted or sent. A login whose email is not verified gets 403 email_not_verified first. Links are limited to 5 a day per application, and to 5 a day per owner's inbox across all your applications in each environment: addresses that differ only by a +tag, or by dots in a Gmail address, count as one inbox. The owner's sign-in codes, and the link we email when someone signs up or resets a password with the owner's address, count too; a new link the owner asks for themselves has a limit of its own. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| Idempotency-Key | string [ 1 .. 128 ] characters ^[ -~]+$ Optional: a key you choose for one request, so that it can be retried safely. Keys are kept 24 hours, for your account and this environment. A retry with the same key and the same request (the route, the application, the body and any file) answers the first answer again, with |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}Sandbox only. Moves a test application as the merchant or our review team would, so you can build against every status without a real merchant. Each outcome follows only certain statuses: joined follows sent; submitted follows joined or more_info_needed; more_info_needed follows submitted or more_info_needed and adds a request to more_info_requests; approved and declined follow submitted. approved connects the application to a test merchant, named in merchant: a new one named for the business while you have fewer than 10, otherwise the oldest of your test merchants that no test application uses and our team has not turned off (resetting a test merchant frees it). The application reads approved until that test merchant is ready, then live. A test merchant takes cards once your email is verified. Approving an approved application again retries setting up its test merchant and changes nothing else. A production key answers 403 "Simulate works only with test applications in sandbox.". Nothing is emailed. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| Idempotency-Key | string [ 1 .. 128 ] characters ^[ -~]+$ Optional: a key you choose for one request, so that it can be retried safely. Keys are kept 24 hours, for your account and this environment. A retry with the same key and the same request (the route, the application, the body and any file) answers the first answer again, with |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
| outcome required | string Enum: "joined" "submitted" "more_info_needed" "approved" "declined" What happens next: the merchant joins or submits, or our review team asks for more information, approves or declines. Each follows only certain statuses (see the operation). |
{- "outcome": "joined"
}{- "data": {
- "id": "app_Ab12Cd34",
- "environment": "sandbox",
- "status": "draft",
- "business_name": "string",
- "application": {
- "business": {
- "mcc": "string",
- "cashDiscountAcknowledged": true,
- "merchantAgreementAccepted": true,
- "termsOfServiceAccepted": true,
- "privacyPolicyAccepted": true,
- "dbaName": "string",
- "dbaPhone": "string",
- "dbaAddress": "string",
- "dbaAddress2": "string",
- "dbaCity": "string",
- "dbaState": "string",
- "dbaPostalCode": "string",
- "dbaCountry": "st",
- "dbaPhoneCountry": "st",
- "legalPhoneCountry": "st",
- "customerSupportPhoneCountry": "st",
- "legalName": "string",
- "legalPhone": "string",
- "legalAddress": "string",
- "legalAddress2": "string",
- "legalCity": "string",
- "legalState": "string",
- "legalPostalCode": "string",
- "legalCountry": "st",
- "contactName": "string",
- "dateOpened": "2019-08-24",
- "federalTaxId": "string",
- "businessNature": "Retail",
- "businessNatures": [
- "Retail"
], - "typeBusiness": "Sole Proprietor",
- "stateIncorporated": "string",
- "typeOfGoodsSold": "string",
- "yearsInBusiness": 0,
- "businessStructure": "sole_proprietor",
- "businessSubType": "llc",
- "partnershipType": "general",
- "exempt501c3": true,
- "statementDescriptor": "string",
- "shortenedDescriptor": "string",
- "customerSupportPhone": "string",
- "customerSupportAddress": "string",
- "customerSupportAddress2": "string",
- "showCustomerSupportPhoneOnReceipts": true,
- "patriotActIdType": "GIBL",
- "patriotActPlaceOfIssuance": "string",
- "patriotActDateIssued": "2019-08-24",
- "patriotActDateExpired": "2019-08-24",
- "patriotActNumber": "string"
}, - "controlPerson": {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}, - "owners": [
- {
- "ssn": "string",
- "dob": "2019-08-24",
- "idDocumentFrontUrl": "string",
- "idDocumentBackUrl": "string",
- "firstName": "string",
- "lastName": "string",
- "title": "string",
- "ownershipPercentage": 100,
- "titleCode": "string",
- "usCitizen": true,
- "phone": "string",
- "phoneCountry": "st",
- "address": "string",
- "address2": "string",
- "city": "string",
- "state": "string",
- "postalCode": "string",
- "country": "st",
- "idDocumentType": "drivers_license"
}
], - "processing": {
- "monthlyVolume": 0,
- "averageTicket": 0,
- "highTicket": 0,
- "percentKeyEntered": 100,
- "percentEcommerce": 100,
- "percentMoto": 100,
- "percentSwiped": 100,
- "billPriorToShip": true,
- "shippingLeadTimeDays": 1,
- "prepaymentType": "BALANCE_PAYMENTS_IN_ADVANCED",
- "paymentCollected": 1,
- "businessToBusinessPercent": 100,
- "currentProcessorName": "string"
}, - "notes": "string"
}, - "write_only": {
- "property1": "on_file",
- "property2": "on_file"
}, - "more_info_requests": [
- {
- "text": "string",
- "items": [
- {
- "key": "government_id",
- "kind": "document"
}
], - "requested_at": "2019-08-24T14:15:22Z"
}
], - "merchant": "cm_Ab12Cd34",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "started_via": "api",
}
}A link you hand the application's owner, for your own app to open, good for 48 hours. Send the application first: a session is made only for an application sent to its owner, or one they have joined. The link alone signs nobody in: when the owner opens it we email a 6-digit code to the owner's address, good for 10 minutes (opening the link again sends a new one), and the owner finishes with that code and a password of their own (POST /api/v1/platform/onboarding-sessions/open and /claim). An owner who already has a ZenythPay login is sent to sign in instead. A new session, or a change of the owner's email, ends the application's earlier sessions. url is in this answer only: a replay under the same Idempotency-Key has none, so ask for a new session if you lost it. In sandbox nobody is emailed: url is the sent test application's read-only preview (POST /api/v1/platform/application-previews), good for 48 hours, and it replaces the earlier preview link. A production session needs your company profile and a security method first: until then it answers 403 "Add your company profile and a security method before boarding real merchants." before anything is looked up or made. A login whose email is not verified gets 403 email_not_verified first. Needs a key with applications:write. Every answer is Cache-Control: no-store, private.
| application required | string^app_[0-9A-Za-z]{8}$ Example: app_Ab12Cd34 The application's id, |
| Idempotency-Key | string [ 1 .. 128 ] characters ^[ -~]+$ Optional: a key you choose for one request, so that it can be retried safely. Keys are kept 24 hours, for your account and this environment. A retry with the same key and the same request (the route, the application, the body and any file) answers the first answer again, with |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{
}Your events of the key's environment from the last 30 days, newest first, each exactly as its webhook carried it (id is the ZenythPay-Event-Id header). Test events are never listed. An event about a merchant or an application you may no longer see (its merchant's connection turned off or gone, the application no longer yours) is left out, except a connection's own connection.revoked; so a page may hold fewer events than limit, even none, while pagination.has_more is true. To catch up, follow next_cursor until has_more is false and keep the first page's pagination.checkpoint, which every page of that scan carries. Next time, list with since set to it: you get every event published after it, newest first, including events that failed, arrived out of order or were recorded late, and a new checkpoint. When our team turns a merchant's access back on after that checkpoint, its events that were left out show again below it, so that since answers 422: list again without it, every page, and keep the new checkpoint. Needs a key with events:read. This call names no merchant, so it spends your account's budget for the key's environment and no merchant's. Every answer is Cache-Control: no-store, private.
| limit | integer [ 1 .. 100 ] |
| cursor | string <= 2048 characters The previous page's |
| since | string <= 2048 characters A |
| X-ZenythPay-Environment required | string Enum: "sandbox" "production" Must match both the API credential and its merchant environment. |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "string",
- "api_version": "v1",
- "created_at": "2019-08-24T14:15:22Z",
- "merchant_id": "string",
- "environment": "sandbox",
- "merchant": "string",
- "application": "string",
- "data": {
- "resource": "string",
- "id": "string",
- "location_id": "string"
}
}
], - "pagination": {
- "next_cursor": "string",
- "has_more": true,
- "checkpoint": "string"
}
}