Skip to content

Create a card product

POST/v1/card-products

Requires an API client bearer token.

Creates a card product under the given programme. Requires an Idempotency-Key header. Emits card_product.created. The programme must hold a range covering the whole IIN, in the product's network and currency, under a BIN the organisation registered — both configured in the console. Refusals, as the problem `code`: `bin_not_registered` (404) when the organisation has not registered the IIN as a BIN of that network; `card_product_range_mismatch` (400) when the range covering the IIN is in another currency, or belongs to another programme the caller can also read. A registered BIN with no range covering the whole IIN is a 404, and so is one covered by a range of a programme the caller cannot read (a programme-pinned API client, for one).

Parameters

Header parameters

NameRequiredDescription
Idempotency-Keyrequired

Client-chosen. An identical retry with the same key returns the stored response; reusing the key with a different payload returns 409.

Request body

programme_idstring (uuid)required
namestringrequired
network"visa" | "mastercard"required
currency"EUR" | "GBP" | "USD"required
iinstringrequired
kyc_flowstring
billing_address_requiredboolean

When true, a card of this product cannot be activated until its cardholder has a billing address on file. Defaults to false. Fixed at creation.

product_class"consumer" | "commercial"

Consumer or commercial: always the class of the product's BIN. Optional on create, as a cross-check only — a value other than the BIN's is refused 409 product_class_conflict.

Example

curl -X POST https://api.rigid.fi/v1/card-products \
  -H "Authorization: Bearer $RIGID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "programme_id": "uuid",
  "name": "string",
  "network": "visa",
  "currency": "EUR",
  "iin": "string"
}'

Responses

201

Created card product.

programme_idstring (uuid)required
namestringrequired
network"visa" | "mastercard"required
currency"EUR" | "GBP" | "USD"required
iinstringrequired
kyc_flowstring
billing_address_requiredbooleanrequired
product_class"consumer" | "commercial"required
idstring (uuid)required
status"active" | "retired"required
created_atstringrequired
400

Validation error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401

Authentication required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403

Forbidden

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
404

`bin_not_registered`, or no range covers the whole IIN

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
409

Idempotency-Key reused with a different payload

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500

Internal server error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring