Skip to content
innovorder
⌘K

Money movement

Cards (Stripe)

System map · Card setup
Customer card
Stripe
Saved card

Manage saved payment cards for customers using Stripe as the payment provider. Customers can store, list, and remove cards linked to their account.

Cards are created and stored on Innovorder's platform Stripe account. Tokenizing a card client-side requires the platform publishable key, which is provided as part of an integration project. Contact support@innovorder.fr. For the end-to-end payment flow (metadata contract of POST /orders, 3-D Secure), see the Stripe Payments guide.

POST/cards/v2Create a card (Stripe)

Register a payment card for the authenticated customer (Customer role required) in two calls. First, call WITHOUT cardToken: a Stripe SetupIntent is created on the Innovorder platform account and its client_secret is returned - confirm it client-side (e.g. stripe.confirmCardSetup(client_secret, { payment_method: { card } })) to obtain a PaymentMethod id (pm_…). Then call again WITH cardToken set to that pm_… id: the card is attached to the customer and persisted. The Stripe Customer is created automatically on the first save.

Request Body

json
{
  "name": "My Visa",
  "cardToken": "pm_1PxYz..."
}
Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeRequiredExampleDescription
namestringYes"My Visa"Display name of the card.
cardTokenstringNo"pm_1PxYz..."Stripe PaymentMethod id (pm_…) obtained by confirming the SetupIntent. Omit it to receive the SetupIntent client_secret instead (first call).

Response

json
{
  "status": 200,
  "code": "create_card_succeed",
  "message": "Credit card has been successfully created.",
  "data": {
    "cardId": 4521,
    "name": "My Visa",
    "brand": "visa",
    "last4": "4242"
  }
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeRequiredExampleDescription
statusintegerNot specified200HTTP status code returned by the API.
codestringNot specified"create_card_succeed"Machine-readable application code for the result.
messagestringNot specified"Credit card has been successfully created."Human-readable result message. Do not use this value for program logic.
dataobjectNot specified{…}Endpoint-specific response payload.
data.cardIdintegerNot specified4521Identifier of the associated card.
data.namestringNot specified"My Visa"The name value.
data.brandstringNot specified"visa"The brand value.
data.last4stringNot specified"4242"The last4 value.
cardIdintegerYesNot providedPersisted card id. Use it to pay in POST /orders with payment metadata "{\"cardId\":4521}".

First call - without cardToken (SetupIntent creation)

json
// POST /cards/v2   { "name": "My Visa" }
{
  "status": 200,
  "code": "create_card_succeed",
  "message": "Credit card has been successfully created.",
  "data": {
    "client_secret": "seti_1PxYz..._secret_AbC..."
  }
}

GET/cardsList all cards (Stripe)

Retrieve all saved payment cards for a given customer. Requires the customerId as a query parameter.

Parameters

NameTypeRequiredDescription
customerIdintegerYesThe customer whose cards to retrieve.

Response

json
{
  "status": 200,
  "code": "card_succeed",
  "data": [
    {
      "cardId": 4521,
      "name": "My Visa",
      "stripeCardId": "card_1PxYz...",
      "last4": "4242",
      "brand": "visa",
      "expMonth": 12,
      "expYear": 2027
    },
    {
      "cardId": 4522,
      "name": "My Mastercard",
      "stripeCardId": "card_1QaWs...",
      "last4": "5555",
      "brand": "mastercard",
      "expMonth": 6,
      "expYear": 2026
    }
  ]
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"card_succeed"Machine-readable application code for the result.
dataarray[…]Endpoint-specific response payload.
data[]object{…}Endpoint-specific response payload.
data[].cardIdinteger4521Identifier of the associated card.
data[].namestring"My Visa"The name value.
data[].stripeCardIdstring"card_1PxYz..."Identifier of the associated stripe card.
data[].last4string"4242"The last4 value.
data[].brandstring"visa"The brand value.
data[].expMonthinteger12The exp month value.
data[].expYearinteger2027The exp year value.

DELETE/cards/{cardId}Delete a card (Stripe)

Remove a saved payment card. The card is disabled in the system and the corresponding Stripe payment method is detached.

Parameters

NameTypeRequiredDescription
cardIdintegerYesThe ID of the card to delete.

Response

json
{
  "status": 200,
  "code": "delete_card_succeed",
  "message": "Card deleted successfully."
}
Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

PropertyTypeExampleDescription
statusinteger200HTTP status code returned by the API.
codestring"delete_card_succeed"Machine-readable application code for the result.
messagestring"Card deleted successfully."Human-readable result message. Do not use this value for program logic.