Kobble
  1. Cards
Kobble
  • Introduction
  • API Fundamentals
    • Idempotency
    • Rate Limits
    • Healthcheck
      GET
  • Authorization
    • Authorization
    • Get access token
      POST
  • Beneficiaries
    • List all beneficiaries
      GET
    • Get beneficiary by ID
      GET
    • Create beneficiary
      POST
    • Update beneficiary
      PUT
    • Create Payid beneficiary
      POST
  • Cards
    • Cards API
    • Card Creation Flow — Developer Guide & Onboarding
    • Get all cards
      GET
    • Create a new card
      POST
    • Get card by ID
      GET
    • Update card status
      PATCH
    • Replace or renew card
      POST
    • Generate card secret
      POST
  • Card Programs
    • Card Programs API
    • Get all programs
      GET
    • Create a new program
      POST
    • Get program by ID
      GET
  • Clients
    • Clients API
    • Get all clients
      GET
    • Get client by ID
      GET
    • Create a new client
      POST
    • Update client status
      PATCH
  • Endusers
    • Endusers API
    • Usage of Metadata on Endusers
    • Get all endusers
    • Create a new enduser
    • Get enduser by ID
  • Transactions
    • Transactions API
    • Get all transactions
    • Create a transaction
    • Get transaction by ID
    • Create manual credit transaction
    • Create manual debit transaction
  • Wallets
    • Wallets API
    • Get all wallets
    • Create a new wallet
    • Get wallet by ID
    • Update wallet
  • Relays
    • Relays API
    • Create subscription
  • Webhooks
    • Webhooks API
    • Webhook Signature Verification
    • Get all webhooks
    • Create a webhook
    • Delete a webhook
  • Schemas
    • Schemas
      • Webhook
      • Relay
      • Client
      • Beneficiary
      • Card
      • CardCreateInputDto
      • CardStatusUpdateDto
      • CardRenewReplaceInputDto
      • Program
      • MetadataKobbleDebit1
      • ProgramCreateInputDto
      • Person
      • Company
      • Enduser
      • Enduser Create Person Input
      • Enduser Create Company Input
      • Metadata
      • Enduser Create Input DTO
      • Transaction
      • TransactionCreateManualCreditInputDto
      • TransactionCreateInputDto
      • Wallet
      • WalletCreateInputDto
      • WalletUpdateInputDto
  1. Cards

Card Creation Flow — Developer Guide & Onboarding

Overview#

This guide describes the Card Creation flow for the Kobble Card API. It is intended for developers integrating with Kobble so they can onboard and implement card issuance without additional support. All critical operational and integration details are covered here.
Related documentation:
Authorization — how to obtain an access token
Base URLs:
Development: https://dev.apikobble.net/
Staging: https://staging.apikobble.net/

Prerequisites#

Before calling Create Card, the following must exist and satisfy the conditions below. They must be created in order.
#PrerequisiteDescriptionHow to obtain
1EnduserThe person or company that will “hold” the wallet and card. For card creation, the enduser must be of type person (not company), with first_name, last_name, email, and phone_number.POST /api/endusers with person payload. Store the returned id.
2WalletAn ACTIVE wallet linked to that enduser via holder_id. The wallet must not already have an external_id (i.e. it must not already be linked to a card/entity).POST /api/wallets with holder_id = enduser id, plus asset, asset_class, partner_product. Store the returned id.
3Program IDA valid, ACTIVE card program. The program’s metadata must conform to the card product (e.g. MetadataKobbleDebit1: parent_account_id, product_id; optional group_id).Create/configure program via Kobble (or POST /api/programs if exposed). Store the program id.

Prerequisite details#

Enduser (person):
Must belong to the same client (owner) as the one making the Card API request.
Must have person data (not only company). Card creation uses person.first_name, person.last_name, person.email, person.phone_number for the card product and 3DS enrolment.
Wallet:
holder_id must be the enduser id.
status must be ACTIVE.
external_id must be null. If the wallet already has an external_id, it is considered linked to another entity; card creation will fail with Invalid wallet with existing entity association.
Program:
Must exist and be ACTIVE.
For Kobble Debit 1–style programs, metadata must include at least:
parent_account_id (string)
product_id (string)
group_id (optional, array of strings)

Step-by-step flow for creating a card#

