Get the sales-tax / VAT rate for a ship-to address
/tax/calculateReturns the tax rate (a fraction, e.g. 0.07 = 7%) for a ship-to address, computed with our own engine - the same combined state + county + city + district rate (statutory VAT outside the US) that the post-payment verifier uses.
How to use it
- Send the buyer's
shipping_address(address only - no items or amounts). - We return
tax_rate. - Compute
tax = round(tax_rate × taxable_base), where the base is the items subtotal (net of discounts) + shipping, only where the destination taxes freight. - Display the computed tax to the buyer as its own labeled line item (for example "Tax" or "VAT") in the checkout totals before payment - do not fold it silently into the grand total. The buyer must be able to see the amount they are being charged as tax.
- Charge the buyer, then send that same tax back on the order in
merchant_supplied_totals.tax_cents.
Because the quote and the post-payment verification run the same engine, charging this number means no tax-shortfall correction is applied to your payout. A tax-free destination returns tax_rate: 0 - collect no tax.
override_enabled tells you whether PeptidesPayment expects to apply this tax for you: false means your store is configured to compute its own tax, so leave your own tax in place and ignore tax_rate. It is true for every other store (including tax-free destinations, where tax_rate is 0).
Authorization
ApiKeyAuth Your API key, issued by PeptidesPayment. Send it in the x-api-key header. Keep it server-side and never expose it in browser code.
In: header
Header Parameters
Your merchant id, supplied by PeptidesPayment at integration time.
Request Body
application/json
Request body
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/tax/calculate" \ -H "x-merchant-id: string" \ -H "Content-Type: application/json" \ -d '{ "shipping_address": { "address_1": "1 Main St", "city": "Miami", "province": "FL", "postal_code": "33101", "country_code": "US" } }'{ "quote_id": "string", "tax_rate": 0, "jurisdiction": "string", "override_enabled": true}Charge a card for a cart POST
Charges the buyer's card for a cart using a secure card reference collected by the checkout form, together with the billing details and the cart id. PeptidesPayment loads the cart, selects a payment route, and retries automatically on a soft decline. Declined payments (a hard failure, a soft failure, or a pending result) return HTTP 200 with a `status` field describing the outcome. Only validation or configuration errors return a non-2xx response.
Report your order id for a Payment Container order POST
After a `payment.container.succeeded` event, create the order on your platform, then call this endpoint with your new order id. PeptidesPayment records it so later events (`payment.container.refunded`, `payment.container.chargeback_*`) echo it back for correlation. **Authentication.** HMAC-SHA256 over the raw request body using your webhook signing secret. Send `X-Signature: sha256=<hex>` and `X-Timestamp: <unix seconds>`. **Idempotency.** Posting the same order id twice returns 200 with status `noop`. Posting a different value for an order that already has one returns 409 and does not overwrite.