DodoPayments.Enums (dodo_payments v0.1.0)

Copy Markdown View Source

Source-locked Dodo enum types and their safe JSON-boundary conversions.

Request APIs use the atom types. Decoded responses use the corresponding decoded_* type, which adds %DodoPayments.UnknownEnum{} for forward compatibility. No atom is ever created from server or caller input.

Summary

Types

Functions

Converts a known atom, compatible string, or unknown wrapper to its wire string.

Converts an enum value to its wire string or raises for a mismatched atom/domain.

Decodes a wire string without ever creating an atom dynamically.

Returns every enum domain known to the source-locked SDK schema.

Returns the canonical Elixir atoms for an enum domain.

Types

abandoned_checkout_status()

@type abandoned_checkout_status() ::
  :opted_out | :exhausted | :recovered | :recovering | :abandoned

abandonment_reason()

@type abandonment_reason() :: :checkout_incomplete | :payment_failed

balance_event_type()

@type balance_event_type() ::
  :byop_fee
  | :payment_retry_fee
  | :dunning_fees
  | :abandoned_cart_recovery_fee
  | :currency_conversion
  | :adjustment
  | :dodo_credits
  | :payout_fees_reversal
  | :payout_reversal
  | :payout_fees
  | :payout
  | :dispute_fees
  | :refund_fees_reversal
  | :refund_fees
  | :payment_fees
  | :tax_reversal
  | :tax
  | :dispute_reversal
  | :dispute
  | :refund_reversal
  | :refund
  | :payment

brand_verification_status()

@type brand_verification_status() :: :hold | :review | :fail | :success

cancellation_feedback()

@type cancellation_feedback() ::
  :other
  | :too_complex
  | :low_quality
  | :customer_service
  | :unused
  | :switched_service
  | :missing_features
  | :too_expensive

cbb_overage_behavior()

@type cbb_overage_behavior() ::
  :carry_deficit_auto_repay
  | :carry_deficit
  | :invoice_at_billing
  | :forgive_at_reset

cbb_proration_behavior()

@type cbb_proration_behavior() :: :no_prorate | :prorate

checkout_theme()

@type checkout_theme() :: :system | :light | :dark

country_code()

@type country_code() ::
  :zw
  | :zm
  | :ye
  | :eh
  | :wf
  | :vi
  | :vg
  | :vn
  | :ve
  | :vu
  | :uz
  | :uy
  | :us
  | :um
  | :gb
  | :ae
  | :ua
  | :ug
  | :tv
  | :tc
  | :tm
  | :tr
  | :tn
  | :tt
  | :to
  | :tk
  | :tg
  | :tl
  | :th
  | :tz
  | :tj
  | :tw
  | :sy
  | :ch
  | :se
  | :sz
  | :sj
  | :sr
  | :sd
  | :lk
  | :es
  | :ss
  | :gs
  | :za
  | :so
  | :sb
  | :si
  | :sk
  | :sx
  | :sg
  | :sl
  | :sc
  | :rs
  | :sn
  | :sa
  | :st
  | :sm
  | :ws
  | :vc
  | :pm
  | :mf
  | :lc
  | :kn
  | :sh
  | :bl
  | :rw
  | :ru
  | :ro
  | :re
  | :qa
  | :pr
  | :pt
  | :pl
  | :pn
  | :ph
  | :pe
  | :py
  | :pg
  | :pa
  | :ps
  | :pw
  | :pk
  | :om
  | :no
  | :mp
  | :nf
  | :nu
  | :ng
  | :ne
  | :ni
  | :nz
  | :nc
  | :nl
  | :np
  | :nr
  | :na
  | :mm
  | :mz
  | :ma
  | :ms
  | :me
  | :mn
  | :mc
  | :md
  | :fm
  | :mx
  | :yt
  | :mu
  | :mr
  | :mq
  | :mh
  | :mt
  | :ml
  | :mv
  | :my
  | :mw
  | :mg
  | :mk
  | :mo
  | :lu
  | :lt
  | :li
  | :ly
  | :lr
  | :ls
  | :lb
  | :lv
  | :la
  | :kg
  | :kw
  | :kr
  | :kp
  | :ki
  | :ke
  | :kz
  | :jo
  | :je
  | :jp
  | :jm
  | :it
  | :il
  | :im
  | :ie
  | :iq
  | :ir
  | :id
  | :in
  | :is
  | :hu
  | :hk
  | :hn
  | :va
  | :hm
  | :ht
  | :gy
  | :gw
  | :gn
  | :gg
  | :gt
  | :gu
  | :gp
  | :gd
  | :gl
  | :gr
  | :gi
  | :gh
  | :de
  | :ge
  | :gm
  | :ga
  | :tf
  | :pf
  | :gf
  | :fr
  | :fi
  | :fj
  | :fo
  | :fk
  | :et
  | :ee
  | :er
  | :gq
  | :sv
  | :eg
  | :ec
  | :do
  | :dm
  | :dj
  | :dk
  | :cz
  | :cy
  | :cw
  | :cu
  | :hr
  | :ci
  | :cr
  | :ck
  | :cd
  | :cg
  | :km
  | :co
  | :cc
  | :cx
  | :cn
  | :cl
  | :td
  | :cf
  | :ky
  | :cv
  | :ca
  | :cm
  | :kh
  | :bi
  | :bf
  | :bg
  | :bn
  | :io
  | :br
  | :bv
  | :bw
  | :ba
  | :bq
  | :bo
  | :bt
  | :bm
  | :bj
  | :bz
  | :be
  | :by
  | :bb
  | :bd
  | :bh
  | :bs
  | :az
  | :at
  | :au
  | :aw
  | :am
  | :ar
  | :ag
  | :aq
  | :ai
  | :ao
  | :ad
  | :as
  | :dz
  | :al
  | :ax
  | :af

