Looking for ePay classic docs? Go to docs.epay.dk
ePay documentationDocsePay documentation
Payment Methods

Update Account Updates

OpenAPI Spec

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

POST
/public/api/v1/payment-methods/{id}/account-updates

Enable or disable account updates for a payment method belonging to the authenticated merchant. Account updates help keep stored card details up to date when a replacement card is issued.

Only payment methods with type CARD support account updates. Card-backed wallets are not supported.

ePay must enable the account updates feature for your account before you can enroll a payment method. You can still disable enrollment if the feature is no longer enabled for your account.

The operation is idempotent: repeating the same requested state succeeds. The response includes the resulting accountUpdatesEnabled value. Use Get Payment Method to read the current status without changing it.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

idstring
Required

The ID of the payment method.

Format:
uuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

enabledboolean
Required

Set to true to enroll the card in account updates, or false to disable account updates for this payment method.

Example:
true

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/public/api/v1/payment-methods/01924756-d1f6-738d-8040-90d76cedf01f/account-updates" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
{  "paymentMethod": {    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",    "type": "CARD",    "subType": "Visa",    "customerId": "User159",    "expiry": "2024-07-29",    "createdAt": "2024-07-29T15:51:28.071Z",    "displayText": "40000000XXXX0003",    "accountUpdatesEnabled": false  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}
{  "errorCode": "VALIDATION_ERROR",  "message": "Input validation errors",  "errors": {    "amount": [      "[required]: Is a required non-nullable field",      "[int]: Must be an integer",      "[min:0]: Must be greater than 0",      "[max:999999999]: Must be less than 999999999"    ]  }}
{  "errorCode": "SERVER_ERROR",  "message": "An unexpected system error"}