Skip to main content

C2A-04 Payment Methods

Manages a customer's stored payment instruments (currently credit cards). Cards are tokenized at the PSP — Azotte never persists raw PAN/CVC. Stored methods can then be referenced from Checkout by URN.

Concepts

  • PSP tokenization — raw card is sent to the configured PSP adapter (Stripe / Adyen / Craftgate) which returns a token. Azotte stores only the masked PAN, expiry, brand, and the PSP token reference.
  • State machine — a stored method is either Active (eligible for checkout / recurring billing) or Inactive (retained but skipped). Deletion is permanent and removes the token at the PSP too.
  • Per-customer scope — every operation is scoped to a customer; the URN of the customer or of the method is the lookup key.

Base Route

/api/c2a/customer/payment/methods

Standard C2A auth + headers.

Endpoints

#MethodPathPurpose
C2A-04-01POST/addAdd Payment Method
C2A-04-02GET/listList Payment Methods
C2A-04-06GET/infoGet Payment Method Info
C2A-04-03DELETE/deleteDelete Payment Method
C2A-04-04POST/activateActivate Payment Method
C2A-04-05POST/inactivateInactivate Payment Method

Error Statuses

messageCodeMeaning
SUCCESSOperation completed.
CUSTOMER_NOT_FOUNDSupplied customer URN does not exist.
PAYMENT_METHOD_NOT_FOUNDSupplied payment method URN does not exist.
CARD_DECLINEDPSP refused the card during tokenization.
INVALID_CARDCard data failed format / Luhn / expiry validation.
PSP_UNAVAILABLEPSP returned a network / 5xx error. Retry.

Source

  • Controller: Azotte.Api.Gateway.Controllers.C2A.C2A_04_PaymentMethodsController
  • Service: Azotte.Business.Payments.IPaymentMethodsService
  • DTOs: Azotte.Business.Payments.PaymentMethods.Dto/*
  • PSP adapters: Azotte.Business.Payments/Adapters/* (Stripe, Adyen, Craftgate)
  • Postman: documents/PostmanSamples/C2A API.postman_collection.json