# Apply surcharge A surcharge is an additional fee you can add to credit card payments to help you offset the cost of processing. Surcharges are permitted by Visa and Mastercard in the United States, subject to certain exceptions and strict guidelines. > **Note** > > This feature is available for merchants in the United States only. --- ## Before you start To apply a surcharge, you must comply with the following: - Ensure surcharges are allowed in your state. - Follow state and local laws. - Only credit card payments are eligible. - The surcharge amount must not exceed your cost of acceptance for the credit card. - Disclose the surcharge amount on the receipt and at the checkout. This ensures that the cardholder is fully aware of the total cost of the transaction and the surcharge applied. To enable surcharging, contact your account manager or [request support](https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&issue=issue_account_changes). --- ## Apply a surcharge When you call the [Request a payment or payout](https://api-reference.checkout.com/tag/Payments/#operation/requestAPaymentOrPayout) endpoint: - Provide the `processing.surcharge_amount` field. - Ensure that the total amount includes the surcharge. For partial captures, you must also include the surcharge amount in the capture request. If the surcharge amount is applied in the payment request but not in the partial capture, the surcharge is not submitted to the card scheme. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/payments` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments` ### Request example ```json { "source": { "type": "card", "number": "4010050999999999904", "expiry_month": 12, "expiry_year": 2026 }, "amount": 10100, "currency": "USD", "processing": { "surcharge_amount": 100 } } ``` ### Response example If the authorization was: - Successful – The `approved` field in the response returns `true`: `"approved": true`. - Unsuccessful – The payment may have used an invalid or expired card, or a valid card with insufficient funds. If you received a `202` response, the payment is asynchronous and requires a redirect. For example, if the payment requires 3D Secure. > **Information** > > For more information about the response, see also: > > - [API response codes](https://www.checkout.com/docs/resources/codes/api-response-codes.md) – For unsuccessful authorizations > - [AVS codes](https://www.checkout.com/docs/resources/codes/avs-codes.md) > - [CVV codes and descriptions](https://www.checkout.com/docs/resources/codes/cvv-response-codes.md) The `status` field can have the following values: - `Authorized` - `Card Verified` - `Captured` - `Declined` - `Paid` - `Pending` – 3D Secure payments only **201 Created** ```json { "id": "pay_mbabizu24mvu3mela5njyhpit4", "action_id": "act_mbabizu24mvu3mela5njyhpit4", "amount": 10200, "currency": "USD", "approved": true, "status": "Authorized", "auth_code": "770687", "response_code": "10000", "response_summary": "Approved", "3ds": { "downgraded": true, "enrolled": "N" }, "risk": { "flagged": true }, "source": { "type": "card", "id": "src_nwd3m4in3hkuddfpjsaevunhdy", "billing_address": { "address_line1": "123 Anywhere St.", "address_line2": "Apt. 456", "city": "Anytown", "state": "AL", "zip": "123456", "country": "US" }, "phone": { "country_code": "+1", "number": "555 123 4567" }, "last4": "9904", "fingerprint": "F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832", "bin": "424242" }, "customer": { "id": "cus_udst2tfldj6upmye2reztkmm4i", "email": "john.smith@example.com", "name": "John Smith" }, "processed_on": "2024-09-10T10:11:12Z", "reference": "ORD-5023-4E89", "processing": { "retrieval_reference_number": "909913440644", "acquirer_transaction_id": "440644309099499894406" }, "eci": "06", "scheme_id": "489341065491658", "links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4" }, "action": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions" }, "void": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/voids" }, "capture": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/captures" } } } ``` **202 Accepted Payment asynchronous / further action required** ```json { "id": "pay_mbabizu24mvu3mela5njyhpit4", "status": "Pending", "reference": "ORD-5023-4E89", "customer": { "id": "cus_y3oqhf46pyzuxjbcn2giaqnb44", "email": "john.smith@example.com", "name": "John Smith" }, "3ds": { "downgraded": false, "enrolled": "Y" }, "instruction": { "value_date": "2024-08-25" }, "_links": { "self": { "href": "https://{prefix}.api.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4" }, "redirect": { "href": "https://{prefix}.api.checkout.com/3ds/pay_mbabizu24mvu3mela5njyhpit4" } } } ``` **422 Unprocessable Content** ```json { "request_id": "0HL80RJLS76I7", "error_type": "request_invalid", "error_codes": ["payment_source_required"] } ```