usage_credits

Demo app for the 💳✨ usage_credits gem

The basics: get and spend credits

 

Subscribe to a plan: Buy credit packs: Get arbitrary bonuses: Spend credits:

Ledger status

Date Amount Category Expiration
Mar 21, 12:45 AM +10 credits subscription_credits first_cycle expires in 28 days
Mar 21, 12:54 AM +1000 credits credit_pack_purchase
Mar 21, 1:06 AM +10 credits credit_pack_purchase
Mar 21, 1:14 AM +20 credits referral_bonus referral
Mar 21, 1:26 AM +10 credits signup_bonus signup
Mar 21, 1:34 AM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 21, 8:48 AM +1000 credits credit_pack_purchase
Mar 21, 8:48 AM +10 credits subscription_credits first_cycle expires in 29 days
Mar 21, 8:07 PM +10 credits subscription_credits first_cycle expires in 29 days
Mar 21, 8:07 PM +1000 credits credit_pack_purchase
Mar 21, 8:09 PM +10 credits credit_pack_purchase
Mar 21, 8:10 PM +10 credits signup_bonus signup
Mar 21, 8:10 PM +5100 credits credit_pack_purchase
Mar 21, 8:13 PM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 21, 8:14 PM +20 credits referral_bonus referral
Mar 21, 8:57 PM +1000 credits credit_pack_purchase
Mar 21, 9:05 PM +20 credits referral_bonus referral
Mar 22, 1:30 AM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 22, 3:52 PM +10 credits signup_bonus signup
Mar 22, 11:42 PM +5100 credits credit_pack_purchase
Mar 23, 9:18 AM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 23, 9:19 AM +10 credits subscription_credits first_cycle expires in about 1 month
Mar 23, 9:20 AM +5100 credits credit_pack_purchase
Mar 23, 9:20 AM +1000 credits credit_pack_purchase
Mar 23, 9:22 AM +10 credits credit_pack_purchase
Mar 23, 9:24 AM +10 credits signup_bonus signup
Mar 23, 4:49 PM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 23, 4:49 PM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 23, 4:50 PM +10 credits signup_bonus signup
Mar 23, 4:50 PM +10 credits signup_bonus signup
Mar 23, 4:50 PM +20 credits referral_bonus referral
Mar 23, 4:50 PM +5100 credits credit_pack_purchase
Mar 23, 4:50 PM +20 credits referral_bonus referral
Mar 23, 4:50 PM +1000 credits credit_pack_purchase
Mar 23, 4:50 PM +10 credits subscription_credits first_cycle expires in about 1 month
Mar 23, 4:50 PM +5100 credits credit_pack_purchase
Mar 23, 4:50 PM +1000 credits credit_pack_purchase
Mar 23, 4:50 PM +10 credits subscription_credits first_cycle expires in about 1 month
Mar 23, 4:53 PM +10 credits bonus expiring_bonus_credits 🗑️ expired
Mar 23, 4:53 PM +10 credits signup_bonus signup
Mar 23, 4:53 PM +20 credits referral_bonus referral
Mar 23, 4:53 PM +5100 credits credit_pack_purchase
Mar 23, 4:53 PM +1000 credits credit_pack_purchase
Mar 23, 4:53 PM +10 credits subscription_credits first_cycle expires in about 1 month

Payment records (pay gem)

The user has paid $1588.97 total

