For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a card

Fully updates a card. name, slug, bank, card_type, card_payment_type, cash_payment and installment_payment must all be present in the body; leaving any one of them out fails the request.

three_d_payment, installment_three_d_payment and is_commerce_card may be omitted, and are then left at their stored values rather than being cleared. Send a terminal field as null to remove the assignment, and is_commerce_card as false to unmark the card.

Because the code is required here, it is stored exactly as sent — the derivation described under The Code of a Card applies to partial updates only. The code must not belong to another card of the same bank, and the combination of bank, card_type and card_payment_type must not belong to another card.

When this request also moves the card to another bank, be aware that the code is checked against the cards of the bank the card belonged to before the request, not against those of the new bank.

A changed terminal assignment is in force for the next payment matched to the card — nothing caches the card between the update and the next payment.

put
/cards/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the card.

Body

Request body for registering or fully updating a card. name, slug, bank, card_type, card_payment_type, cash_payment and installment_payment are required on both operations.

On create, an omitted three_d_payment or installment_three_d_payment leaves the card without that terminal, and an omitted is_commerce_card stores the card as not being a commerce card. On a full update those three keep their stored values instead of being cleared; send a terminal field as null or is_commerce_card as false to reset them.

namestring · max: 64Required

Display name of the card.

Example: Example Card
slugstring · max: 64Required

The code that identifies the card within its bank. May contain only letters, digits, underscores and hyphens. Must not already belong to another card of the same bank.

Example: example-card
bankintegerRequired

Identifier of the bank the card belongs to. Must match an existing bank.

Example: 3
card_typeintegerRequired

Identifier of the card type. Must match an existing card type.

Example: 1
card_payment_typestring · enumRequired

Whether a card is a credit or a debit card.

  • credit — a credit card. A card stored without a payment type is treated as one.
  • debit — a debit card. While THREE_D_REDIRECT_DEBIT is on, which is the default, every payment matched to a card marked this way is redirected to 3D secure verification.
Example: creditPossible values:
cash_paymentintegerRequired

Identifier of the POS terminal a single, non-installment payment is sent through. Must match an existing terminal.

Example: 5
installment_paymentintegerRequired

Identifier of the POS terminal an installment payment is sent through. Must match an existing terminal.

Example: 5
three_d_paymentinteger · nullableOptional

Identifier of the POS terminal used when a single payment is redirected to 3D secure verification. Optional; send null to leave the card without one.

Example: 6
installment_three_d_paymentinteger · nullableOptional

Identifier of the POS terminal used when an installment payment is redirected to 3D secure verification. Optional; send null to leave the card without one.

Example: 6
is_commerce_cardboolean · nullableOptional

Whether the card is the store's own commerce card. Optional; a card created without it is stored as false.

Example: false
Responses
200

The updated card.

application/json

A card returned by the API — the record that describes a payment card the store accepts and states which POS terminal each kind of payment made with it is sent through. The bank, the card type and the four terminal fields are returned as identifiers rather than nested objects.

pkintegerRead-onlyRequired

Unique identifier of the card.

namestring · max: 64Required

Display name of the card.

Example: Example Card
slugstring · max: 64Required

The code that identifies the card within its bank. Unique among the cards of the same bank, but the same code may be used by cards of other banks.

Example: example-card
bankintegerRequired

Identifier of the bank the card belongs to.

Example: 3
card_typeintegerRequired

Identifier of the card type — the scheme or programme of the card.

Example: 1
card_payment_typestring · enumRequired

Whether a card is a credit or a debit card.

  • credit — a credit card. A card stored without a payment type is treated as one.
  • debit — a debit card. While THREE_D_REDIRECT_DEBIT is on, which is the default, every payment matched to a card marked this way is redirected to 3D secure verification.
Example: creditPossible values:
cash_paymentintegerRequired

Identifier of the POS terminal a single, non-installment payment is sent through.

Example: 5
installment_paymentintegerRequired

Identifier of the POS terminal an installment payment is sent through.

Example: 5
three_d_paymentinteger · nullableRequired

Identifier of the POS terminal used when a single payment is redirected to 3D secure verification, or null when the card has none. Never used while THREE_D_SECURE_ENABLED is off.

Example: 6
installment_three_d_paymentinteger · nullableRequired

Identifier of the POS terminal used when an installment payment is redirected to 3D secure verification, or null when the card has none.

Example: 6
is_commerce_cardboolean · nullableRequired

Whether the card is the store's own commerce card. Read by the commerce-card installment filters, and without effect while none of them is configured through INSTALLMENT_FILTERS.

Example: false
put/cards/{id}/
PUT /api/v1/remote/1/cards/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 215

{
  "name": "Example Card",
  "slug": "example-card",
  "bank": 3,
  "card_type": 1,
  "card_payment_type": "credit",
  "cash_payment": 5,
  "installment_payment": 5,
  "three_d_payment": 6,
  "installment_three_d_payment": 6,
  "is_commerce_card": false
}
{
  "pk": 1,
  "name": "Example Card",
  "slug": "example-card",
  "bank": 3,
  "card_type": 1,
  "card_payment_type": "credit",
  "cash_payment": 5,
  "installment_payment": 5,
  "three_d_payment": 6,
  "installment_three_d_payment": 6,
  "is_commerce_card": false
}

Last updated

Was this helpful?