PhoenixKit.Modules.Billing.PaymentOption (phoenix_kit v1.7.71)

Copy Markdown View Source

Payment option schema for checkout.

Represents available payment methods during checkout, including:

  • Offline methods: Cash on Delivery (COD), Bank Transfer
  • Online methods: Stripe, PayPal, Razorpay

Type

  • offline - Payment handled outside the system (COD, bank transfer)
  • online - Payment processed through a provider (Stripe, PayPal)

Billing Profile Requirement

Some payment methods (like COD or Bank Transfer) require billing information for invoicing purposes. Online card payments typically don't need this as the payment provider handles customer details.

Summary

Functions

Changeset for creating and updating payment options.

Returns list of valid code values.

Returns the icon name for a payment option.

Returns true if this payment option is an offline payment.

Returns true if this payment option is an online payment.

Returns true if this payment option requires a billing profile.

Returns list of valid type values.

Functions

changeset(payment_option, attrs)

Changeset for creating and updating payment options.

codes()

Returns list of valid code values.

icon_name(arg1)

Returns the icon name for a payment option.

offline?(arg1)

Returns true if this payment option is an offline payment.

online?(arg1)

Returns true if this payment option is an online payment.

requires_billing?(arg1)

Returns true if this payment option requires a billing profile.

types()

Returns list of valid type values.