Pay::Charge (17)
# {
                        :id => 2294,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "3eXFuCwLbk7ayuHZpzQ-k",
                    :amount => 19900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "pro",
               "credits" => 5000,
         "bonus_credits" => 100,
           "price_cents" => 19900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 20:10:30.283508000 UTC +00:00,
                :updated_at => 2026-03-21 20:10:30.283508000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2303,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "6tgysCEtaziTl_SDVHTIn",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 16:50:28.739106000 UTC +00:00,
                :updated_at => 2026-03-23 16:50:28.739106000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2291,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "BJXaSo0NOsklD0HlSbwLb",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 08:48:30.240487000 UTC +00:00,
                :updated_at => 2026-03-21 08:48:30.240487000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2297,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "Es8-3PcReg47PjbIz-3F6",
                    :amount => 19900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "pro",
               "credits" => 5000,
         "bonus_credits" => 100,
           "price_cents" => 19900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 09:20:22.765555000 UTC +00:00,
                :updated_at => 2026-03-23 09:20:22.765555000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2292,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "Fd_ggZVeLkO7WdQlf66mO",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 20:07:44.015528000 UTC +00:00,
                :updated_at => 2026-03-21 20:07:44.015528000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2289,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "J7kV-ELrUY_mvr58QZ2GN",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 00:54:21.439913000 UTC +00:00,
                :updated_at => 2026-03-21 00:54:21.439913000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2302,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "Pytrhl_S_MQY8TzyoFjy4",
                    :amount => 19900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "pro",
               "credits" => 5000,
         "bonus_credits" => 100,
           "price_cents" => 19900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 16:50:21.803258000 UTC +00:00,
                :updated_at => 2026-03-23 16:50:21.803258000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2298,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "QtvbZVBXic1lGQ9rtIZk3",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 09:20:47.299280000 UTC +00:00,
                :updated_at => 2026-03-23 09:20:47.299280000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2304,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "a3AarvT_7lEJGRjjAlYnV",
                    :amount => 19900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "pro",
               "credits" => 5000,
         "bonus_credits" => 100,
           "price_cents" => 19900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 16:53:16.403464000 UTC +00:00,
                :updated_at => 2026-03-23 16:53:16.403464000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2299,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "fGtKHGQV6fhENUbvOzCK3",
                    :amount => 99,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "tiny",
               "credits" => 10,
         "bonus_credits" => 0,
           "price_cents" => 99,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 09:22:50.500500000 UTC +00:00,
                :updated_at => 2026-03-23 09:22:50.500500000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2290,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "hS6vJnuBjXI0Sfdxpa2gb",
                    :amount => 99,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "tiny",
               "credits" => 10,
         "bonus_credits" => 0,
           "price_cents" => 99,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 01:06:17.903456000 UTC +00:00,
                :updated_at => 2026-03-21 01:06:17.903456000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2300,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "nkFHNlNG_pKGcXIRZNSD1",
                    :amount => 19900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "pro",
               "credits" => 5000,
         "bonus_credits" => 100,
           "price_cents" => 19900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 16:50:08.578513000 UTC +00:00,
                :updated_at => 2026-03-23 16:50:08.578513000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2305,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "qD_5XDarR2QZXaygT7TAG",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 16:53:19.888975000 UTC +00:00,
                :updated_at => 2026-03-23 16:53:19.888975000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2301,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "rPisym46lRan18nZinFAv",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-23 16:50:12.414775000 UTC +00:00,
                :updated_at => 2026-03-23 16:50:12.414775000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2295,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "soM3RlPt-csIx1108s_cK",
                    :amount => 4900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "starter",
               "credits" => 1000,
         "bonus_credits" => 0,
           "price_cents" => 4900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 20:57:14.457800000 UTC +00:00,
                :updated_at => 2026-03-21 20:57:14.457800000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2296,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "u_7P-uUyQFaUYHHX7OL2v",
                    :amount => 19900,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "pro",
               "credits" => 5000,
         "bonus_credits" => 100,
           "price_cents" => 19900,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-22 23:42:58.834868000 UTC +00:00,
                :updated_at => 2026-03-22 23:42:58.834868000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
# {
                        :id => 2293,
               :customer_id => 3352,
           :subscription_id => nil,
              :processor_id => "zui0ejcqU1nY8jXzfRzpg",
                    :amount => 99,
                  :currency => nil,
    :application_fee_amount => nil,
           :amount_refunded => nil,
                  :metadata => {
         "purchase_type" => "credit_pack",
             "pack_name" => "tiny",
               "credits" => 10,
         "bonus_credits" => 0,
           "price_cents" => 99,
        "price_currency" => "USD"
    },
                      :data => {
        "payment_method_type" => "card",
                      "brand" => "Fake",
                      "last4" => 1234,
                  "exp_month" => 3,
                   "exp_year" => 2026
    },
            :stripe_account => nil,
                :created_at => 2026-03-21 20:09:07.279518000 UTC +00:00,
                :updated_at => 2026-03-21 20:09:07.279518000 UTC +00:00,
                      :type => "Pay::FakeProcessor::Charge"
}
Pay::Subscription (7)
# {
                         "id" => 1223,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "9d7LutyDi9aO7z8SVlJZh",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-21 20:07:35.404285000 UTC +00:00,
                 "updated_at" => 2026-03-21 20:07:35.404285000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}
# {
                         "id" => 1222,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "EfkMGnDZ00nq0KxQZyD7K",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-21 08:48:34.205589000 UTC +00:00,
                 "updated_at" => 2026-03-21 08:48:34.205589000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}
# {
                         "id" => 1225,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "JCFyxYhXjtyvrKSnyeG3H",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-23 16:50:16.496365000 UTC +00:00,
                 "updated_at" => 2026-03-23 16:50:16.496365000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}
# {
                         "id" => 1221,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "p969DFtZvoRS8iqCN0_V_",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-21 00:45:07.031304000 UTC +00:00,
                 "updated_at" => 2026-03-21 00:45:07.031304000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}
# {
                         "id" => 1227,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "wNYbhGDfcdJsWzlrs3Nht",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-23 16:53:23.865777000 UTC +00:00,
                 "updated_at" => 2026-03-23 16:53:23.865777000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}
# {
                         "id" => 1226,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "yi9ZlhEjD-UU-YcmteLjV",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-23 16:50:33.873109000 UTC +00:00,
                 "updated_at" => 2026-03-23 16:50:33.873109000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}
