Stancer (stancer v0.1.0)

Copy Markdown

Stancer API client for Elixir.

Dynamically generates API functions from OpenAPI spec at compile time. API paths and versions come directly from the OpenAPI specification.

Configuration:

config :stancer,
  api_key: System.get_env("STANCER_API_KEY"),
  api_url: "https://api.stancer.com"

Summary

Functions

Capture a previously authorized payment.

Create a payment with card authorization (no capture).

Delete a card token.

Get card details by token.

Get payment details by ID.

Refund a captured payment.

Tokenize a card and return a card token.

Functions

capture_payment(payment_id, amount \\ nil)

Capture a previously authorized payment.

create_payment(payment_data)

Create a payment with card authorization (no capture).

Authorizes the card without capturing the funds.

delete_card(card_token)

Delete a card token.

get_card(card_token)

Get card details by token.

get_payment(payment_id)

Get payment details by ID.

refund_payment(payment_id, amount \\ nil)

Refund a captured payment.

request(method, path, body \\ nil, opts \\ [])

tokenize_card(card_data)

Tokenize a card and return a card token.

Takes a map with card details and returns a card token for future payments.