1.
Obtain an access token
Use your client credentials and the Authorization flow. Send this token as Authorization: Bearer {access_token} on every Card API request.
2.
Create an enduser (person)
POST /api/endusers with a JSON body containing person (e.g. first_name, last_name, email, phone_number).
→ Response includes id. This is the enduser id.
3.
Create a wallet
POST /api/wallets with:
holder_id: the enduser id from step 2
asset, asset_class, partner_product as required by your product
→ Response includes id. This is the wallet id.
4.
Create the card
POST /api/cards with:
Headers: Authorization: Bearer {access_token}, idempotency-key: {unique-key}, x-client-id: {client-id}
Body: { "wallet_id": "<wallet-id>", "program_id": "<program-id>" }
→ Response is the created Card resource (e.g. id, wallet_id, program_id, status, external_id, last_four_digit, expiry, etc.).
5.
Optional: activate or manage the card
Use Update Card Status (PATCH /api/cards/:id/status) or other Card API endpoints as needed.

Sequence diagram#

The following diagram shows the client-side call sequence: the order in which your application calls Kobble endpoints to create a card. It is intended for developers integrating with the Kobble API and does not describe Kobble’s internal systems.

Example call chain#

1. Create enduser (person)#

Example response: { "id": "550e8400-e29b-41d4-a716-446655440001", ... }
→ Use this id as holder_id when creating the wallet.

2. Create wallet#

Example response: { "id": "660e8400-e29b-41d4-a716-446655440002", "holder_id": "550e8400-...", "status": "ACTIVE", "external_id": null, ... }
→ Use this id as wallet_id when creating the card.

3. Create card#

Example response (201 Created):
{
  "id": "990e8400-e29b-41d4-a716-446655440005",
  "wallet_id": "660e8400-e29b-41d4-a716-446655440002",
  "program_id": "880e8400-e29b-41d4-a716-446655440004",
  "status": "INACTIVE",
  "external_id": "12345",
  "last_four_digit": "4242",
  "expiry": "2027-12-31T23:59:59.000Z",
  "type": "VIRTUAL",
  "m_pan": "...",
  "owner": "<client-id>",
  "created_at": "...",
  "updated_at": "..."
}

Request and response reference (Create Card)#

ItemValue
MethodPOST
Path/api/cards
HeadersAuthorization: Bearer {access_token}, x-client-id: {client-id}, idempotency-key: {unique-key}, Content-Type: application/json
Bodywallet_id (UUID), program_id (UUID)
Success201 Created — body is the created Card object
IdempotencySame idempotency-key within a time window returns the same created card and does not create a duplicate. Always send a unique key per logical “create” request (e.g. UUID).

Validation and error behaviour#

The service validates in this order; the first failure returns the corresponding error:
OrderCheckError (typical message / scope)
1Program exists and is validInvalid program id (User)
2Program metadata valid (e.g. MetadataKobbleDebit1)Invalid metadata (User)
3Wallet exists, status ACTIVE, owner matchInvalid or dormant wallet (User)
4Wallet has no external_idInvalid wallet with existing entity association (User)
5Enduser exists for wallet.holder_idInvalid enduser associated with wallet (User)
6Enduser belongs to requesting client (owner)Enduser does not belong to requesting client (User)
7Enduser has person (not only company)Unsupported enduser entity type (User)
8Card provider (e.g. Paymentology) succeedsUnable to create card (Runtime) or provider error
Standard HTTP status codes apply (e.g. 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error). Use the response body and headers as defined in the Cards API and your contract.

Idempotency#

Header: idempotency-key (required for POST /api/cards).
Use a unique value per logical “create card” operation (e.g. UUID).
If the same key is sent again within the configured idempotency window, the API returns the same created card without creating a second one.
This avoids duplicate cards when retrying after timeouts or network errors.

Outcome#

With this guide, developers can:
Understand the prerequisites (enduser → wallet → program-id) and create them in the correct order.
Follow the step-by-step flow and the sequence diagram to see how the Card API interacts with Programs, Wallets, Endusers, and the card provider.
Use the example call chain to implement and test card creation.
Handle validation and errors and use idempotency correctly.
For exact request/response schemas, error codes, and environment-specific behaviour, use the Cards API documentation.
Modified at 2026-01-30 03:14:34
Previous
Cards API
Next
Get all cards
Built with