# {
                         "id" => 1224,
                "customer_id" => 3352,
                       "name" => "default",
               "processor_id" => "zcLtGFfwFGIKjn-kSzmfY",
             "processor_plan" => "abcdef123456",
                   "quantity" => 1,
                     "status" => "active",
       "current_period_start" => nil,
         "current_period_end" => nil,
              "trial_ends_at" => nil,
                    "ends_at" => nil,
                    "metered" => nil,
             "pause_behavior" => nil,
            "pause_starts_at" => nil,
           "pause_resumes_at" => nil,
    "application_fee_percent" => nil,
                   "metadata" => {
                   "purchase_type" => "credit_subscription",
               "subscription_name" => "test_plan",
              "fulfillment_period" => "1 month",
              "credits_per_period" => 10,
            "signup_bonus_credits" => 0,
                   "trial_credits" => 0,
                "rollover_enabled" => false,
        "expire_credits_on_cancel" => false,
        "credit_expiration_period" => nil,
                        "metadata" => {}
    },
                       "data" => nil,
             "stripe_account" => nil,
          "payment_method_id" => nil,
                 "created_at" => 2026-03-23 09:19:43.242060000 UTC +00:00,
                 "updated_at" => 2026-03-23 09:19:43.242060000 UTC +00:00,
                       "type" => "Pay::FakeProcessor::Subscription",
                    "prorate" => true
}

Model records