credit_grant_source_type()

@type credit_grant_source_type() ::
  :rollover | :api | :addon | :one_time | :subscription

credit_grant_status()

@type credit_grant_status() :: :depleted | :expired | :active

credit_transaction_type()

@type credit_transaction_type() ::
  :refund
  | :manual_adjustment
  | :auto_top_up
  | :overage_reset
  | :overage_charged
  | :rollover_forfeited
  | :credit_rolled_over
  | :credit_expired
  | :credit_deducted
  | :credit_added

currency()

@type currency() ::
  :zmw
  | :zar
  | :yer
  | :xpf
  | :xof
  | :xcd
  | :xaf
  | :wst
  | :vuv
  | :vnd
  | :ves
  | :uzs
  | :uyu
  | :usd
  | :ugx
  | :uah
  | :tzs
  | :twd
  | :ttd
  | :try
  | :top
  | :tnd
  | :thb
  | :szl
  | :svc
  | :stn
  | :ssp
  | :srd
  | :sos
  | :sll
  | :sle
  | :shp
  | :sgd
  | :sek
  | :scr
  | :sbd
  | :sar
  | :rwf
  | :rub
  | :rsd
  | :ron
  | :qar
  | :pyg
  | :pln
  | :pkr
  | :php
  | :pgk
  | :pen
  | :pab
  | :omr
  | :nzd
  | :npr
  | :nok
  | :nio
  | :ngn
  | :nad
  | :mzn
  | :myr
  | :mxn
  | :mwk
  | :mvr
  | :mur
  | :mru
  | :mop
  | :mnt
  | :mmk
  | :mkd
  | :mga
  | :mdl
  | :mad
  | :lyd
  | :lsl
  | :lrd
  | :lkr
  | :lbp
  | :lak
  | :kzt
  | :kyd
  | :kwd
  | :krw
  | :kmf
  | :khr
  | :kgs
  | :kes
  | :jpy
  | :jod
  | :jmd
  | :iqd
  | :inr
  | :ils
  | :idr
  | :huf
  | :htg
  | :hrk
  | :hnl
  | :hkd
  | :gyd
  | :gtq
  | :gnf
  | :gmd
  | :gip
  | :ghs
  | :gel
  | :gbp
  | :fkp
  | :fjd
  | :eur
  | :etb
  | :egp
  | :dzd
  | :dop
  | :dkk
  | :djf
  | :czk
  | :cve
  | :cup
  | :crc
  | :cop
  | :cny
  | :clp
  | :chf
  | :cad
  | :bzd
  | :byn
  | :bwp
  | :bsd
  | :brl
  | :bob
  | :bnd
  | :bmd
  | :bif
  | :bhd
  | :bgn
  | :bdt
  | :bbd
  | :bam
  | :azn
  | :awg
  | :aud
  | :ars
  | :aoa
  | :ang
  | :amd
  | :all
  | :aed

