Green Dot cash loads ("Prime Cash") — let your customers add cash to their account at 90,000+ retail locations (Walmart, CVS, Walgreens, ...). Your application generates a barcode for the customer to present at the register; once the retailer accepts the cash, the load completes and funds post to the account.
Creating a cash load (generating a barcode)
{:ok, load} =
TreasuryPrime.Greendot.create(client, %{
account_id: "acct_1234567890",
channel_type: "mobile",
device_type: "mobile",
email_address: "[email protected]",
ip_address: "192.168.1.100",
latitude: "39.724121",
longitude: "-94.793228",
retailer_key: "1234"
})
load.barcode_number #=> the number/barcode to render for the customerUse TreasuryPrime.Greendot.locations/2 to help customers find a nearby
participating retail location.
Summary
Functions
Creates a cash load (generates a barcode for the customer to present at a
retail location). Required: account_id. The remaining fields
(channel_type, device_type, email_address, ip_address,
latitude, longitude, retailer_key) help with fraud screening and
retailer routing.
Fetches a single cash load by id.
Lists Green Dot cash loads.
Searches for nearby participating Green Dot retail locations. params
typically includes latitude and longitude.
Types
@type t() :: %TreasuryPrime.Greendot{ account_id: String.t() | nil, amount: String.t() | nil, authorized_at: String.t() | nil, available_at: String.t() | nil, bank_id: String.t() | nil, barcode_number: String.t() | nil, channel_type: String.t() | nil, completed_at: String.t() | nil, created_at: String.t() | nil, device_type: String.t() | nil, email_address: String.t() | nil, expired_at: String.t() | nil, id: String.t() | nil, ip_address: String.t() | nil, latitude: String.t() | nil, longitude: String.t() | nil, retailer_key: String.t() | nil, status: String.t() | nil, updated_at: String.t() | nil, voided_at: String.t() | nil }
Functions
@spec create(TreasuryPrime.Client.t(), map(), keyword()) :: {:ok, t()} | {:error, TreasuryPrime.Error.t()}
Creates a cash load (generates a barcode for the customer to present at a
retail location). Required: account_id. The remaining fields
(channel_type, device_type, email_address, ip_address,
latitude, longitude, retailer_key) help with fraud screening and
retailer routing.
@spec create!(TreasuryPrime.Client.t(), map(), keyword()) :: t()
@spec get(TreasuryPrime.Client.t(), String.t()) :: {:ok, t()} | {:error, TreasuryPrime.Error.t()}
Fetches a single cash load by id.
@spec get!(TreasuryPrime.Client.t(), String.t()) :: t()
@spec list(TreasuryPrime.Client.t(), map()) :: {:ok, TreasuryPrime.Page.t()} | {:error, TreasuryPrime.Error.t()}
Lists Green Dot cash loads.
Filterable params
account_id, status.
@spec list!(TreasuryPrime.Client.t(), map()) :: TreasuryPrime.Page.t()
@spec locations(TreasuryPrime.Client.t(), map()) :: {:ok, term()} | {:error, TreasuryPrime.Error.t()}
Searches for nearby participating Green Dot retail locations. params
typically includes latitude and longitude.