Skip to main content

How to Add Online Payment to Your Website

What you need before you can take payments online

To accept payments on your website, you need three separate pieces in place: a way to collect payment information (a payment form), a way to process that information securely (a payment processor), and a business bank account to receive the money. You cannot skip any of these, and the order matters—you set up the processor first, then build or install the form on your website, then connect them together.

The payment processor is the company that actually handles the transaction. They charge a fee (usually between 2% and 3% of each payment, plus a small flat fee per transaction), verify the customer's card or bank account is real, and move the money into your business account. Common processors include Stripe, Square, PayPal, and Authorize.net. Each one has different setup requirements, different fees, and different tools for your website.

Your website itself does not process payments—it only displays the form and sends the information to the processor. If you use a website builder like Shopify, Wix, or WordPress with a plugin, that builder often has payment processors already built in. If you built your site from scratch or use custom code, you will need to integrate a processor yourself or hire a developer to do it.

Key Takeaways

  • You need a payment processor (Stripe, Square, PayPal, or similar), a payment form on your website, and a business bank account—all three are required before you can accept payments.
  • Website builders like Shopify and Wix have payment processors built in; custom websites require you to integrate one yourself or hire a developer.
  • Payment processors charge a percentage of each transaction (usually 2–3%) plus a small flat fee, and they handle the security and verification.
  • Your payment form must be on a secure page (HTTPS, not HTTP) and should never store card information on your own server.
  • Set up the processor account first, get your API keys or merchant ID, then install the form on your website and test it before going live.

Choosing a payment processor for your website

The processor you choose depends on your website platform, how much you plan to charge, and whether you want to handle subscriptions or one-time payments. If you use Shopify, Wix, Squarespace, or another hosted website builder, the processor is often already available—you just turn it on and connect your bank account. Shopify uses Shopify Payments by default but also supports Stripe and Square. Wix includes Wix Payments. WordPress sites can use WooCommerce with Stripe, Square, or PayPal.

If you built your website with custom code or a framework like React or Node.js, you have more freedom but also more work. Stripe and PayPal are the most developer-friendly because they have detailed documentation and code examples. Square is simpler for small businesses and has good phone support. Authorize.net is older and more common in enterprise settings.

Compare processors on three things: transaction fees (the percentage and flat fee per payment), setup fees (some charge nothing, some charge $20–$100), and what happens if you stop using them (some let you export your customer list, some do not). Read the fee schedule on their website before you sign up—fees vary by payment method (credit card, debit card, ACH bank transfer) and by country.

Setting up your payment processor account

Sign up for an account on the processor's website using your business email address. You will need to provide your business name, your address, your tax ID (EIN), and your business bank account number. The processor uses this information to verify you are a real business and to know where to send the money you collect.

After you submit your information, the processor will review it—this usually takes one to three business days, though some processors do it instantly. Once approved, you will receive an API key (a long string of characters that lets your website talk to the processor) or a merchant ID (a number that identifies your account). Save this somewhere safe; you will need it to connect your website to the processor.

Some processors also ask you to verify your bank account by depositing two small amounts (usually under $1 each) and then telling them what those amounts were. This proves you own the account. Once verified, payments will go into that account automatically, usually within one to two business days.

Installing a payment form on your website

If you use a website builder, the payment form is usually already there—you just need to turn it on. In Shopify, go to Settings > Payments and select your processor. In Wix, go to Monetization > Payment Options. In WordPress with WooCommerce, install the plugin for your processor (like WooCommerce Stripe Gateway) and enter your API key.

If you built your website with custom code, you have two options: use a pre-built form from your processor (called a "hosted form" or "payment page"), or embed a form directly on your website. A hosted form is simpler—you create a link on your processor's dashboard, and customers click it to pay on a page the processor controls. An embedded form (like Stripe's Checkout or PayPal's Smart Payment Buttons) sits on your own website but still sends the payment information directly to the processor, never through your server.

Never build your own form that collects card information and sends it to your server. This creates a security risk and makes you responsible for PCI compliance (a set of security rules for handling card data). Always use a form provided by your processor or hire a developer who knows how to do this correctly.

Testing your payment form before customers use it

Every payment processor provides test card numbers that let you run fake transactions without charging anyone. Use these to make sure your form works, that the payment goes through, and that the money appears in your processor's dashboard. Common test card numbers are 4242 4242 4242 4242 (Visa) and 5555 5555 5555 4444 (Mastercard); your processor's documentation will list others.

Process a test payment from start to finish: fill out the form, submit it, and check that you see a confirmation message on your website. Then log into your processor's dashboard and verify the transaction appears there. Check that your bank account is linked correctly and that you can see where the money will go.