custom_field_type()

@type custom_field_type() ::
  :boolean | :dropdown | :date | :url | :email | :number | :text

customer_eligibility()

@type customer_eligibility() :: :specific | :existing | :first_time | :any

customer_entitlement_grant_status()

@type customer_entitlement_grant_status() ::
  :revoked | :failed | :delivered | :pending

decoded_abandoned_checkout_status()

@type decoded_abandoned_checkout_status() ::
  abandoned_checkout_status() | DodoPayments.UnknownEnum.t()

decoded_abandonment_reason()

@type decoded_abandonment_reason() ::
  abandonment_reason() | DodoPayments.UnknownEnum.t()

decoded_balance_event_type()

@type decoded_balance_event_type() ::
  balance_event_type() | DodoPayments.UnknownEnum.t()

decoded_brand_verification_status()

@type decoded_brand_verification_status() ::
  brand_verification_status() | DodoPayments.UnknownEnum.t()

decoded_cancellation_feedback()

@type decoded_cancellation_feedback() ::
  cancellation_feedback() | DodoPayments.UnknownEnum.t()

decoded_cbb_overage_behavior()

@type decoded_cbb_overage_behavior() ::
  cbb_overage_behavior() | DodoPayments.UnknownEnum.t()

decoded_cbb_proration_behavior()

@type decoded_cbb_proration_behavior() ::
  cbb_proration_behavior() | DodoPayments.UnknownEnum.t()

decoded_checkout_theme()

@type decoded_checkout_theme() :: checkout_theme() | DodoPayments.UnknownEnum.t()

decoded_country_code()

@type decoded_country_code() :: country_code() | DodoPayments.UnknownEnum.t()

decoded_credit_grant_source_type()

@type decoded_credit_grant_source_type() ::
  credit_grant_source_type() | DodoPayments.UnknownEnum.t()

decoded_credit_grant_status()

@type decoded_credit_grant_status() ::
  credit_grant_status() | DodoPayments.UnknownEnum.t()

decoded_credit_transaction_type()

@type decoded_credit_transaction_type() ::
  credit_transaction_type() | DodoPayments.UnknownEnum.t()

decoded_currency()

@type decoded_currency() :: currency() | DodoPayments.UnknownEnum.t()

decoded_custom_field_type()

@type decoded_custom_field_type() ::
  custom_field_type() | DodoPayments.UnknownEnum.t()

decoded_customer_eligibility()

@type decoded_customer_eligibility() ::
  customer_eligibility() | DodoPayments.UnknownEnum.t()

decoded_customer_entitlement_grant_status()

@type decoded_customer_entitlement_grant_status() ::
  customer_entitlement_grant_status() | DodoPayments.UnknownEnum.t()

decoded_discount_type()

@type decoded_discount_type() :: discount_type() | DodoPayments.UnknownEnum.t()

decoded_dispute_stage()

@type decoded_dispute_stage() :: dispute_stage() | DodoPayments.UnknownEnum.t()

decoded_dispute_status()

@type decoded_dispute_status() :: dispute_status() | DodoPayments.UnknownEnum.t()

decoded_dunning_status()

@type decoded_dunning_status() :: dunning_status() | DodoPayments.UnknownEnum.t()

decoded_dunning_trigger_state()

@type decoded_dunning_trigger_state() ::
  dunning_trigger_state() | DodoPayments.UnknownEnum.t()

decoded_effective_at()

@type decoded_effective_at() :: effective_at() | DodoPayments.UnknownEnum.t()

decoded_entitlement_grant_status()

@type decoded_entitlement_grant_status() ::
  entitlement_grant_status() | DodoPayments.UnknownEnum.t()

decoded_entitlement_integration_type()