UsageCredits::Fulfillment (24)
# {
                          :id => 3509,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1221,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-21 00:45:07.036902000 UTC +00:00,
         :next_fulfillment_at => 2026-04-21 00:45:07.031304000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1221,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-21 00:45:07.037555000 UTC +00:00,
                  :updated_at => 2026-03-21 00:45:07.037555000 UTC +00:00
}
# {
                          :id => 3510,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2289,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 00:54:21.448986000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2289,
              "purchased_at" => "2026-03-21T00:54:21.439Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 00:54:21.450234000 UTC +00:00,
                  :updated_at => 2026-03-21 00:54:21.450234000 UTC +00:00
}
# {
                          :id => 3511,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2290,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 01:06:17.912101000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2290,
              "purchased_at" => "2026-03-21T01:06:17.903Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "tiny",
                   "credits" => 10,
             "bonus_credits" => 0,
               "price_cents" => 99,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 01:06:17.912606000 UTC +00:00,
                  :updated_at => 2026-03-21 01:06:17.912606000 UTC +00:00
}
# {
                          :id => 3512,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2291,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 08:48:30.310782000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2291,
              "purchased_at" => "2026-03-21T08:48:30.240Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 08:48:30.319244000 UTC +00:00,
                  :updated_at => 2026-03-21 08:48:30.319244000 UTC +00:00
}
# {
                          :id => 3513,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1222,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-21 08:48:34.220687000 UTC +00:00,
         :next_fulfillment_at => 2026-04-21 08:48:34.205589000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1222,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-21 08:48:34.225102000 UTC +00:00,
                  :updated_at => 2026-03-21 08:48:34.225102000 UTC +00:00
}
# {
                          :id => 3514,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1223,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-21 20:07:35.415433000 UTC +00:00,
         :next_fulfillment_at => 2026-04-21 20:07:35.404285000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1223,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-21 20:07:35.416229000 UTC +00:00,
                  :updated_at => 2026-03-21 20:07:35.416229000 UTC +00:00
}
# {
                          :id => 3515,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2292,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 20:07:44.022603000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2292,
              "purchased_at" => "2026-03-21T20:07:44.015Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 20:07:44.023110000 UTC +00:00,
                  :updated_at => 2026-03-21 20:07:44.023110000 UTC +00:00
}
# {
                          :id => 3516,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2293,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 20:09:07.285561000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2293,
              "purchased_at" => "2026-03-21T20:09:07.279Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "tiny",
                   "credits" => 10,
             "bonus_credits" => 0,
               "price_cents" => 99,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 20:09:07.286074000 UTC +00:00,
                  :updated_at => 2026-03-21 20:09:07.286074000 UTC +00:00
}
# {
                          :id => 3517,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2294,
    :credits_last_fulfillment => 5100,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 20:10:30.290945000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2294,
              "purchased_at" => "2026-03-21T20:10:30.283Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 20:10:30.291576000 UTC +00:00,
                  :updated_at => 2026-03-21 20:10:30.291576000 UTC +00:00
}
# {
                          :id => 3518,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2295,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-21 20:57:14.463464000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2295,
              "purchased_at" => "2026-03-21T20:57:14.457Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-21 20:57:14.463959000 UTC +00:00,
                  :updated_at => 2026-03-21 20:57:14.463959000 UTC +00:00
}
# {
                          :id => 3519,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2296,
    :credits_last_fulfillment => 5100,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-22 23:42:58.845357000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2296,
              "purchased_at" => "2026-03-22T23:42:58.834Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-22 23:42:58.847684000 UTC +00:00,
                  :updated_at => 2026-03-22 23:42:58.847684000 UTC +00:00
}
# {
                          :id => 3520,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1224,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-23 09:19:43.259953000 UTC +00:00,
         :next_fulfillment_at => 2026-04-23 09:19:43.242060000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1224,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-23 09:19:43.271498000 UTC +00:00,
                  :updated_at => 2026-03-23 09:19:43.271498000 UTC +00:00
}
# {
                          :id => 3521,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2297,
    :credits_last_fulfillment => 5100,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 09:20:22.776864000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2297,
              "purchased_at" => "2026-03-23T09:20:22.765Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 09:20:22.777790000 UTC +00:00,
                  :updated_at => 2026-03-23 09:20:22.777790000 UTC +00:00
}
# {
                          :id => 3522,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2298,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 09:20:47.305293000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2298,
              "purchased_at" => "2026-03-23T09:20:47.299Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 09:20:47.305830000 UTC +00:00,
                  :updated_at => 2026-03-23 09:20:47.305830000 UTC +00:00
}
# {
                          :id => 3523,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2299,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 09:22:50.506657000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2299,
              "purchased_at" => "2026-03-23T09:22:50.500Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "tiny",
                   "credits" => 10,
             "bonus_credits" => 0,
               "price_cents" => 99,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 09:22:50.507190000 UTC +00:00,
                  :updated_at => 2026-03-23 09:22:50.507190000 UTC +00:00
}
# {
                          :id => 3524,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2300,
    :credits_last_fulfillment => 5100,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 16:50:08.583553000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2300,
              "purchased_at" => "2026-03-23T16:50:08.578Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 16:50:08.584051000 UTC +00:00,
                  :updated_at => 2026-03-23 16:50:08.584051000 UTC +00:00
}
# {
                          :id => 3525,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2301,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 16:50:12.419666000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2301,
              "purchased_at" => "2026-03-23T16:50:12.414Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 16:50:12.420211000 UTC +00:00,
                  :updated_at => 2026-03-23 16:50:12.420211000 UTC +00:00
}
# {
                          :id => 3526,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1225,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-23 16:50:16.500353000 UTC +00:00,
         :next_fulfillment_at => 2026-04-23 16:50:16.496365000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1225,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-23 16:50:16.500902000 UTC +00:00,
                  :updated_at => 2026-03-23 16:50:16.500902000 UTC +00:00
}
# {
                          :id => 3527,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2302,
    :credits_last_fulfillment => 5100,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 16:50:21.815029000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2302,
              "purchased_at" => "2026-03-23T16:50:21.803Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 16:50:21.817851000 UTC +00:00,
                  :updated_at => 2026-03-23 16:50:21.817851000 UTC +00:00
}
# {
                          :id => 3528,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2303,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 16:50:28.744444000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2303,
              "purchased_at" => "2026-03-23T16:50:28.739Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 16:50:28.744952000 UTC +00:00,
                  :updated_at => 2026-03-23 16:50:28.744952000 UTC +00:00
}
# {
                          :id => 3529,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1226,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-23 16:50:33.878710000 UTC +00:00,
         :next_fulfillment_at => 2026-04-23 16:50:33.873109000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1226,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-23 16:50:33.879351000 UTC +00:00,
                  :updated_at => 2026-03-23 16:50:33.879351000 UTC +00:00
}
# {
                          :id => 3530,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2304,
    :credits_last_fulfillment => 5100,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 16:53:16.410973000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2304,
              "purchased_at" => "2026-03-23T16:53:16.403Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 16:53:16.411484000 UTC +00:00,
                  :updated_at => 2026-03-23 16:53:16.411484000 UTC +00:00
}
# {
                          :id => 3531,
                   :wallet_id => 3357,
                 :source_type => "Pay::Charge",
                   :source_id => 2305,
    :credits_last_fulfillment => 1000,
            :fulfillment_type => "credit_pack",
           :last_fulfilled_at => 2026-03-23 16:53:19.896987000 UTC +00:00,
         :next_fulfillment_at => nil,
          :fulfillment_period => nil,
                    :stops_at => nil,
                    :metadata => {
        "purchase_charge_id" => 2305,
              "purchased_at" => "2026-03-23T16:53:19.888Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
                  :created_at => 2026-03-23 16:53:19.897488000 UTC +00:00,
                  :updated_at => 2026-03-23 16:53:19.897488000 UTC +00:00
}
# {
                          :id => 3532,
                   :wallet_id => 3357,
                 :source_type => "Pay::Subscription",
                   :source_id => 1227,
    :credits_last_fulfillment => 10,
            :fulfillment_type => "subscription",
           :last_fulfilled_at => 2026-03-23 16:53:23.870299000 UTC +00:00,
         :next_fulfillment_at => 2026-04-23 16:53:23.865777000 UTC +00:00,
          :fulfillment_period => "1 month",
                    :stops_at => nil,
                    :metadata => {
        "subscription_id" => 1227,
                   "plan" => "abcdef123456"
    },
                  :created_at => 2026-03-23 16:53:23.870961000 UTC +00:00,
                  :updated_at => 2026-03-23 16:53:23.870961000 UTC +00:00
}
UsageCredits::Transaction (44)
# {
                :id => 5766,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-21 00:50:07.031304000 UTC +00:00,
    :fulfillment_id => 3509,
          :metadata => {
        "subscription_id" => 1221,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-21T00:45:07.033Z"
    },
        :created_at => 2026-03-21 00:45:07.035194000 UTC +00:00,
        :updated_at => 2026-03-21 00:45:07.035194000 UTC +00:00
}
# {
                :id => 5767,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2289,
              "purchased_at" => "2026-03-21T00:54:21.439Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T00:54:21.444Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 00:54:21.445407000 UTC +00:00,
        :updated_at => 2026-03-21 00:54:21.445407000 UTC +00:00
}
# {
                :id => 5768,
         :wallet_id => 3357,
            :amount => 10,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2290,
              "purchased_at" => "2026-03-21T01:06:17.903Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T01:06:17.909Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "tiny",
                   "credits" => 10,
             "bonus_credits" => 0,
               "price_cents" => 99,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 01:06:17.910406000 UTC +00:00,
        :updated_at => 2026-03-21 01:06:17.910406000 UTC +00:00
}
# {
                :id => 5769,
         :wallet_id => 3357,
            :amount => 20,
          :category => "referral_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "referral"
    },
        :created_at => 2026-03-21 01:14:48.120494000 UTC +00:00,
        :updated_at => 2026-03-21 01:14:48.120494000 UTC +00:00
}
# {
                :id => 5770,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-21 01:26:29.750285000 UTC +00:00,
        :updated_at => 2026-03-21 01:26:29.750285000 UTC +00:00
}
# {
                :id => 5771,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-21 01:35:58.269473000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-21 01:34:58.273643000 UTC +00:00,
        :updated_at => 2026-03-21 01:34:58.273643000 UTC +00:00
}
# {
                :id => 5772,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2291,
              "purchased_at" => "2026-03-21T08:48:30.240Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T08:48:30.274Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 08:48:30.296545000 UTC +00:00,
        :updated_at => 2026-03-21 08:48:30.296545000 UTC +00:00
}
# {
                :id => 5773,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-21 08:53:34.205589000 UTC +00:00,
    :fulfillment_id => 3513,
          :metadata => {
        "subscription_id" => 1222,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-21T08:48:34.216Z"
    },
        :created_at => 2026-03-21 08:48:34.218240000 UTC +00:00,
        :updated_at => 2026-03-21 08:48:34.218240000 UTC +00:00
}
# {
                :id => 5774,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-21 20:12:35.404285000 UTC +00:00,
    :fulfillment_id => 3514,
          :metadata => {
        "subscription_id" => 1223,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-21T20:07:35.410Z"
    },
        :created_at => 2026-03-21 20:07:35.412340000 UTC +00:00,
        :updated_at => 2026-03-21 20:07:35.412340000 UTC +00:00
}
# {
                :id => 5775,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2292,
              "purchased_at" => "2026-03-21T20:07:44.015Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T20:07:44.019Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 20:07:44.020725000 UTC +00:00,
        :updated_at => 2026-03-21 20:07:44.020725000 UTC +00:00
}
# {
                :id => 5776,
         :wallet_id => 3357,
            :amount => 10,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2293,
              "purchased_at" => "2026-03-21T20:09:07.279Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T20:09:07.281Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "tiny",
                   "credits" => 10,
             "bonus_credits" => 0,
               "price_cents" => 99,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 20:09:07.282692000 UTC +00:00,
        :updated_at => 2026-03-21 20:09:07.282692000 UTC +00:00
}
# {
                :id => 5777,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-21 20:10:04.864500000 UTC +00:00,
        :updated_at => 2026-03-21 20:10:04.864500000 UTC +00:00
}
# {
                :id => 5778,
         :wallet_id => 3357,
            :amount => 5100,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2294,
              "purchased_at" => "2026-03-21T20:10:30.283Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T20:10:30.287Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 20:10:30.288937000 UTC +00:00,
        :updated_at => 2026-03-21 20:10:30.288937000 UTC +00:00
}
# {
                :id => 5779,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-21 20:14:57.844041000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-21 20:13:57.846689000 UTC +00:00,
        :updated_at => 2026-03-21 20:13:57.846689000 UTC +00:00
}
# {
                :id => 5780,
         :wallet_id => 3357,
            :amount => 20,
          :category => "referral_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "referral"
    },
        :created_at => 2026-03-21 20:14:33.408739000 UTC +00:00,
        :updated_at => 2026-03-21 20:14:33.408739000 UTC +00:00
}
# {
                :id => 5781,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2295,
              "purchased_at" => "2026-03-21T20:57:14.457Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-21T20:57:14.459Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-21 20:57:14.461159000 UTC +00:00,
        :updated_at => 2026-03-21 20:57:14.461159000 UTC +00:00
}
# {
                :id => 5782,
         :wallet_id => 3357,
            :amount => 20,
          :category => "referral_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "referral"
    },
        :created_at => 2026-03-21 21:05:57.421482000 UTC +00:00,
        :updated_at => 2026-03-21 21:05:57.421482000 UTC +00:00
}
# {
                :id => 5783,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-22 01:31:55.426681000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-22 01:30:55.431372000 UTC +00:00,
        :updated_at => 2026-03-22 01:30:55.431372000 UTC +00:00
}
# {
                :id => 5784,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-22 15:52:08.950503000 UTC +00:00,
        :updated_at => 2026-03-22 15:52:08.950503000 UTC +00:00
}
# {
                :id => 5785,
         :wallet_id => 3357,
            :amount => 5100,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2296,
              "purchased_at" => "2026-03-22T23:42:58.834Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-22T23:42:58.841Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-22 23:42:58.843531000 UTC +00:00,
        :updated_at => 2026-03-22 23:42:58.843531000 UTC +00:00
}
# {
                :id => 5786,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-23 09:19:17.539655000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-23 09:18:17.562520000 UTC +00:00,
        :updated_at => 2026-03-23 09:18:17.562520000 UTC +00:00
}
# {
                :id => 5788,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-23 09:24:43.242060000 UTC +00:00,
    :fulfillment_id => 3520,
          :metadata => {
        "subscription_id" => 1224,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-23T09:19:43.255Z"
    },
        :created_at => 2026-03-23 09:19:43.256860000 UTC +00:00,
        :updated_at => 2026-03-23 09:19:43.256860000 UTC +00:00
}
# {
                :id => 5789,
         :wallet_id => 3357,
            :amount => 5100,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2297,
              "purchased_at" => "2026-03-23T09:20:22.765Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T09:20:22.772Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 09:20:22.774807000 UTC +00:00,
        :updated_at => 2026-03-23 09:20:22.774807000 UTC +00:00
}
# {
                :id => 5790,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2298,
              "purchased_at" => "2026-03-23T09:20:47.299Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T09:20:47.302Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 09:20:47.303413000 UTC +00:00,
        :updated_at => 2026-03-23 09:20:47.303413000 UTC +00:00
}
# {
                :id => 5791,
         :wallet_id => 3357,
            :amount => 10,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2299,
              "purchased_at" => "2026-03-23T09:22:50.500Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T09:22:50.503Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "tiny",
                   "credits" => 10,
             "bonus_credits" => 0,
               "price_cents" => 99,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 09:22:50.504441000 UTC +00:00,
        :updated_at => 2026-03-23 09:22:50.504441000 UTC +00:00
}
# {
                :id => 5792,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-23 09:24:55.845832000 UTC +00:00,
        :updated_at => 2026-03-23 09:24:55.845832000 UTC +00:00
}
# {
                :id => 5793,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-23 16:50:53.322481000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-23 16:49:53.325007000 UTC +00:00,
        :updated_at => 2026-03-23 16:49:53.325007000 UTC +00:00
}
# {
                :id => 5794,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-23 16:50:57.956093000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-23 16:49:57.958941000 UTC +00:00,
        :updated_at => 2026-03-23 16:49:57.958941000 UTC +00:00
}
# {
                :id => 5795,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-23 16:50:01.657520000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:01.657520000 UTC +00:00
}
# {
                :id => 5796,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-23 16:50:03.092552000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:03.092552000 UTC +00:00
}
# {
                :id => 5797,
         :wallet_id => 3357,
            :amount => 20,
          :category => "referral_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "referral"
    },
        :created_at => 2026-03-23 16:50:05.109396000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:05.109396000 UTC +00:00
}
# {
                :id => 5798,
         :wallet_id => 3357,
            :amount => 5100,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2300,
              "purchased_at" => "2026-03-23T16:50:08.578Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T16:50:08.580Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 16:50:08.582028000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:08.582028000 UTC +00:00
}
# {
                :id => 5799,
         :wallet_id => 3357,
            :amount => 20,
          :category => "referral_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "referral"
    },
        :created_at => 2026-03-23 16:50:10.639838000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:10.639838000 UTC +00:00
}
# {
                :id => 5800,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2301,
              "purchased_at" => "2026-03-23T16:50:12.414Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T16:50:12.416Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 16:50:12.418073000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:12.418073000 UTC +00:00
}
# {
                :id => 5801,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-23 16:55:16.496365000 UTC +00:00,
    :fulfillment_id => 3526,
          :metadata => {
        "subscription_id" => 1225,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-23T16:50:16.497Z"
    },
        :created_at => 2026-03-23 16:50:16.499021000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:16.499021000 UTC +00:00
}
# {
                :id => 5802,
         :wallet_id => 3357,
            :amount => 5100,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2302,
              "purchased_at" => "2026-03-23T16:50:21.803Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T16:50:21.807Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 16:50:21.811918000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:21.811918000 UTC +00:00
}
# {
                :id => 5803,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2303,
              "purchased_at" => "2026-03-23T16:50:28.739Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T16:50:28.741Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 16:50:28.742862000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:28.742862000 UTC +00:00
}
# {
                :id => 5804,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-23 16:55:33.873109000 UTC +00:00,
    :fulfillment_id => 3529,
          :metadata => {
        "subscription_id" => 1226,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-23T16:50:33.875Z"
    },
        :created_at => 2026-03-23 16:50:33.876905000 UTC +00:00,
        :updated_at => 2026-03-23 16:50:33.876905000 UTC +00:00
}
# {
                :id => 5805,
         :wallet_id => 3357,
            :amount => 10,
          :category => "bonus",
        :expires_at => 2026-03-23 16:54:05.026003000 UTC +00:00,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "expiring_bonus_credits"
    },
        :created_at => 2026-03-23 16:53:05.029731000 UTC +00:00,
        :updated_at => 2026-03-23 16:53:05.029731000 UTC +00:00
}
# {
                :id => 5806,
         :wallet_id => 3357,
            :amount => 10,
          :category => "signup_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "signup"
    },
        :created_at => 2026-03-23 16:53:08.563230000 UTC +00:00,
        :updated_at => 2026-03-23 16:53:08.563230000 UTC +00:00
}
# {
                :id => 5807,
         :wallet_id => 3357,
            :amount => 20,
          :category => "referral_bonus",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "reason" => "referral"
    },
        :created_at => 2026-03-23 16:53:12.255102000 UTC +00:00,
        :updated_at => 2026-03-23 16:53:12.255102000 UTC +00:00
}
# {
                :id => 5808,
         :wallet_id => 3357,
            :amount => 5100,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2304,
              "purchased_at" => "2026-03-23T16:53:16.403Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T16:53:16.405Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "pro",
                   "credits" => 5000,
             "bonus_credits" => 100,
               "price_cents" => 19900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 16:53:16.409380000 UTC +00:00,
        :updated_at => 2026-03-23 16:53:16.409380000 UTC +00:00
}
# {
                :id => 5809,
         :wallet_id => 3357,
            :amount => 1000,
          :category => "credit_pack_purchase",
        :expires_at => nil,
    :fulfillment_id => nil,
          :metadata => {
        "purchase_charge_id" => 2305,
              "purchased_at" => "2026-03-23T16:53:19.888Z",
         "credits_fulfilled" => true,
              "fulfilled_at" => "2026-03-23T16:53:19.892Z",
             "purchase_type" => "credit_pack",
                 "pack_name" => "starter",
                   "credits" => 1000,
             "bonus_credits" => 0,
               "price_cents" => 4900,
            "price_currency" => "USD"
    },
        :created_at => 2026-03-23 16:53:19.895294000 UTC +00:00,
        :updated_at => 2026-03-23 16:53:19.895294000 UTC +00:00
}
# {
                :id => 5810,
         :wallet_id => 3357,
            :amount => 10,
          :category => "subscription_credits",
        :expires_at => 2026-04-23 16:58:23.865777000 UTC +00:00,
    :fulfillment_id => 3532,
          :metadata => {
        "subscription_id" => 1227,
                 "reason" => "first_cycle",
                   "plan" => "abcdef123456",
           "fulfilled_at" => "2026-03-23T16:53:23.867Z"
    },
        :created_at => 2026-03-23 16:53:23.868564000 UTC +00:00,
        :updated_at => 2026-03-23 16:53:23.868564000 UTC +00:00
}
UsageCredits::Allocation (0) none

