For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get support
HomeDocsAPI ReferenceRelease Notes
HomeDocsAPI ReferenceRelease Notes
  • Payments API
    • POSTRefresh API Keys
    • POSTCharge
    • POSTCapture
    • POSTVoid or Refund
    • POSTCheck Surcharge
    • POSTCreate Hosted Payment Page
    • PUTEdit Hosted Payment Page
    • POSTCreate Vault Payment Account
    • GETGet Vault Payment Account
    • DELDelete a Vault Payment Account
    • PUTUpdate Vault Account Details
    • POSTCreate Billing Plan
    • GETGet Billing Plan
    • DELCancel Billing Plan
  • Authentication (Reporting & Boarding)
    • POSTGet access token
  • Reporting API
    • GETGet transactions data
    • GETGet deposits data
    • GETGet chargebacks data
    • GETGet adjustments data
  • Boarding API
    • GETList merchants
    • POSTCreate a new merchant
    • GETGet a single merchant
Get support
LogoLogo

Check Surcharge

POST
https://javelin.runpayments.io/api/v1/surcharge
POST
/api/v1/surcharge
$curl -X POST https://javelin.runpayments.io/api/v1/surcharge \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "mid": "1234567890",
> "postal": "10001",
> "account_token": "tok_123456789abcdef",
> "amount": "100.00"
>}'
1{
2 "token": "CREDIT",
3 "postal": "NOT_RESTRICTED",
4 "fee_amount": "0.06",
5 "messages": []
6}
Prior to completing a transaction, you can use this endpoint to check if a transaction will incur a surcharge.
Was this page helpful?
Previous

Create Hosted Payment Page

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
midstringRequired
Merchant Account ID
postalstringRequired
Cardholder's postal code
account_tokenstringRequired
Tokenized account number
amountstringOptional
Transaction amount

Response

Successful response with surcharge information
tokenstring
Type of payment method
postalstring
Status of postal code restrictions
fee_amountstring
Surcharge fee amount
messageslist of strings
Any additional messages or warnings

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error