@type decoded_entitlement_integration_type() ::
  entitlement_integration_type() | DodoPayments.UnknownEnum.t()

decoded_feature_type()

@type decoded_feature_type() :: feature_type() | DodoPayments.UnknownEnum.t()

decoded_font_size()

@type decoded_font_size() :: font_size() | DodoPayments.UnknownEnum.t()

decoded_font_weight()

@type decoded_font_weight() :: font_weight() | DodoPayments.UnknownEnum.t()

decoded_github_permission()

@type decoded_github_permission() ::
  github_permission() | DodoPayments.UnknownEnum.t()

decoded_intent_status()

@type decoded_intent_status() :: intent_status() | DodoPayments.UnknownEnum.t()

decoded_ledger_entry_type()

@type decoded_ledger_entry_type() ::
  ledger_entry_type() | DodoPayments.UnknownEnum.t()

decoded_license_fulfillment_mode()

@type decoded_license_fulfillment_mode() ::
  license_fulfillment_mode() | DodoPayments.UnknownEnum.t()

decoded_license_key_source()

@type decoded_license_key_source() ::
  license_key_source() | DodoPayments.UnknownEnum.t()

decoded_license_key_status()

@type decoded_license_key_status() ::
  license_key_status() | DodoPayments.UnknownEnum.t()

decoded_meter_aggregation()

@type decoded_meter_aggregation() ::
  meter_aggregation() | DodoPayments.UnknownEnum.t()

decoded_meter_conjunction()

@type decoded_meter_conjunction() ::
  meter_conjunction() | DodoPayments.UnknownEnum.t()

decoded_meter_filter_operator()

@type decoded_meter_filter_operator() ::
  meter_filter_operator() | DodoPayments.UnknownEnum.t()

decoded_payment_failure_behavior()

@type decoded_payment_failure_behavior() ::
  payment_failure_behavior() | DodoPayments.UnknownEnum.t()

decoded_payment_method_family()

@type decoded_payment_method_family() ::
  payment_method_family() | DodoPayments.UnknownEnum.t()

decoded_payment_method_type()

@type decoded_payment_method_type() ::
  payment_method_type() | DodoPayments.UnknownEnum.t()

decoded_payment_provider()

@type decoded_payment_provider() :: payment_provider() | DodoPayments.UnknownEnum.t()

decoded_payment_refund_status()

@type decoded_payment_refund_status() ::
  payment_refund_status() | DodoPayments.UnknownEnum.t()

decoded_payout_status()

@type decoded_payout_status() :: payout_status() | DodoPayments.UnknownEnum.t()

decoded_price_type()

@type decoded_price_type() :: price_type() | DodoPayments.UnknownEnum.t()

decoded_pricing_mode()

@type decoded_pricing_mode() :: pricing_mode() | DodoPayments.UnknownEnum.t()

decoded_proration_billing_mode()

@type decoded_proration_billing_mode() ::
  proration_billing_mode() | DodoPayments.UnknownEnum.t()

decoded_refund_status()

@type decoded_refund_status() :: refund_status() | DodoPayments.UnknownEnum.t()

decoded_subscription_payment_method_selection()

@type decoded_subscription_payment_method_selection() ::
  subscription_payment_method_selection() | DodoPayments.UnknownEnum.t()

decoded_subscription_status()

@type decoded_subscription_status() ::
  subscription_status() | DodoPayments.UnknownEnum.t()

decoded_tax_category()

@type decoded_tax_category() :: tax_category() | DodoPayments.UnknownEnum.t()

decoded_time_interval()

@type decoded_time_interval() :: time_interval() | DodoPayments.UnknownEnum.t()

decoded_wallet_event_type()

@type decoded_wallet_event_type() ::
  wallet_event_type() | DodoPayments.UnknownEnum.t()

decoded_webhook_event_type()

@type decoded_webhook_event_type() ::
  webhook_event_type() | DodoPayments.UnknownEnum.t()

discount_type()

@type discount_type() :: :percentage | :flat

dispute_stage()

@type dispute_stage() :: :pre_arbitration | :dispute | :pre_dispute

dispute_status()

@type dispute_status() ::
  :dispute_lost
  | :dispute_won
  | :dispute_challenged
  | :dispute_cancelled
  | :dispute_accepted
  | :dispute_expired
  | :dispute_opened

dunning_status()

@type dunning_status() :: :exhausted | :recovered | :recovering

dunning_trigger_state()

@type dunning_trigger_state() :: :cancelled | :on_hold

effective_at()

@type effective_at() :: :next_billing_date | :immediately

entitlement_grant_status()

@type entitlement_grant_status() :: :revoked | :failed | :delivered | :pending

entitlement_integration_type()

@type entitlement_integration_type() ::
  :feature_flag
  | :license_key
  | :digital_files
  | :notion
  | :framer
  | :figma
  | :github
  | :telegram
  | :discord

feature_type()

@type feature_type() :: :boolean

font_size()

@type font_size() :: :"2xl" | :xl | :lg | :md | :sm | :xs

font_weight()

@type font_weight() :: :extra_bold | :bold | :medium | :normal

github_permission()

@type github_permission() :: :triage | :maintain | :admin | :push | :pull

intent_status()

@type intent_status() ::
  :partially_captured_and_capturable
  | :partially_captured
  | :requires_capture
  | :requires_confirmation
  | :requires_payment_method
  | :requires_merchant_action
  | :requires_customer_action
  | :processing
  | :cancelled
  | :failed
  | :succeeded

ledger_entry_type()

@type ledger_entry_type() :: :debit | :credit

license_fulfillment_mode()

@type license_fulfillment_mode() :: :manual | :auto

license_key_source()

@type license_key_source() :: :manual | :import | :auto

license_key_status()

@type license_key_status() :: :disabled | :expired | :active

meter_aggregation()

@type meter_aggregation() :: :last | :max | :sum | :count

meter_conjunction()

@type meter_conjunction() :: :or | :and

meter_filter_operator()

@type meter_filter_operator() ::
  :does_not_contain
  | :contains
  | :less_than_or_equals
  | :less_than
  | :greater_than_or_equals
  | :greater_than
  | :not_equals
  | :equals

payment_failure_behavior()

@type payment_failure_behavior() :: :apply_change | :prevent_change

payment_method_family()

@type payment_method_family() ::
  :mobile_payment
  | :open_banking
  | :gift_card
  | :voucher
  | :upi
  | :real_time_payment
  | :reward
  | :bank_debit
  | :crypto
  | :bank_transfer
  | :bank_redirect
  | :wallet
  | :pay_later
  | :card_redirect
  | :card

payment_method_type()

@type payment_method_type() ::
  :satispay
  | :payco
  | :naver_pay
  | :revolut_pay
  | :zip
  | :billie
  | :instant_bank_transfer
  | :direct_carrier_billing
  | :open_banking_pis
  | :mifinity
  | :local_bank_transfer
  | :pay_easy
  | :seicomart
  | :family_mart
  | :mini_stop
  | :lawson
  | :seven_eleven
  | :we_chat_pay
  | :walley
  | :venmo
  | :viet_qr
  | :vipps
  | :upi_intent
  | :upi_collect
  | :twint
  | :trustly
  | :touch_n_go
  | :swish
  | :sofort
  | :sepa_bank_transfer
  | :sepa
  | :samsung_pay
  | :red_pagos
  | :red_compra
  | :pse
  | :prompt_pay
  | :przelewy24
  | :pay_safe_card
  | :pix
  | :paze
  | :paypal
  | :pay_bright
  | :open_banking_uk
  | :permata_bank_transfer
  | :pago_efectivo
  | :oxxo
  | :online_banking_slovakia
  | :online_banking_poland
  | :online_banking_fpx
  | :online_banking_finland
  | :online_banking_czech_republic
  | :online_banking_thailand
  | :multibanco
  | :momo_atm
  | :momo
  | :mobile_pay
  | :mb_way
  | :knet
  | :mandiri_va
  | :local_bank_redirect
  | :kakao_pay
  | :klarna
  | :indomaret
  | :interac
  | :ideal
  | :gcash
  | :go_pay
  | :google_pay
  | :givex
  | :giropay
  | :evoucher
  | :fps
  | :eps
  | :eft
  | :efecty
  | :duit_now
  | :debit
  | :danamon_va
  | :dana
  | :cashapp
  | :crypto_currency
  | :credit
  | :classic
  | :cimb_va
  | :card_redirect
  | :bri_va
  | :bni_va
  | :bca_bank_transfer
  | :boleto
  | :blik
  | :bizum
  | :benefit
  | :becs
  | :bancontact_card
  | :bacs
  | :atome
  | :apple_pay
  | :amazon_pay
  | :alma
  | :ali_pay_hk
  | :ali_pay
  | :alfamart
  | :afterpay_clearpay
  | :affirm
  | :ach