Audit trail

Audit trail
[
    [ 0] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1221,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-21T00:45:07.033Z"
        }
    ],
    [ 1] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2289,
                  "purchased_at" => "2026-03-21T00:54:21.439Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T00:54:21.444Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [ 2] [
        [0] "credit_pack_purchase",
        [1] 10,
        [2] {
            "purchase_charge_id" => 2290,
                  "purchased_at" => "2026-03-21T01:06:17.903Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T01:06:17.909Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "tiny",
                       "credits" => 10,
                 "bonus_credits" => 0,
                   "price_cents" => 99,
                "price_currency" => "USD"
        }
    ],
    [ 3] [
        [0] "referral_bonus",
        [1] 20,
        [2] {
            "reason" => "referral"
        }
    ],
    [ 4] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [ 5] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [ 6] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2291,
                  "purchased_at" => "2026-03-21T08:48:30.240Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T08:48:30.274Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [ 7] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1222,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-21T08:48:34.216Z"
        }
    ],
    [ 8] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1223,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-21T20:07:35.410Z"
        }
    ],
    [ 9] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2292,
                  "purchased_at" => "2026-03-21T20:07:44.015Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T20:07:44.019Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [10] [
        [0] "credit_pack_purchase",
        [1] 10,
        [2] {
            "purchase_charge_id" => 2293,
                  "purchased_at" => "2026-03-21T20:09:07.279Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T20:09:07.281Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "tiny",
                       "credits" => 10,
                 "bonus_credits" => 0,
                   "price_cents" => 99,
                "price_currency" => "USD"
        }
    ],
    [11] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [12] [
        [0] "credit_pack_purchase",
        [1] 5100,
        [2] {
            "purchase_charge_id" => 2294,
                  "purchased_at" => "2026-03-21T20:10:30.283Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T20:10:30.287Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "pro",
                       "credits" => 5000,
                 "bonus_credits" => 100,
                   "price_cents" => 19900,
                "price_currency" => "USD"
        }
    ],
    [13] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [14] [
        [0] "referral_bonus",
        [1] 20,
        [2] {
            "reason" => "referral"
        }
    ],
    [15] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2295,
                  "purchased_at" => "2026-03-21T20:57:14.457Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-21T20:57:14.459Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [16] [
        [0] "referral_bonus",
        [1] 20,
        [2] {
            "reason" => "referral"
        }
    ],
    [17] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [18] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [19] [
        [0] "credit_pack_purchase",
        [1] 5100,
        [2] {
            "purchase_charge_id" => 2296,
                  "purchased_at" => "2026-03-22T23:42:58.834Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-22T23:42:58.841Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "pro",
                       "credits" => 5000,
                 "bonus_credits" => 100,
                   "price_cents" => 19900,
                "price_currency" => "USD"
        }
    ],
    [20] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [21] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1224,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-23T09:19:43.255Z"
        }
    ],
    [22] [
        [0] "credit_pack_purchase",
        [1] 5100,
        [2] {
            "purchase_charge_id" => 2297,
                  "purchased_at" => "2026-03-23T09:20:22.765Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T09:20:22.772Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "pro",
                       "credits" => 5000,
                 "bonus_credits" => 100,
                   "price_cents" => 19900,
                "price_currency" => "USD"
        }
    ],
    [23] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2298,
                  "purchased_at" => "2026-03-23T09:20:47.299Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T09:20:47.302Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [24] [
        [0] "credit_pack_purchase",
        [1] 10,
        [2] {
            "purchase_charge_id" => 2299,
                  "purchased_at" => "2026-03-23T09:22:50.500Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T09:22:50.503Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "tiny",
                       "credits" => 10,
                 "bonus_credits" => 0,
                   "price_cents" => 99,
                "price_currency" => "USD"
        }
    ],
    [25] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [26] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [27] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [28] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [29] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [30] [
        [0] "referral_bonus",
        [1] 20,
        [2] {
            "reason" => "referral"
        }
    ],
    [31] [
        [0] "credit_pack_purchase",
        [1] 5100,
        [2] {
            "purchase_charge_id" => 2300,
                  "purchased_at" => "2026-03-23T16:50:08.578Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T16:50:08.580Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "pro",
                       "credits" => 5000,
                 "bonus_credits" => 100,
                   "price_cents" => 19900,
                "price_currency" => "USD"
        }
    ],
    [32] [
        [0] "referral_bonus",
        [1] 20,
        [2] {
            "reason" => "referral"
        }
    ],
    [33] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2301,
                  "purchased_at" => "2026-03-23T16:50:12.414Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T16:50:12.416Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [34] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1225,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-23T16:50:16.497Z"
        }
    ],
    [35] [
        [0] "credit_pack_purchase",
        [1] 5100,
        [2] {
            "purchase_charge_id" => 2302,
                  "purchased_at" => "2026-03-23T16:50:21.803Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T16:50:21.807Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "pro",
                       "credits" => 5000,
                 "bonus_credits" => 100,
                   "price_cents" => 19900,
                "price_currency" => "USD"
        }
    ],
    [36] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2303,
                  "purchased_at" => "2026-03-23T16:50:28.739Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T16:50:28.741Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [37] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1226,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-23T16:50:33.875Z"
        }
    ],
    [38] [
        [0] "bonus",
        [1] 10,
        [2] {
            "reason" => "expiring_bonus_credits"
        }
    ],
    [39] [
        [0] "signup_bonus",
        [1] 10,
        [2] {
            "reason" => "signup"
        }
    ],
    [40] [
        [0] "referral_bonus",
        [1] 20,
        [2] {
            "reason" => "referral"
        }
    ],
    [41] [
        [0] "credit_pack_purchase",
        [1] 5100,
        [2] {
            "purchase_charge_id" => 2304,
                  "purchased_at" => "2026-03-23T16:53:16.403Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T16:53:16.405Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "pro",
                       "credits" => 5000,
                 "bonus_credits" => 100,
                   "price_cents" => 19900,
                "price_currency" => "USD"
        }
    ],
    [42] [
        [0] "credit_pack_purchase",
        [1] 1000,
        [2] {
            "purchase_charge_id" => 2305,
                  "purchased_at" => "2026-03-23T16:53:19.888Z",
             "credits_fulfilled" => true,
                  "fulfilled_at" => "2026-03-23T16:53:19.892Z",
                 "purchase_type" => "credit_pack",
                     "pack_name" => "starter",
                       "credits" => 1000,
                 "bonus_credits" => 0,
                   "price_cents" => 4900,
                "price_currency" => "USD"
        }
    ],
    [43] [
        [0] "subscription_credits",
        [1] 10,
        [2] {
            "subscription_id" => 1227,
                     "reason" => "first_cycle",
                       "plan" => "abcdef123456",
               "fulfilled_at" => "2026-03-23T16:53:23.867Z"
        }
    ]
]

