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) orInactive(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
| # | Method | Path | Purpose |
|---|---|---|---|
| C2A-04-01 | POST | /add | Add Payment Method |
| C2A-04-02 | GET | /list | List Payment Methods |
| C2A-04-06 | GET | /info | Get Payment Method Info |
| C2A-04-03 | DELETE | /delete | Delete Payment Method |
| C2A-04-04 | POST | /activate | Activate Payment Method |
| C2A-04-05 | POST | /inactivate | Inactivate Payment Method |
Error Statuses
messageCode | Meaning |
|---|---|
SUCCESS | Operation completed. |
CUSTOMER_NOT_FOUND | Supplied customer URN does not exist. |
PAYMENT_METHOD_NOT_FOUND | Supplied payment method URN does not exist. |
CARD_DECLINED | PSP refused the card during tokenization. |
INVALID_CARD | Card data failed format / Luhn / expiry validation. |
PSP_UNAVAILABLE | PSP 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