Single Purchase Downloads

I’m sure this has been covered else where in the forum but I have been unable to find it so I apologize in advance if I am re-posting a question. I would like to offer single purchase downloads with s2Member where the user would click the button, pay for their item via Stripe, and then be redirected to the download somehow. I already offer a monthly subscription for downloads, I’m just afraid I am missing a lot of sales by not offering single one time purchase downloads. Can anyone put me on a good path to achieve this or do I need to add some other plugins? Any help or guidance would be greatly appreciated. Thanks!

Hi MoeJoe,

Well, you could sell access to a page for a specific file, and give the download link for it there.

You can protect the page with a custom capability (a.k.a. ccap), and sell that ccap to the user for access. WP admin > s2Member Pro > Stripe Pro-Forms > Capability

Then for the download link, use the s2File shortcode to generate it. WP Admin > s2Member > Download Options > Advanced Download Restriction and Shortcode Attributes

:slight_smile:

Hi Cristian,
I kind of understand how this works but I’m not 100% there. Right now I have my site set up as a membership where the user can explore 100’s of different files and each file has a specific page that has a download link and they can download 10 different files a month. Is there a way through conditional statements to set up another button on the same page like a buy now button for that specific file, and if so how would the user be redirected to that file? I don’t have my brain wrapped around it yet, sorry. Could I have a button on the page for that download, if the user just wants to buy that file, the button redirects them to a form that has ccaps? Then what. I’m sorry could you help me a little bit more get this through my thick brain…:rofl: Thanks!

Well, the conditional could check if the person doesn’t have the subscription level, or the ccap for that particular file, then show the button to buy that file’s ccap. If he has the ccap, then show the link with the s2File shortcode.

E.g.

[s2If !current_user_is(s2member_level1) AND !current_user_can(access_s2member_ccap_filename)]
[s2Member-Pro-Stripe-Form level="*" ccaps="filename" ... /]
[else]
[s2File download="filename.zip" download_key="true" /]
[/s2If]

single one time purchase downloads

When you say that, you mean a single payment, or a single download? With the above, the user keeps the ccap and can continue downloading that same file in the future. You could also remove the ccap after the download, but that’d need PHP.

:slight_smile:

Hi Cristian,
Basically if a user wants to purchase a file one time and not have to sign up for a membership is what I want. So what your saying is I can have a button that can take the user to a Stripe form that then allows them to make a one time purchase and then assigns them a ccap that would allow them to download a file one time with the conditional statement you have shown. I guess really I would just need to assign them a ccap that would only allow them to download one file with a non recurring payment. I’m thinking out loud here, how can I send the user back to the page they just came from after they make a payment on the Stripe form? Seems like I seen somewhere that doing that was possible.

See here: WP Admin > s2Member Pro > Stripe Pro-Forms > Custom Return URLs Upon Success

When you say “not have to sign up for a membership”, do you mean create an account on your site, or do you mean single payment instead of subscription?

I ask because if you don’t want them to register on the site, then the ccaps approach won’t work, since caps work with a user account. If you don’t want to require registration, then the Specific Post/Page approach could work. https://www.youtube.com/watch?v=jPk8K6SR8No&list=PLED64B278374AB72F

:slight_smile:

When you say “not have to sign up for a membership”, do you mean create an account on your site, or do you mean single payment instead of subscription?

I want them to be able to purchase a single file without having to create a membership. I don’t know if there would be any benefit to having them create an account. However, they may need to create an account so that ccap can be used. Right now the website is setup so that each specific file has a page and a button to either download that file (if they already have membership) or signup for membership to allow them to purchase the file.

I ask because if you don’t want them to register on the site, then the ccaps approach won’t work, since caps work with a user account. If you don’t want to require registration, then the Specific Post/Page approach could work. https://www.youtube.com/watch?v=jPk8K6SR8No&list=PLED64B278374AB72F

I don’t know if the Specific Post/Page approach would work because I would need to create double the pages for each file and I already have 100’s of files with pages.

I think form what you’ve told me, that the ccap approach is better. It does require the person to register an account and login, though. But so does a subscription, you can’t subscribe without an account…

:slight_smile: