Cards issued on an Increase account, their sensitive details, and the
basics of Physical Cards. Card numbers and verification codes are
cardholder data under PCI DSS: prefer create-details-iframe, which
shows them to the cardholder without them passing through your
systems. get-card-details returns them in the clear; never log or
store that response.
Functions
create-card
fn (params: Map): Map
fn (params: Map, opts: Map): Map
POST /cards: issue a virtual card on an Account. params needs
account_id; optional description, entity_id, billing_address: {line1, city, state, postal_code}, cardholder_name: {first, last},
digital_wallet: {email, phone, digital_card_profile_id},
authorization_controls and replacement_for: {card_id, reason}.
Example
card ::increase::cards/create-card({account_id: "account_in71c4amph0vgo2qllky", description: "Travel card"},
{idempotency-key: "card-travel-ada"})
card.last4
create-details-iframe
fn (card-id: Str): Map
fn (card-id: Str, physical-card-id: Str?): Map
fn (card-id: Str, physical-card-id: Str?, opts: Map): Map
POST /cards/{card_id}/create_details_iframe: a short-lived iframe_url
that shows the card's details to the cardholder, so the number never
touches your servers. physical-card-id (or null) picks a physical
card's details.
Example
iframe ::increase::cards/create-details-iframe("card_oubs0hwk5rn6knuecxg2")
iframe.iframe_url
create-physical-card
fn (params: Map): Map
fn (params: Map, opts: Map): Map
POST /physical_cards: print and ship a plastic card for an existing
Card. params needs card_id, cardholder: {first_name, last_name}
and shipment: {method, address: {name, line1, city, state, postal_code, country}}; optional physical_card_profile_id.
Example
::increase::cards/create-physical-card({
card_id: "card_oubs0hwk5rn6knuecxg2",
cardholder: {first_name: "Ian", last_name: "Crease"},
shipment: {
method: "usps",
address: {name: "Ian Crease", line1: "33 Liberty Street", city: "New York", state: "NY", postal_code: "10045", country: "US"}
}
}, {idempotency-key: "physical-card-ian"})
get-card
fn (card-id: Str): Map
fn (card-id: Str, opts: Map): Map
GET /cards/{card_id}: retrieve a Card (its last4 and expiration, not
the full number).
Example
card ::increase::cards/get-card("card_oubs0hwk5rn6knuecxg2")
card.last4
get-card-details
fn (card-id: Str): Map
fn (card-id: Str, opts: Map): Map
GET /cards/{card_id}/details: the full primary_account_number,
expiration_month, expiration_year, verification_code and pin.
This is cardholder data in the clear: calling it brings your system
into PCI scope. Never log, store or show the result to an agent.
Prefer create-details-iframe.
Example
// Cardholder data: use the fields, never log the response.
details ::increase::cards/get-card-details("card_oubs0hwk5rn6knuecxg2")
details.expiration_year
get-physical-card
fn (physical-card-id: Str): Map
fn (physical-card-id: Str, opts: Map): Map
GET /physical_cards/{physical_card_id}: retrieve a Physical Card,
including its shipment.status and tracking.
Example
card ::increase::cards/get-physical-card("physical_card_ode8duyq5v2ynhjoharl")
card.shipment.status
list-cards
fn (): Map
fn (params: Map): Map
fn (params: Map, opts: Map): Map
GET /cards: one page of Cards. Filters: account_id, "status.in"
(active, disabled, canceled), created_at, idempotency_key,
limit, cursor.
Example
page ::increase::cards/list-cards({account_id: "account_in71c4amph0vgo2qllky", "status.in": ["active"]})
map(page.data, %.id)
list-physical-cards
fn (): Map
fn (params: Map): Map
fn (params: Map, opts: Map): Map
GET /physical_cards: one page of Physical Cards. Filters: card_id,
created_at, idempotency_key, limit, cursor.
Example
page ::increase::cards/list-physical-cards({card_id: "card_oubs0hwk5rn6knuecxg2", limit: 25})
map(page.data, %.id)
update-card
fn (card-id: Str, params: Map): Map
fn (card-id: Str, params: Map, opts: Map): Map
PATCH /cards/{card_id}: change description, status ("active",
"disabled", or "canceled", which is permanent), billing_address,
digital_wallet, entity_id or authorization_controls.
Example
::increase::cards/update-card("card_oubs0hwk5rn6knuecxg2", {status: "disabled"})
update-physical-card
fn (physical-card-id: Str, status: Str): Map
fn (physical-card-id: Str, status: Str, opts: Map): Map
PATCH /physical_cards/{physical_card_id}: set status to "active",
"disabled" or "canceled".
Example
::increase::cards/update-physical-card("physical_card_ode8duyq5v2ynhjoharl", "disabled")