Merchant API Keys

The Merchant API is intended for businesses that need direct access to Stax Pay for payment processing, invoicing, and managing transactions. It is suitable for merchants who want to automate their payment workflows, integrate payments into their software, or provide customers with more convenient payment options.

Merchant API Keys

The Merchant API is intended for businesses that need direct access to Stax Pay for payment processing, invoicing, and managing transactions. It is suitable for merchants who want to automate their payment workflows, integrate payments into their software, or provide customers with more convenient payment options.

Getting Started with Merchant API Keys

Understanding API Key Types

It's important to understand the distinction between different API types in the Stax ecosystem:

Partner API

Used primarily for registration and enrollment processes. Essential for partner developers managing multiple merchants.

Merchant API

Used for most operational functions, such as managing transactions, customer data, and invoices. Your primary tool for day-to-day operations.

Important: Partner developers must use both APIs to perform various tasks effectively, with each serving specific purposes in the integration workflow.

Managing Merchant API Keys

Best Practices for Partners

To effectively manage merchant data, it is recommended that partner developers:

  1. Save merchant data systematically - Store every merchant and their corresponding Merchant API key in your database for easy access
  2. Use programmatic access - Alternatively, reference Merchant API keys using the List API Keys for Merchant endpoint
  3. Monitor key changes - Be aware that if an API key for a given merchant (MID) changes, it must be updated manually in your database

This distinction is critical to maintaining seamless integration, especially for larger partners building an enrollment flow.

Connecting with Webhooks

You can configure webhooks via the API to be notified about events that happen in your account. Generally, this will be the same result as a GET call performed.

For example the payload of create_transaction webhook will have the same payload of GET transaction/id

Note: This is only for what webhooks are available and how to create them. A service such as webhook.site can be used to create custom webhooks

WebhookDescription
create_customerA customer is created. Returns Customer object.
create_depositA settlement is processed. The payload of the webhook contains the settlement record. The external_id is the connector between the deposit record and the deposit details. This webhook DOES fire in the sandbox, but in the sandbox environment, the external_id will not match the batch_id - in the sandbox, you can use this webhook as a notification and build your system to call out to the merchant's deposit APIs to get the latest deposit details.
create_disputeA dispute is created. Returns dispute object. Dispute includes the associated transaction_id.
create_invoiceAn invoice is created, which includes invoices created by an invoice schedule. Returns invoice object.
create_itemAn item is created.
create_scheduled_invoiceAn invoice schedule is created. Returns Invoice Schedule.
create_transactionA transaction is created, including those made with Stax.js. Returns transaction object.
create_userA user is created.
create_webhookA webhook is created.
delete_itemAn item is deleted.
delete_scheduled_invoiceAn invoice schedule is deleted.
delete_webhookA webhook is deleted.
update_itemAn item is updated.
send_invoiceAn invoice is sent via email or text.
set_brandingBranding is set.
set_gatewayA gateway is set.
set_planA plan is set.
update_customerA customer is updated.
update_disputeA dispute is updated. Returns dispute object.
update_invoiceAn invoice is updated.
update_scheduled_invoiceAn invoice schedule is updated.
update_transactionA transaction is updated. Returns transaction object.
update_userA user is updated.
update_payment_methodA payment method is updated. With the auto updater, if a payment method is updated by Stax to reflect updated information from the card brands.
update_transaction_settledAn ACH transaction has either settled or not settled. Returns the original transaction object. If the transaction is settled, the settled_at date will be populated. If the transaction was clawed back, the transaction's child_transactions array will include the associated void transaction.
fee_statement_readyReceive a notification through the webhook indicating that my statement is ready

Merchant Enrollment Webhooks

WebhookDescription
update_underwritingMerchant registration's underwriting status(es) are updated.
update_merchant_statusMerchant status has changed.
update_electronic_signatureThe merchant signer has signed their merchant application.

Webhooks provide real-time notifications about merchant transactions and events, creating a complete integration ecosystem when combined with your Merchant API keys.

Integration Examples

If you use WooCommerce and want to connect to your NMI gateway for API-based account connections:

  1. Install the WooCommerce NMI Plugin from the WooCommerce website
  2. Log in using your NMI account access (the account must have API permissions)
📘

Recommendation: Create a separate user account on your NMI gateway specifically for API use.

This integration approach simplifies your setup and provides a cost-effective way to manage your integration while offering more options and functionality than simple payment links.

Next Steps

With your Merchant API keys configured, you can start building powerful payment solutions:

Ready to implement? Check out our API reference documentation to start building with your Merchant API keys.