DEVELOPER

iFrame JavaScript SDK Specification

Version 6.3.7

iFrame JavaScript SDK

Authentication

post /auth

This endpoint will return a JSON Web Token (JWT) that should be used with the Authorization header when sending requests that require authorization.

Request Schema
mid required
string
Example:
9999999999999

Loading...

developerKey required
string

Loading...

password required
string

Loading...

Example Request
{
  "mid": "9999999999999",
  "developerKey": "<MY_DEVELOPER_KEY>",
  "password": "<MY_PASSWORD>"
}
Example Response
200 Request Authorized
400 Invalid Post Data
404 Unauthorized Request

Refresh Session

post /auth/refreshSession

This endpoint takes a previously-authorized JWT and creates a new JWT with an extended expiration date. Data stored within the token will stay the same and the user will still have access to the endpoints. To use this function, send a valid JWT through the Authorization header and replace your stored JWT with the token response upon success. This endpoint can only refresh valid JWTs signed by this application. Invalid or expired JWTs are unauthorized and will return as such.

Example Response
200 Valid Token
401 Unauthorized

End Session

get /auth/expireToken

This endpoint logs out of and expires a JWT. This requires a previously-authorized JWT. See the /auth endpoint for more information on obtaining a JWT.

Example Response
200 Request Authorized
401 Unauthorized

Submit Transaction

post /mids/{mid}/gateways/payment

This endpoint is used to submit a one-time or recurring payment. Pass in the information from your payment form including the hidden card-token field. Include the token (JWT) received in the Authentication call.

To create a recurring payment, pass in the additional fields specified in the schema. Omitting these fields will submit a one-time payment.

Request Schema
token required
string

Loading...

amount required
string

Loading...

gateway_public_key required
string
Example:
Your Gateway Public Key

Loading...

transaction_source required
string
Example:
PA-JS-SDK

Loading...

frequency
string
Enum:
daily
weekly
monthly
yearly
Example:
daily

Loading...

start_date
string
Example:
2024-04-02

Loading...

end_date
string
Example:
2024-10-25

Loading...

Example Request
One-Time Payment Request
{
  "token": "123",
  "amount": "1.26",
  "gateway_public_key": "12345",
  "transaction_source": "PA-JS-SDK"
}
Example Response
201 Success
401 Unauthorized. New JWT needed

Get Recurring Transaction Details

get /mids/{mid}/gateways/payment

This endpoint is used to get details about all recurring payments that have been created for a MID. Include the token (JWT) received in the Authentication call.

Example Response
200 Success
401 Unauthorized

Update Recurring Transaction

put /mids/{mid}/gateways/payments/{id}

This endpoint is used to update a recurring payment. Pass in the MID and the recurring payment ID that was returned when the recurring payment was initially created. Include the token (JWT) received in the Authentication call.

Settings that can be updated include the recurring frequency, start date, end date, and transaction amount, but the payment card token that was initially used to create the recurring payment cannot be updated. If a new payment method is needed, a new recurring payment must be started.

Request Schema
amount
string

Loading...

active
boolean
Example:
true

Loading...

frequency
string
Enum:
daily
weekly
monthly
yearly
Example:
daily

Loading...

start_date
string
Example:
2024-04-02

Loading...

end_date
string
Example:
2024-10-25

Loading...

Example Request
{
  "frequency": "daily",
  "start_date": "2034-04-02",
  "amount": "40",
  "end_date": null,
  "active": true
}
Example Response
201 Success
401 Unauthorized

Refund or Void Transaction

post /accounts/{accountId}/transactions

This endpoint will void or refund a transaction. Transactions may be refunded if settlement has occurred or voided if settlement has not occurred. For any Sale or Preauth sent through the Payanywhere SDK, Payanywhere SDK will return the parameter “transactionUniqueId.” The “transactionUniqueId” has the format of “ccs_” followed by several numerical characters. For this request, you will need to parse the “transactionUniqueId” returned by the Payanywhere SDK, removing the “ccs_” portion of that string, and submit the remaining numerical value in the “transaction_id” field for Voids, or the “ccs_pk” field for Refunds.

For example, if the Payanywhere SDK returned “transactionUniqueId=ccs_87654321” then the “transaction_id” or “ccs_pk” for this request would equal “87654321”. Account ID is required to be inserted into this URL. Your Account ID will be returned from the Authentication request. Authorization is required for this endpoint. Use the JWT returned from the Authentication request.

For refunds, you can refund the full amount of the transaction or any amount less than the transaction amount. If you try and refund an amount greater than the transaction amount, a 400 error code will be returned with the message “Bad Request.”

Request Schema
type required
string
Enum:
void
refund

Loading...

transaction_id required
number
Example:
87654321

Loading...

comment
string
Example:
<some comment>

Loading...

username required
string
Example:
user@example.com

Loading...

transaction_source
string
Example:
PA-iOS-SDK|5.10.0-x86_64-12.2

Loading...

ccs_pk
number
Example:
87654321

Loading...

amount
string
Example:
2

Loading...

Example Request
Void Request
{
  "type": "void",
  "transaction_id": 87654321,
  "comment": "<some comment>",
  "username": "user@example.com",
  "transaction_source": "PA-iOS-SDK|5.10.0-x86_64-12.2"
}
Example Response
201 Authorized
401 Unauthorized. New JWT needed
404 Transaction_id not found
©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.