payment_provider()

@type payment_provider() :: :dodo | :adyen | :stripe

payment_refund_status()

@type payment_refund_status() :: :full | :partial

payout_status()

@type payout_status() :: :success | :failed | :on_hold | :in_progress | :not_initiated

price_type()

@type price_type() :: :usage_based_price | :recurring_price | :one_time_price

pricing_mode()

@type pricing_mode() :: :by_country | :by_currency

proration_billing_mode()

@type proration_billing_mode() ::
  :do_not_bill
  | :difference_immediately
  | :full_immediately
  | :prorated_immediately

refund_status()

@type refund_status() :: :review | :pending | :failed | :succeeded

subscription_payment_method_selection()

@type subscription_payment_method_selection() :: :existing | :new

subscription_status()

@type subscription_status() ::
  :expired | :failed | :cancelled | :paused | :on_hold | :active | :pending

tax_category()

@type tax_category() :: :live_tutoring | :edtech | :e_book | :saas | :digital_products

time_interval()

@type time_interval() :: :year | :month | :week | :day

wallet_event_type()

@type wallet_event_type() ::
  :merchant_adjustment
  | :dispute_reversal
  | :dispute
  | :refund_reversal
  | :refund
  | :payment_reversal
  | :payment

webhook_event_type()

@type webhook_event_type() ::
  :entitlement_grant_revoked
  | :entitlement_grant_failed
  | :entitlement_grant_delivered
  | :entitlement_grant_created
  | :dunning_recovered
  | :dunning_started
  | :abandoned_checkout_recovered
  | :abandoned_checkout_detected
  | :credit_balance_low
  | :credit_manual_adjustment
  | :credit_overage_reset
  | :credit_overage_charged
  | :credit_rollover_forfeited
  | :credit_rolled_over
  | :credit_expired
  | :credit_deducted
  | :credit_added
  | :payout_success
  | :payout_failed
  | :payout_in_progress
  | :payout_on_hold
  | :payout_created
  | :license_key_created
  | :subscription_update_payment_method
  | :subscription_updated
  | :subscription_plan_changed
  | :subscription_expired
  | :subscription_failed
  | :subscription_cancelled
  | :subscription_unpaused
  | :subscription_paused
  | :subscription_on_hold
  | :subscription_renewed
  | :subscription_active
  | :dispute_lost
  | :dispute_won
  | :dispute_challenged
  | :dispute_cancelled
  | :dispute_accepted
  | :dispute_expired
  | :dispute_opened
  | :refund_failed
  | :refund_succeeded
  | :payment_cancelled
  | :payment_processing
  | :payment_failed
  | :payment_succeeded

Functions

dump(enum, value)

@spec dump(atom(), atom() | String.t() | DodoPayments.UnknownEnum.t()) ::
  {:ok, String.t()} | {:error, :unknown_enum | :unknown_value}

Converts a known atom, compatible string, or unknown wrapper to its wire string.

dump!(enum, value)

@spec dump!(atom(), atom() | String.t() | DodoPayments.UnknownEnum.t()) :: String.t()

Converts an enum value to its wire string or raises for a mismatched atom/domain.

load(enum, value)

@spec load(atom(), term()) :: term()

Decodes a wire string without ever creating an atom dynamically.

names()

@spec names() :: [atom()]

Returns every enum domain known to the source-locked SDK schema.

values(enum)

@spec values(atom()) :: [atom()]

Returns the canonical Elixir atoms for an enum domain.