curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/fees/estimate/deposit/card-metadata \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"payment_method_id": "pm_...",
"amount": 75
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
estimate = client.fees.estimate_card_metadata(payment_method_id="pm_...", amount=75)
print(estimate["fee_breakdown"]["total_amount_to_pay"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const estimate = await client.fees.estimateCardMetadata({ paymentMethodId: "pm_...", amount: 75 });
console.log(estimate.fee_breakdown.total_amount_to_pay);
{
"fee_enabled": true,
"card_metadata": { "brand": "visa", "country": "SL", "funding": "debit" },
"fee_breakdown": {
"transaction_amount": "75.00",
"application_fee": "0.75",
"estimated_stripe_fee": "2.18",
"total_fees": "2.93",
"total_amount_to_pay": "77.93",
"net_amount": "75.00"
},
"message": "Fee estimate calculated from card metadata."
}
{
"detail": "Invalid credentials"
}
Fees
Card-Aware Deposit Estimate
Estimate deposit fees using the actual card’s country and brand, from a Stripe payment method.
POST
/
api
/
v1
/
fees
/
estimate
/
deposit
/
card-metadata
curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/fees/estimate/deposit/card-metadata \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"payment_method_id": "pm_...",
"amount": 75
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
estimate = client.fees.estimate_card_metadata(payment_method_id="pm_...", amount=75)
print(estimate["fee_breakdown"]["total_amount_to_pay"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const estimate = await client.fees.estimateCardMetadata({ paymentMethodId: "pm_...", amount: 75 });
console.log(estimate.fee_breakdown.total_amount_to_pay);
{
"fee_enabled": true,
"card_metadata": { "brand": "visa", "country": "SL", "funding": "debit" },
"fee_breakdown": {
"transaction_amount": "75.00",
"application_fee": "0.75",
"estimated_stripe_fee": "2.18",
"total_fees": "2.93",
"total_amount_to_pay": "77.93",
"net_amount": "75.00"
},
"message": "Fee estimate calculated from card metadata."
}
{
"detail": "Invalid credentials"
}
Like estimate deposit, but inspects the real card behind a Stripe
payment_method_id to pick the domestic or international rate automatically — no guessing is_international.
Request Body
string
required
The Stripe payment method ID (
pm_...) of the card to estimate for.number
required
The deposit amount to estimate. Must be greater than 0.
Response
boolean
Whether your application fee applies to deposits.
object
The detected card details (brand, country, funding) used for the estimate.
object
The line items:
transaction_amount, application_fee, estimated_stripe_fee, total_fees, total_amount_to_pay, and net_amount.string
Human-readable summary of the estimate.
{
"fee_enabled": true,
"card_metadata": { "brand": "visa", "country": "SL", "funding": "debit" },
"fee_breakdown": {
"transaction_amount": "75.00",
"application_fee": "0.75",
"estimated_stripe_fee": "2.18",
"total_fees": "2.93",
"total_amount_to_pay": "77.93",
"net_amount": "75.00"
},
"message": "Fee estimate calculated from card metadata."
}
{
"detail": "Invalid credentials"
}
curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/fees/estimate/deposit/card-metadata \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"payment_method_id": "pm_...",
"amount": 75
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
estimate = client.fees.estimate_card_metadata(payment_method_id="pm_...", amount=75)
print(estimate["fee_breakdown"]["total_amount_to_pay"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const estimate = await client.fees.estimateCardMetadata({ paymentMethodId: "pm_...", amount: 75 });
console.log(estimate.fee_breakdown.total_amount_to_pay);