Customers API Documentation
This document describes the endpoints used to operate with customers.
Authentication
All requests require a valid JWT Bearer Token in the Authorization header:
Authorization: Bearer <your-jwt-token>
The endpoint is restricted to users with one of the following roles:
MERCHANT_API_USERMANAGE
Base URLs
| Environment | URL |
|---|---|
| Dev | https://uat-api.morefin.com |
| Production | https://api.morefin.com |
Endpoint
GET /api/customers/{customerId}/payment-methods
Returns the payment methods associated with the given customer.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customerId | String | Yes | Unique customer identifier. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | Integer | No | 1 | Page number for paginated results. |
size | Integer | No | 10 | Number of items per page. |
Example Request
curl --location 'BASE_URL/api/customers/{customerId}/payment-methods?page=1&size=10' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <your-jwt-token>'
Response Codes
200 OK- Customer exists and payment methods are returned.404 Not Found- Customer does not exist for the current tenant/merchant.401 Unauthorized- Missing or invalid token.403 Forbidden- Authenticated user does not have required role.
Example Responses
- Success (
200 OK)
{
"items": [
{
"id": "string",
"payment_method": "string",
"payment_method_type": "string",
"masked_account": "string"
}
],
"item_count": "integer",
"page": "integer",
"count": "integer",
"page_count": "integer"
}
- Customer not found (
404 Not Found)
HTTP/1.1 404 Not Found