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

Get Payment Method

OpenAPI Spec

Test this endpoint live

Open the same request directly in API Explorer.

Open in API Explorer

Server URL

GET
/public/api/v1/payment-methods/{id}

Retrieve a payment method belonging to the authenticated merchant, including its account-update enrollment status.

Supports all payment-method types. Card-based payment methods also include card details; otherwise, card is null.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

idstring
Required

The ID of the payment method.

Format:
uuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/public/api/v1/payment-methods/01924756-d1f6-738d-8040-90d76cedf01f"
{  "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  },  "card": {    "pan": "12345678XXXX1234",    "expireMonth": "07",    "expireYear": "35",    "par": "8F1B7C2QX4Z9N3V6M2R0K8YD5LJTPH",    "Issuer": "Danske Bank",    "Scheme": "Visa",    "Country": "DK",    "Segment": "consumer",    "Funding": "debit"  }}
{  "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"}