Test with different payment methods if your processor supports them—credit card, debit card, and ACH bank transfer all behave differently. Test on mobile too; many customers pay on their phones, and a form that works on a desktop might be broken on a small screen. Once everything works, switch your processor account from test mode to live mode, and your website will start accepting real payments.

Security and compliance for online payments

Your website must use HTTPS (not HTTP) to accept payments. HTTPS encrypts the information traveling between your customer's browser and your server, so no one can intercept it. Most website hosts provide free HTTPS certificates now, and many website builders include it automatically. If your site does not have HTTPS, your payment form will not work, and customers will see a warning that the site is not secure.

You are also responsible for telling customers how you handle their information. Create a privacy policy that explains what data you collect, how long you keep it, and who can see it. You do not need to store card information yourself—your processor does that—but you do need to tell customers that the processor stores it. If you collect email addresses or phone numbers, say so in your privacy policy.

If you process more than a certain amount of money per year (the threshold varies by processor and country), you may need to comply with PCI DSS, a security standard for payment card data. Most processors handle this for you if you use their hosted forms or embedded payment buttons. If you build your own form, you become responsible for PCI compliance, which is expensive and complicated. This is another reason to use a form provided by your processor.

What happens after a customer pays

When a customer submits a payment, the processor verifies the card or bank account, checks for fraud, and either approves or declines the transaction. This usually takes a few seconds. If approved, the customer sees a confirmation message on your website, and you should send them a receipt by email. If declined, they see an error message and can try again.

The money does not appear in your bank account immediately. Most processors hold the money for one to two business days before depositing it. This is called the settlement period. During this time, the processor is verifying that the transaction is real and that the customer will not dispute it. Once the settlement period ends, the money moves into your business bank account.

You can see all your transactions in your processor's dashboard—how much was paid, when, by whom, and whether it succeeded or failed. Most processors also send you a report by email each day or week. Keep these records for your taxes and for customer service (if a customer says they paid but you did not receive it, you can look it up in the dashboard).

Common problems and how to fix them

If your payment form is not showing up on your website, check that you installed the code correctly. Copy the code from your processor's dashboard exactly as written, and paste it into the right place on your website (usually in the HTML of the page where you want the form to appear). If you use a website builder, make sure you turned on the payment feature in the settings. If the form is there but not working, clear your browser cache and try again in a different browser.

If payments are being declined, check that your processor account is in live mode, not test mode. Test mode accepts only test card numbers. Also check that your bank account is verified and linked to your processor account. Some processors will not process real payments until your bank account is confirmed. If a customer's card is declined, it usually means the card is expired, the address does not match, or the card issuer flagged it as suspicious. The customer will see an error message and can try a different card.

If money is not appearing in your bank account, wait for the settlement period to end (usually one to two business days). Then log into your processor's dashboard and check that the transaction shows as settled, not pending. If it is still pending after three days, contact your processor's support team. If the transaction shows as settled but the money is not in your bank account, contact your bank—the money may have been sent to the wrong account or held up by a fraud filter.

Frequently Asked Questions

Do I need a business license to accept payments on my website?

Requirements vary by location and what you are selling. Most payment processors require you to have a business tax ID (EIN in the US) and a business bank account, but not necessarily a formal business license. Check your local government's website or contact a small business advisor in your area to find out what you need.

Can I accept payments without a website?

Yes. You can use a payment processor's hosted payment page (a link you send to customers), a service like Square Cash or PayPal.me (a personal payment link), or a simple form on a free website builder. You do not need a full website to collect money online.

What payment methods should I accept?

Credit cards (Visa, Mastercard, American Express) are the most common. Many processors also support debit cards and ACH bank transfers. ACH is cheaper for you (lower fees) but slower for the customer (takes a few days). Offer credit card at minimum; add ACH if you want to reduce fees on large payments.

How much does it cost to add payment to my website?

Most processors charge no setup fee and no monthly fee. You pay only when you process a payment: usually 2–3% of the amount plus $0.30 per transaction. Some processors have monthly minimums or monthly fees if you process a lot of money. Read the fee schedule before you sign up.

What if a customer disputes a charge?

The customer contacts their bank or card issuer and claims the charge was unauthorized or the product did not arrive. The processor then asks you for proof that the transaction was legitimate (an order confirmation, a shipping receipt, or a signed contract). If you provide proof, you usually keep the money. If you do not respond or cannot prove the transaction was real, the money is refunded to the customer and you may be charged a dispute fee.