Calculate a surcharge
Calculate a surcharge for a new or existing transaction.
This an upsert endpoint, that will update an existing transaction with a new calculation if the transactionId is provided.
HINT: Calculation errors indicate issues with your integration and potential misuse of the surcharge calculation endpoint - These should be addressed immediately, and should never occur in production.
Calculate a surcharge for a new or existing transaction.
This an upsert endpoint, that will update an existing transaction with a new calculation if the transactionId is provided.
HINT: Calculation errors indicate issues with your integration and potential misuse of the surcharge calculation endpoint - These should be addressed immediately, and should never occur in production.
Path Parameters
Either the account.id or external identifier for a merchant account.
This can be used by a platform account to perform actions on behalf of a merchant account.
NOTE: This will be ignored if the request is not made by a registered platform account.
Request Body
The pre-tax subtotal amount that will be charged to the customer.
Surcharges should not be calculated on tax so this amount cannot include any taxes that are being collected.
This should be represented in the lowest currency denomination (e.g. if currency is usd, then amount is in cents).
e.g. 10000 (for $100.00 USD)
10000Three-letter ISO currency code (e.g., usd).
Defaults to usd if not provided.
Must be a supported currency
usdPayment processing vendor name.
Supported values:
- adyen
- auth_net
- bluesnap
- braintree
- chase
- checkout_com
- cybersource
- elavon
- fiserv
- global_payments
- helcim
- mollie
- paypal
- paysafe
- square
- stripe
- tsys
- worldpay
- csg_forte
adyenThe payment method being used by the customer.
Supported values:
- acss_debit
- affirm
- afterpay_clearpay
- alipay
- alma
- amazon_pay
- au_becs_debit
- bacs_debit
- bancontact
- billie
- blik
- boleto
- card
- card_present
- cashapp
- customer_balance
- eps
- fpx
- giropay
- grabpay
- ideal
- interac_present
- kakao_pay
- klarna
- konbini
- kr_card
- link
- mobilepay
- multibanco
- naver_pay
- nz_bank_account
- oxxo
- p24
- pay_by_bank
- payco
- paypal
- pix
- promptpay
- revolut_pay
- samsung_pay
- satispay
- sepa_debit
- sofort
- swish
- twint
- us_bank_account
- wechat_pay
- zip
cardCard Bin - The first 6 or 8 digits of the card number.
(8 digit bins are preferred for accurate surcharging - If a 6 digit bin has overlap it may result in a zero value surcharge calculation)
bin can be provided to improve the accuracy of surcharge calculations, and is required to compliantly calculate a surcharge in some jurisdictions.
It can also be provided in lieu of cardBrand and cardFunding.
(Note: If cardBrand and cardFunding are provided, these will always supersede the card brand and card funding type from a card bin lookup)
The brand of the card being used by the customer.
Supported values:
- amex
- diners
- discover
- eftpos_au
- jcb
- link
- mastercard
- unionpay
- visa
- american_express
amexThe funding source for the card being used by the customer.
Supported values:
- credit
- debit
- prepaid
creditThis should be derived from the location of the customer.
Two-letter Alpha-2 ISO country code (e.g., US)
This location may differ depending on the nature of your business and what is being paid for.
For invoices this may be the billing or shipping address on the invoice.
In some cases, it can be the billing address associated with the payment method.
Defaults to US if not provided.
USThis should be derived from the location of the customer.
For US states, use two-letter ISO state code (e.g., WA)
This location may differ depending on the nature of your business and what is being paid for.
For invoices this may be the billing or shipping address on the invoice.
In some cases, it can be the billing address associated with the payment method.
NOTE: If a stateProvince is not provided, then it will be derived from the postal code instead. However, providing a stateProvince is recommended for more accurate surcharge calculations.
WAThis should be derived from the location of the customer.
RECOMMENDED: Please use the stateProvince for the most accurate surcharge calculation.
The postal code should be derived from the location of your patron.
This location may differ depending on the nature of your business and what is being paid for.
For invoices this may be the billing or shipping address on the invoice.
In some cases, it can be the billing address associated with the payment method.
NOTE: The postal code will only be used if a stateProvince is not provided.
98039This should be derived from the location of the card issuer.
Two-letter Alpha-2 ISO country code, (e.g., US).
Defaults to US if not provided.
USWhen requesting a new surcharge calculation for an existing transaction, the transaction ID returned from the initial calculation must be provided.
For example, if the patron changes their payment method then a new calculation should be performed using the same transaction ID.
txn_####Optional location for the merchant of record.
This is for cases where a merchant account might have multiple locations.
If this is not provided, then the calculation will use the location of the merchant that is configured for the account.