In order for a user to buy your points, we must know three things: The amount of points they want to buy, the exchange rate of the point type for calculating cost and which payment gateway we want to use to handle the actual purchase.

The Purchase Process

Users purchase points using the mycred_buy or mycred_buy_form shortcodes. You can add these shortcodes anywhere on your website that supports using shortcodes. Using these shortcodes, users either nominate the amount they want to buy or select a preset amount.

If you are using more than one gateway, a user might also need to select which gateway they want to use for the purchase.

Once we have the amount we want to buy and the gateway we want to pay with, the add-on will load the “Checkout” page. Here a user is either redirected to a payment processor (e.g. PayPal) or are asked to enter their payment details on the checkout page (e.g. Bitpay).

Each payment request is logged in your admin area and is used by automatic gateways to verify payments and pay the user. For manual payment gateways, you can always manually approve a payment, which in turn pays the user the points they requested.

The Exchange Rate

Most online payment operators will have no idea what your “Points” are. So purchasing them will require payment of a real currency. This means that when a user requests to buy points, we need to find out the cost of that purchase. This is done using an exchange rate.

You can set a unique exchange rate depending on which payment gateway you are using. So for example give users one rate if they choose to pay using PayPal (to pay for the PayPal fees) and another for e.g. Bitcoin payments.

Furthermore, you can give users a unique exchange rate when you edit their profile.

myCRED Donations

Donate via PayPal

Donate Bitcoin

3LVrDPjgTkPfqGARXwAZW9cJBQEYo4FHsB

Suggest Codex Example

You can submit suggestions for codex examples that you have available as a public gist. If you are a member on the mycred.me website, you can earn Tokens for each submission. To claim these Tokens, make sure you provide your mycred.me username.

Gist URL

mycred.me Username

Please make sure the example you submit is relevant and if you include documentation, it's provided in English.