Offer - max-power/paymill-ruby GitHub Wiki

An offer is a recurring plan which a user can subscribe to. You can create different offers with different plan attributes e.g. a monthly or a yearly based paid offer/plan.

Create new Offer

With this call you can create an offer via the API. You can also create an offer with the merchant cockpit.

params = {
  amount: 4200,
  currency: 'EUR',
  interval: 'month',
  name: 'Test Offer'
}
Paymill::Offer.create(params)

Offer Details

Getting detailed information about an offer requested with the offer ID.

Paymill::Offer.find('offer_40237e20a7d5a231d99b')

Update Offer

Updates the offer. Only the name can be changed all other attributes cannot be edited.

Paymill::Offer.update('offer_40237e20a7d5a231d99b', name: 'Premium Plan')

Remove Offer

You only can delete an offer if no client is subscribed to this offer.

Paymill::Offer.delete('offer_40237e20a7d5a231d99b')

List Offers

Paymill::Offer.all