Stancer.API.Cards (stancer v0.1.0)

Copy Markdown

Summary

Functions

POST /v2/cards/

DELETE /v2/cards/{id}

GET /v2/cards/{id}

GET /v2/cards/

PATCH /v2/cards/{id}

Functions

create(data)

@spec create(map()) :: {:ok, map()} | {:error, term()}

POST /v2/cards/

Parameters

  • customer (string (matches ^cust_[a-zA-Z0-9]{24}$), optional) - Customer to assign the card
    • Example: "cust_yWYfCSzsUUhr9KwMv7vuLZHX"
  • cvc (string (3-4 chars), optional) - Card security code used to secure the transaction
  • exp_month (integer, optional) - Month expiration in MM format
  • exp_year (integer, optional) - Year expiration in YYYY format
  • external_id (string (1-36 chars), optional) - Unique id with unicity check
  • name (string (3-64 chars), optional) - custome name given to the card, often the card holder name
  • number (string (13-19 chars), optional) - Card number
  • preferred_network (string, optional) - Card network to use for co-branded card
    • Example: "national"
  • tokenize (boolean, optional) - Define if card can be reused for future payments
  • zip_code (string (2-16 chars), optional) - zip code in 2 to 8 digit format

delete(id)

@spec delete(String.t()) :: {:ok, map()} | {:error, term()}

DELETE /v2/cards/{id}

get(id)

@spec get(String.t()) :: {:ok, map()} | {:error, term()}

GET /v2/cards/{id}

list()

@spec list() :: {:ok, map()} | {:error, term()}

GET /v2/cards/

update(id, data)

@spec update(String.t(), map()) :: {:ok, map()} | {:error, term()}

PATCH /v2/cards/{id}

Parameters

  • exp_month (integer, optional) - Month in MM format
  • exp_year (integer, optional) - Year expiration in YYYY format
  • external_id (string (1-36 chars), optional) - Unique id with unicity check
  • zip_code (string (2-16 chars), optional) - Zip code in 2 to 8 digit format