DEVELOPER

Invoicing API



Products

Invoicing API Integration Guide


EnvironmentBase URL
Sandboxhttps://proxy.payanywhere.dev
Productionhttps://proxy.payanywhere.com



How To Start

  1. Sign up for a free North Developer account.
  2. Contact us for Sandbox credentials that can be used to try out this product in a test environment.
  3. Use the guide below or the Postman Collection to build your app. Resources to assist with development are provided here.
  4. When logged in, you can use the Integration Tracker to view the status of your integration, notes from meetings with Integration Engineers, resources related to your solution, and more by clicking the User profile icon in the top right corner of the screen and selecting Integrations.
  5. When development is complete, contact us to certify your integration. Once certified, the merchant or an authorized contact will be able to retrieve Production credentials from the API Access page of your Production Payments Hub account. For more information about using Payments Hub, visit the Help Center.


Server Requirements

Any connections must be made over TLS v1.2 or higher. The following are the supported ciphers:

  • ECDHE-ECDSA-AES128-GCM-SHA256
  • ECDHE-RSA-AES128-GCM-SHA256
  • ECDHE-ECDSA-AES256-GCM-SHA384
  • ECDHE-RSA-AES256-GCM-SHA384

Invoicing API Setup

Steps 1 and 2 are intended to be performed on your server. You may wish to encapsulate them so that your client-side code makes a single request for a payments URL providing order information.


1. Generate an auth token by calling a POST to the following request URL with the headers and payload below:

Method: POST
Request URL: https://proxy.payanywhere.com/auth

Headers:

NameValueDescription
Content-Typeapplication/jsonRequired. Content type of message. For most messages, this will be the default.
Content-Length1234Required. This value should be set to the exact length of the message body you are sending.
x-nabwss-appsourcepa_isv_1234567890abcRequired. This value is specific to each individual API account. For example, ISVs selling an application to multiple companies would use a different value for each company. Similarly, if a user has multiple accounts (MIDs) with us, the value for the x-nabwss-appsource header would be different for each MID.

Request body:

{
  "mid": "Your MID",
  "developerKey": "Your Developer Key",
  "password": "Your Auth Password"
}

JSON response:

{
  "accountId": "Account ID",
  "mid": "Your MID",
  "token": "JWT"
}



2. Use the token and accountId received from the previous call to post a request for a hosted payments page.

Method: POST
Request URL: https://proxy.payanywhere.com/accounts/<ACCOUNT_ID>/invoices

Headers:

NameValueDescription
Content-Typeapplication/jsonRequired. Content type of message. For most messages, this will be the default.
Content-Length1234Required. This value should be set to the exact length of the message body you are sending.
AuthorizationBearer Required. should be replaced with the JSON web token received from the latest authorization.
x-nabwss-appsourcepa_isv_1234567890abcRequired. This value is specific to each individual API account. For example, ISVs selling an application to multiple companies would use a different value for each company. Similarly, if a user has multiple accounts (MIDs) with us, the value for the x-nabwss-appsource header would be different for each MID.

Request body:

{
  "type": "ondemand | preauth",
  "qrcode": false,
  "invoice": {
    "latitude": 42.5304064,
    "longitude": -83.111936,
    "customer": {
      "first_name": "Danny",
      "last_name": "Sandi",
      "email_addresses": [
        "dsandi@nabancard.com"
      ]
    },
    "name": "NAME",
    "description": "DESCRIPTION",
    "number": "12345",
    "due_date": "2019-09-10",
    "send_date": "2019-09-09T04:00:00.000Z",
    "amount": 78.50,
    "tax_rate": 10,
    "service_fee_enabled": false
  }
}

ParameterDescription
latitudeOptional
longitudeOptional
customerOptional
first_nameOptional
last_nameOptional
email_addressesOptional
nameProduct name
descriptionProduct description
numberInvoice number
due_dateUse current date
send_dateUse current date
amountAmount in dollars
tax_ratePercent
service_fee_enabledOptional boolean value that enables or disables the service fee (also referred to as Cash Discount) on a per transaction basis. The Cash Discount value is set at the account level at the time the merchant account is created, and is either a percentage or a fixed dollar amount. If Cash Discount is enabled at the account level, even if the service_fee_enabled parameter is not included in a request, Cash Discount will still be applied unless service_fee_enabled is passed with a value of false. This enables Cash Discount to be turned off on a per transaction basis. If Cash Discount is disabled at the account level, the service_fee_enabled flag will be ignored at all times. To view the Cash Discount setting associated with your account, log into the Payments Hub Merchant Portal and navigate to the Cash Discounting section.


JSON response:

{
  "url": "https://www.paymentshub.com/pay-now?token=<TOKEN>"
}



3. Present the URL received in the previous step to the user in an iFrame or separate browser window. From there, the user can enter their credit card information and click “Pay Now.”

Those using an iFrame will need to provide us with the following information:

  • MID(s) that want to use an iFrame.
  • Domain Names (DNS) for the merchant's website.


4. Let us know if you would like us to set up a webhook so your server can be notified when a payment is approved or declined. The following information will be required to set up the webhook:

  • MID(s) to enable the webhook on.
  • The full URL which North will post the payment result to. This must be on HTTPS and the site must use a certificate from a CA (not self-signed) in order to work.

Your endpoint should be configured to receive a payload that looks like the following:

{
  "unique_id": "ccs_324349",
  "auth_code": "016883",
  "amount": 1.29,
  "status": "APPROVED",
  "is_partial_auth": false,
  "requested_amount": 1.29,
  "parent_id": "",
  "receipt_id": 565524,
  "bric": "",
  "signature_id": null,
  "invoice_number": "19079",
  "extra": []
}

ParameterDescription
unique_idUnique ID for this transaction, provided by Payanywhere. You can use this field in the Payanywhere system to track your transaction
auth_codeAuth code for this transaction
amountAuthorized charged amount that was applied on this transaction
statusEither “APPROVED” or “DECLINED”
is_partial_authA partial auth transaction occurs when you try to charge a card a certain amount, i.e. $20, but that card has only a portion of that amount available, i.e. $15, and your transaction is partially approved with $15. For example, this could occur with a gift card
requested_amountRequested charge amount
receipt_idReceipt ID
bricThis will be your token
invoice_numberAn invoice id provided by you. You can use this id to match between a transaction request that was sent by your web app and a transaction response that will be sent to your external notification URL
©2025 North is a registered DBA of NorthAB, LLC. All rights reserved. North is a registered ISO of BMO Harris Bank N.A., Chicago, IL, Citizens Bank N.A., Providence, RI, The Bancorp Bank, Philadelphia, PA, FFB Bank, Fresno, CA, Wells Fargo Bank, N.A., Concord, CA, and PNC Bank, N.A.