Loaded config

Literal, raw config file
      # frozen_string_literal: true

UsageCredits.configure do |config|

  # Default test operations
  operation :small_operation do
    costs 1.credit
  end

  # operation :test_operation do
  #   costs 10.credits + 1.credits_per(:mb)
  #   validate ->(params) { params[:size].to_i <= 100.megabytes }, "File too large (max: 100 MB)"
  # end

  operation :prohibitive_operation do
    costs 1_000_000.credits
  end

  operation :this_operation_will_always_fail do
    costs 42.credits
  end


  # Define test credit packs
  credit_pack :tiny do
    gives 10.credits
    costs 99.cents
  end

  credit_pack :starter do
    gives 1000.credits
    costs 49.dollars
  end

  credit_pack :pro do
    gives 5000.credits
    bonus 100.credits  # Optional: give bonus credits
    costs 199.dollars
    currency :usd
  end


  # Define subscriptions
  subscription_plan :test_plan do
    processor_plan(:fake_processor, "abcdef123456")
    gives 10.credits.every(:month)
    unused_credits :expire
  end

  # Alert when balance drops below 100 credits
  # Set to nil to disable low balance alerts
  # config.low_balance_threshold = 20.credits

  # # Handle low credit balance alerts
  # config.on_low_balance do |user|
  #   # Send notification to user when their balance drops below the threshold
  #   ApplicationMailer.generic_email(to: user.email, body: "Heads up! You're low on credits.", subject: "Low credits alert").deliver_now
  # end

end

    
Credit-consuming operations
Credit packs
Credit subscription plans
Rest of the config
      {
  "default_currency": "usd",
  "rounding_strategy": "ceil",
  "credit_formatter": {},
  "fulfillment_grace_period": 300,
  "allow_negative_balance": false,
  "low_balance_threshold": null,
  "low_balance_callback": null
}