=== Sell Ads Plugin - Sell Ad Space as Monthly Subscription ===
Contributors: wpflamingojoe
Tags: ads, adsense, ad manager, ads.txt, amp
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.0
Stable tag: 1.8.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl.html

Sell your ad space directly as a monthly subscription: no ad network, you set the price, you keep the revenue.

== Description ==
You want to sell ads? Do you want to sell your ad space easily, directly and without any advertising network? This is exactly the solution of Sell Ads Plugin:

* Rent out advertising space monthly.
* Sell ads directly to advertisers.
* Set the price for your advertising yourself.
* Shady advertisements can simply be rejected.
* Gives website owners control back over what they advertise and their price.
* Try the whole thing first: test mode lets you click through every step without setting up Stripe.
* Get an e-mail the moment someone pays for an ad space, so a sale never sits unnoticed in your dashboard.
* Revolutionizes the way advertising can be sold on WordPress.

👉 TEST the plugin on our [Demo website](https://cybie.de/demo)

#### PROBLEMS SOLVED BY THE SELL ADS PLUGIN

All features of Sell Ads are designed only to help you to sell your valuable ad space monthly, simple and safe. Sell Ads gives you:

* Finally no need of low-paid ad networks anymore.
* Opportunity to earn more money from direct advertising sales.
* Anyone can now sell advertising space.
* Advertisers pay securely through Stripe with credit card, Apple Pay and more.
* Payments go straight into your own Stripe account. Use your own Stripe API key and pay us nothing at all, or connect with Stripe in one click and pay a 7 % Sell Ads fee.
* Website  can benefit from secure and long-term advertising revenues.
* New website owners, small blogs or million-user platforms can now easily and instantaneously sell advertising.

#### WHO SELL ADS IS FOR

* **Blogs and niche sites with a loyal audience.** If your readers care about one subject, that space is worth far more to the right advertiser than an ad network will ever pay you for it.
* **Small and new websites.** Ad networks turn you away below a certain traffic level. Here there is no minimum: if one advertiser thinks your page is worth it, you have a sale.
* **Anyone tired of being paid per thousand views.** A monthly subscription is planned income that does not move with the season or with someone else's algorithm.
* **Site owners who want to stay in control.** You set the price, you see every ad before it goes live, and you can reject or cancel anything at any time.
* **Publishers who care about page speed and privacy.** Ads sold here are a plain image and a link. No third-party ad scripts, no tracking cookies, nothing loading from an ad network.
* **Developers and agencies.** Place an ad space anywhere with a shortcode or a single function call in the theme, and hand the finished setup to your client.
* **Newsletters, magazines, local portals and clubs** that already know their advertisers by name and only need a way to take the money every month.

#### WHAT MAKES SELL ADS DIFFERENT

* **You can keep 100 % of the price you set.** With your own Stripe API key the plugin takes no commission and no revenue share — only Stripe's own processing fees apply. If you would rather not deal with API keys, connect with Stripe in one click instead and a 7 % Sell Ads fee applies on top of Stripe's fees. The choice is yours and you can switch at any time.
* **The money goes to your own Stripe account.** Not to us, not to a network that pays out sixty days later.
* **No ad network in the middle.** No revenue share, no rules about what counts as acceptable content, no waiting to reach a payout threshold.
* **It runs itself.** The advertiser pays, uploads the banner and the link, and gets a self-service link to cancel — all without a single e-mail back and forth with you.
* **Try everything before you sign up anywhere.** Test mode walks you through every step, including the buyer's side, without a Stripe account and without taking a payment.
* **Nobody is left waiting.** You get an e-mail the moment someone pays, and any request you do not answer within 14 days has its subscription cancelled automatically, so an advertiser never keeps paying month after month for a space that never went live.

#### FEATURES

* Sell any number of ad spaces as a recurring monthly subscription through Stripe.
* Set your own price and currency per ad space, plus your own headline and button text.
* Place an ad space with the `[wpsap_ads id="…"]` shortcode or with `wpsap_show( id )` anywhere in your theme.
* Two ways to take payments: your own Stripe API key (no fee from us) or Connect with Stripe in one click (7 % Sell Ads fee).
* Test mode: click through the whole plugin, buyer's side included, with no Stripe account and no payment.
* Buyers pay by credit card, Apple Pay, Google Pay and the other methods you have enabled in Stripe.
* After paying, the buyer uploads the banner and the target link themselves — the pages for this work on a phone as well as on a desktop and keep their look in every theme.
* Review every ad before it appears: accept, reject, or publish it from your dashboard.
* An e-mail reaches you as soon as a payment is confirmed. On by default, to any address you like, sent through whatever this site already uses for e-mail, so an SMTP plugin is picked up automatically.
* Requests left unanswered for 14 days are cancelled automatically, so nobody keeps paying for a space that never went live.
* Buyers can cancel themselves at any time through the Stripe billing portal — and so can you, from the WordPress dashboard.
* Every order in one list with its status, the amount paid, and the buyer's e-mail address.
* Link your own Terms of Service, Uploading Policy and Cancel Policy pages, and add your own notes to the upload page, the thank-you page and Stripe's payment page.
* No third-party ad scripts and no tracking cookies are added to your site — an ad is an image and a link.
* No account with us, no registration, no external dashboard.

#### HOW THE SELL ADS PLUGIN WORKS

Sell Ads gives you:

1. Visit the plugins page within your dashboard and select ‘Add New’.
1. Search for ‘Sell Ads’.
1. Activate Sell Ads from your Plugins page.
1. Select "Sell Ads" in the Menu.
1. Choose how you take payments: enter your own Stripe secret key and webhook secret, or click "Connect with Stripe".
1. Create your advertising campaign.
1. Place your campaign where you want to sell advertising space.
1. Buyer pays, uploads advertisement and product link.
1. Request is sent to your dashboard.
1. Buyer receives a link to the Stripe billing portal and can cancel at any time.
1. If you accept the request, you can post the ad.
1. Also the Site owner can cancel in wordpress dashboard at any time.
1. This monthly advertising deal remains active until one of the two parties cancels.
1. Requests you do not answer within 14 days are cancelled automatically.

== Installation ==
### INSTALL SELL ADS PLUGIN FROM WITHIN WORDPRESS

1. Visit the plugins page within your dashboard and select ‘Add New’;
1. Search for ‘Sell Ads’;
1. Activate Sell Ads from your Plugins page;
1. Go to ‘after activation’.

### INSTALL SELL ADS PLUGIN MANUALLY

1. Upload the ‘wp-sap’ folder to the /wp-content/plugins/ directory;
1. Activate the Sell Ads plugin through the ‘Plugins’ menu in WordPress;
1. Go to ‘after activation’.

### AFTER ACTIVATION

1. Select "Sell Ads" in the Menu;
1. If you just want to look around first, set the mode to "Test mode" — you can then click through
the entire process without setting up Stripe. Switch to "Live" whenever you are ready;
1. Choose one of the two ways to take payments (you can switch at any time):

**Option A — your own Stripe key.** Free of any fee or commission on our side.

1. Open the settings page and paste your Stripe secret key (Stripe Dashboard → Developers → API keys);
1. Add a webhook endpoint in your Stripe Dashboard pointing to the URL shown on that settings page, subscribe to the events "checkout.session.completed", "customer.subscription.deleted" and "invoice.payment_failed", then paste the signing secret back into the settings;

**Option B — Connect with Stripe.** No API key and no webhook setup; a 7 % Sell Ads fee is deducted from each payment.

1. Pick the country your business is registered in and click "Connect with Stripe";
1. Complete Stripe's onboarding form. That is all — the connection and the webhooks are set up for you;

Then, whichever option you chose:

1. Create your first advertising campaign and set a monthly price;
1. Place your campaign where you want to sell advertising space.

### AFTER AD SPACE PURCHASE

1. Buyer pays, uploads advertisement and product link;
1. Request is sent to your dashboard;
1. Buyer receives a link to the Stripe billing portal and can cancel at any time;
1. If you accept the request, you can post the ad;
1. Also the Site owner can cancel in wordpress dashboard at any time;
1. This monthly advertising deal remains active until one of the two parties cancels.

### AFTER AD SPACE PURCHASE ACCEPTED

1. Requests that are not accepted within 14 days are cancelled automatically in Stripe.
1. This monthly advertising deal remains active until one of the two parties cancels.

== Frequently Asked Questions ==


= Is this plugin free? =

Yes. The plugin itself is free, and nothing in it is locked, limited or disabled. There are two ways to take payments and you choose freely:

* **Your own Stripe API key** — the plugin takes no service fee and no commission at all. Advertisers pay into your own Stripe account, so the only costs are Stripe's regular processing fees.
* **Connect with Stripe** — the payment runs through our Stripe Connect platform at sellads.cybie.de and a 7 % Sell Ads fee is deducted from each payment, on top of Stripe's own processing fees. In return you do not have to create an API key or configure a webhook.

You can switch between the two at any time on the settings page. Either way you need a Stripe account.

= Can I try the plugin before setting up Stripe? =

Yes. The settings page has a mode switch: **Live** or **Test mode**. In test mode the payment step
is left out entirely — no checkout session is created and nothing is sent to Stripe, so no API key
is needed. Clicking the buy button leads straight to the upload page, and from there you can walk
through the whole process: upload an ad, see the confirmation, then accept and publish the order in
your dashboard. The ad space says plainly that no payment is taken, and orders created this way are
marked as test orders in the order list.

This is not the same as Stripe's own test mode. If you want to test with Stripe's test cards, stay
in Live and enter an sk_test_ key.

= Is it using any third party service? =

Yes. Payments, subscriptions and cancellations are handled by Stripe. Once you have entered your own Stripe API key, this plugin sends requests from your site directly to the Stripe API (https://api.stripe.com) in order to create checkout sessions, read their result, cancel subscriptions and open the Stripe billing portal. The data transmitted is limited to what a payment requires: the campaign name, the monthly price and your site URL. Buyers enter their payment and contact details on Stripe's own checkout pages; those details are never handled by this plugin. Your site also receives webhook notifications from Stripe, which are verified by signature.

Stripe terms of service: https://stripe.com/legal
Stripe privacy policy: https://stripe.com/privacy

**Only if you choose "Connect with Stripe":** your site additionally talks to our own service at https://sellads.cybie.de. It acts as the Stripe Connect platform, which is why the plugin never needs a Stripe API key of yours in that mode. The data your site sends is: your site URL, your WordPress admin URL, the administrator e-mail address, the plugin version, the country you selected, the campaign name and description, the monthly price and currency, and the Stripe identifiers of a purchase (checkout session, subscription, customer). The service passes Stripe's webhook notifications back to your site, signed with a shared secret. No payment details, no card data and no visitor data are transmitted to us — those stay between the buyer and Stripe. If you use your own Stripe API key instead, this service is never contacted at all.

Sell Ads service terms of service: https://sellads.cybie.de/terms.html
Sell Ads service privacy policy: https://sellads.cybie.de/privacy.html

No other third party services are used.

= Do I need to register anywhere to use this plugin? =

If you use your own Stripe API key: only with Stripe. There is no account, sign-up or connection with us required in that mode, and no data is sent to us at all.

If you choose "Connect with Stripe" instead, your site registers itself with our service at sellads.cybie.de as described above, and a Stripe Express account is created for you during the onboarding. You can disconnect at any time and go back to using your own key.

= How do I get support? =

From the purchase of advertising to the monthly payout, everything happens automatically through Stripe. If you need assistance with anything or would like to write to us, do not hesitate to [contact us](https://cybie.de/support).


== Screenshots ==
1. Dashboard
2. Widget Preview
3. Settings Page

== Changelog ==

= 1.8.1 =
* Fixed: the pages your buyers see after paying were not usable on a phone. They are built as their own document and were missing the line that tells mobile browsers the width of the screen, so the layout was rendered for a desktop and scaled down. They now adapt from 375 pixels upwards.
* The upload step and the confirmation step share one layout now, so nothing jumps when a buyer moves from one to the other. Both show the ad space and its monthly price alongside, and the buttons sit with the content instead of being pinned to a corner of the window.
* Both pages now keep their own appearance in every theme. Until now the active theme reached into them and could move the upload icon out of place, change the type or leave the notice and the form at different widths.
* The buy button, the upload step and the confirmation now take their colours and typeface from one place, so the buyer sees the same button throughout instead of a blue one in the middle of the flow.
* The two pop-up dialogs shown when the image or the link is missing were replaced by a message inside the form.
* Fixed: buyers were told they would automatically get their money back if their request was rejected or left unanswered, and the order list said "rejected & refunded". Neither was true — rejecting an order cancels the subscription at Stripe and nothing else. Both now say what actually happens: the subscription ends and the buyer is not charged again. Refunding the first payment is your decision and is done in your Stripe dashboard.

= 1.8.0 =
* New: you get an e-mail as soon as someone has paid for an ad space, so you know about a sale without looking into the dashboard first. This matters because orders you do not answer within 14 days are cancelled automatically. The mail is on by default, goes to your WordPress admin address unless you enter another one, and is sent through whatever this site uses for e-mail, so an SMTP plugin is picked up automatically. Orders placed in test mode never trigger a mail.
* The settings page has been rebuilt. The mode switch comes first, the payment choice second, and the fields belonging to the way you picked now appear the moment you pick it — until now you had to save before they showed up at all.
* Everything that is not about taking payments — the policy pages and the three text snippets — has moved into a section of its own that starts collapsed.
* New installations start on "Connect with Stripe", since there is nothing to set up in that mode. Existing installations are not touched: if a Stripe key is already stored, the plugin stays on your own key.
* Fixed: the note for the upload page was stored but never displayed anywhere. It now appears where its name says. The note for the buyer is used for the description on Stripe's payment page only; if you had written something there, it is copied over on update so nothing disappears from the upload page.

= 1.7.1 =
* Fixed: the page where buyers upload their ad after paying was shown without its stylesheet and without its script. The stylesheet was queued under a handle that was already taken, and the script declared a dependency on a library that is not part of the plugin, so WordPress dropped both.
* Fixed: the button that copies the link to the Stripe billing portal now works without any third party library.
* An ad space with no headline of its own now shows "This Ad Space is for Sale" instead of an empty line, matching the button, which already defaulted to "Buy".
* The buy button now looks the same as the button buyers see on the upload page — same size, weight, typeface and shadow — instead of inheriting whatever the theme does to buttons.
* The test mode notice under the buy button no longer inherits the theme's font size, where it could end up larger than the headline. It is now half that size and grey.
* The notice above the upload form is easier to read: white background instead of yellow, and no longer squeezed into a fixed width.
* The demo and the support link now point to pages that exist. The addresses used before had gone offline, which left the "contact us" link in the FAQ leading nowhere.

= 1.7.0 =
* New: "Connect with Stripe" — set up payments in one click through Stripe Connect Express. No API key, no webhook configuration. A 7 % Sell Ads fee applies to each payment, on top of Stripe's own processing fees.
* New: test mode. Try the whole plugin without setting up Stripe at all — the payment step is skipped, nothing is sent to Stripe, and the buy button leads straight to the upload page. Test orders are marked as such.
* The existing way is unchanged: with your own Stripe API key the plugin still takes no fee and no commission at all. Existing installations keep this mode after the update and nothing has to be done.
* Both modes can be switched at any time on the settings page, and you can disconnect whenever you want.
* The settings page now caches the Stripe connection status instead of querying it on every page load.

= 1.6.0 =
* Payments now run directly between your WordPress site and Stripe. The external payment service the plugin used before has been removed entirely.
* You now use your own Stripe account and your own API key. No service fee and no commission is charged anymore.
* Added a Stripe webhook endpoint so cancellations and failed payments are reflected in your dashboard.
* Cancellation now happens through the official Stripe billing portal instead of a custom page.
* Currency is now configurable (USD, EUR, GBP, CHF, CAD, AUD).
* Fixed: campaign fields (title, button text, price) were never saved.
* Fixed: purchased ads never appeared in the frontend because the order status was stored under two different keys.
* Security: image uploads are now bound to the buyer's checkout session and validated server-side.
* Security: accepting, rejecting and publishing an order now requires a nonce and the proper capability.
* Security: orders are no longer publicly queryable, and the WordPress core "pending" status is no longer overridden.

= 1.0 =
* First Release.

== Upgrade Notice ==

= 1.8.1 =
Recommended if you sell to visitors on phones. The pages buyers see after paying were rendered at desktop width on mobile and scaled down; they now fit the screen. Both steps also share one layout and keep their look in every theme.

= 1.8.0 =
Nothing to do. You now get an e-mail when someone buys an ad space, the settings page is clearer, and the payment fields appear as soon as you pick a way instead of only after saving. Your payment setup is untouched by the update.

= 1.7.1 =
Recommended for everyone. The page buyers see after paying was missing its stylesheet and its script, which also left the "copy billing portal link" button without a function.

= 1.7.0 =
Nothing to do. Existing installations keep using your own Stripe API key exactly as before, with no fee and no commission. The new "Connect with Stripe" mode is optional and only becomes active if you switch to it on the settings page.

= 1.6.0 =
Important: this release replaces the external payment service with a direct Stripe connection. After updating, open the settings page and enter your own Stripe secret key and webhook secret — until you do, ad spaces will not be offered for sale. Existing active ads are not affected. Subscriptions created with an earlier version were handled by the old service and cannot be managed from this plugin.

= 1.0 =
First Vesion
