LCM Merchant Onboarding APIs
The LCM Merchant Onboarding API is used by Payment Service Providers (PSPs) and Token Requestor Aggregators (TRAs) to enroll merchants for COF status inquiries and Merchant Tokenization services.
After successful onboarding, PSPs and TRAs can:
- Create, read, update, and delete merchant records
- Manage merchant subscriptions for supported services and schemes
- Inquire about card status on behalf of onboarded merchants via AAU batch files
- Request tokenization of cards using tokenization services
Authentication
Before you can use the LCM Merchant Onboarding APIs, your application must complete the on-boarding process.
You will receive two sets of credentials:
- Sandbox credentials (for test transactions)
- Production credentials (for live transactions)
Each set consists of a Client ID and a Client Secret. The Client Secret is confidential and must not be shared.
To invoke this API you must obtain an OAuth 2.0 access token and send it in the HTTP Authorization header as a Bearer token.
Important: The OAuth2 Token/Revoke endpoints are exposed by the Authorization Server (separate host) and are documented here for convenience. They are not part of the Resource Server paths in this OpenAPI document.
OAuth 2.0
OAuth 2.0 is the industry-standard protocol for authorization. See: RFC 6749.
This API supports OAuth 2.0 with the confidential client type. A confidential client can keep its credentials secret when interacting with the Authorization Server.
OAuth 2.0 defines four roles:
- Resource owner: Entity capable of granting access to a protected resource.
- Resource server: Server hosting protected resources, accepting requests using access tokens.
- Client: An application requesting protected resources on behalf of the resource owner.
- Authorization server: The server issuing access tokens to the client after successful authentication/authorization.
At a high level, the flow is:
- Get an access token from the Authorization Server.
- Use the access token to call this API (the Resource Server).
OAuth 2.0 uses an "authorization grant" to represent the authorization used to obtain an access token. This API supports the Client Credentials grant type.
Authorization Server
Token Endpoint
POST /token
With the Client Credentials grant type, the client requests an access token using only its own credentials. The access token returned for this API is of type Bearer.
Clients should request the minimal necessary scope and lifetime. The Authorization Server may issue an access token with fewer rights than requested.
Generate an access token (Client Credentials grant):
- Obtain a valid
client_idandclient_secret. - Combine them as
client_id:client_secretand Base64-encode the result. - Call the Token Endpoint. Example:
# NOTE: Only use -k in sandbox/test environments if TLS verification cannot be performed.
curl -k -d "grant_type=client_credentials" \
-H "Authorization: Basic <Base64 encoded client_id:client_secret>" \
-H "Content-Type: application/x-www-form-urlencoded" \
https://api-gateway2.nets.eu/token
Example response (access token may be opaque, not necessarily a JWT):
{
"token_type": "Bearer",
"expires_in": 2061,
"access_token": "ca19a540f544777860e44e75f605d927"
}
Note: Per RFC 6749, the Client Credentials grant type does not issue refresh tokens.
Revoke Endpoint
POST /revoke
In case of credential theft or a security incident, revoke an access token using the Revoke Endpoint.
Parameters
token(required): The token to revoke.- Basic Authorization header (required):
Authorization: Basic <Base64 encoded client_id:client_secret> token_type_hint(optional): Useaccess_tokenfor Client Credentials. If omitted, the server searches multiple token spaces and revocation may take longer.
Example:
curl -X POST \
https://api-gateway2.nets.eu/revoke \
-H "Authorization: Basic <Base64 encoded client_id:client_secret>" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=<token_to_be_revoked>&token_type_hint=access_token"
Responses
-
Valid token - HTTP Status 200 - OK You receive an empty response with the HTTP status as 200. The following HTTP headers are returned:
Revokedaccesstoken: a0d210c7a3de7d548e03f1986e9a5c39 Authorizeduser: admin@carbon.super Revokedrefreshtoken: 5e87a8235cd4d066e15c4c989f5ecf94 Content-Type: text/html Pragma: no-cache Cache-Control: no-store Date: Tue, 23 Aug 2018 19:28:52 GMT Transfer-Encoding: chunked -
Invalid token - HTTP Status 200 - OK You still receive an empty response with the HTTP status as 200 but only the following HTTP headers are returned:
Content-Type: text/html Pragma: no-cache Cache-Control: no-store Date: Tue, 23 Aug 2018 19:31:45 GMT Transfer-Encoding: chunkedBecause the authorization server cannot find the token in any key space, you will not see Revokedaccesstoken or Revokedrefreshtoken
API Specification
Content types
Requests must be JSON:
Content-Type: application/json
Clients SHOULD request JSON responses:
Accept: application/json
Responses are JSON:
Content-Type: application/json
Error codes
| Error code | Description |
|---|---|
| AAU-1514 | Invalid Request Format |
| AAU-1516 | Invalid Request Data |
| AAU-1520 | Generic exception |
Pagination
The GET /merchants endpoint supports two pagination styles:
- Page-based: query parameters
page(1-based index) andsize(page size). - Keyset (cursor) based: start with a request omitting
nextKey; subsequent requests use thenextKeyvalue returned in the previous response for efficient large list traversal.
Request parameters:
- Page-based:
pageand optionalsize. - Keyset-based: optional
sizeand (for continuation only)nextKey. - Do not send
pagetogether withnextKey.
Response fields:
pageNumber: current page index.size: requested page size.numberOfElements: elements in current page.totalPages: total number of pages (page-based only; may be omitted or zero when usingnextKey).totalElements: total number of elements (page-based only; may be approximate).nextKey: supply this value in the next request to continue.
Usage guidance:
- Use page/size for small result sets or when total counts are needed.
- Use
nextKeyfor large, frequently changing datasets to reduce performance overhead. - Do not mix
nextKeywithpage; choose one strategy per request.
Examples:
- Page-based initial: GET /merchants?page=1&size=50
- Keyset initial (no cursor yet): GET /merchants?size=50
- Keyset continuation: GET /merchants?nextKey=5130&size=50
Scroll down for code samples, example requests and responses.
Select a language for code samples from the tabs or the mobile navigation menu.
Merchants Onboarding - Inbound
Merchant onboarding operations
Store Merchant details given by Acquirer
POST /merchantsOnboards a new Merchant with merchant information and service subscriptions.
Parameters
X-Acquirer-IDstringrequired
Unique ID for the acquirer provided during Acquirer registration
X-PSP-IDstringrequired
Unique ID for the PSP provided during PSP registration
X-Provider-IDstringrequired
Unique ID for the provider provided during Provider registration
X-Request-IDstring (uuid)required
Unique ID for each request used for tracing and troubleshooting
Store Merchant details given by Acquirer
- C#
- PHP
- Node
- Shell
var client = new RestClient("https://api-gateway2.nets.eu/merchants"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/json"); request.AddHeader("X-Acquirer-ID", "SOME_STRING_VALUE"); request.AddHeader("X-PSP-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Provider-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Request-ID", "SOME_STRING_VALUE"); request.AddParameter("application/json", "{\"REPLACE_REQUEST_BODY\":\"REPLACE_REQUEST_BODY\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Request body
merchantInfoobjectrequired
acquirerMerchantIdstringrequired
example: MER001Acquirer merchant ID
addressobjectoptional
addressLine1stringoptional
example: 234 Test StreetMerchant address line 1
citystringoptional
example: CopenhagenMerchant city
countryCodestringoptional
example: DNKMerchant country code in ISO 3166-1 alpha-3 format
postCodestringoptional
example: 2100Merchant postal code
cabcstringrequired
example: 4814Merchant Category Code (Card Acceptor Business Code)
merchantNamestringrequired
example: NetflixMerchant name
parentCompanystringoptional
example: Netflix Inc.Parent company of the merchant
pspMerchantIdstringoptional
example: PSPMER001PSP merchant ID
websiteUrlstring (uri)optional
example: https://www.netflix.comMerchant website URL
subscriptionsarrayrequired
List of subscriptions for the merchant
servicestringrequired
example: MTSService the Merchant wants to subscribe Possible values are
- AAU - Acquirer Account Updater Service
- MTS - Merchant Tokenization Service
AAU,MTSschemesarrayrequired
List of Schemes the Merchant wants to subscribe the service for. Possible values are
- MC - Mastercard
- VI - Visa
- DK - Dankort
Request body
{ "merchantInfo": { "acquirerMerchantId": "MER001", "address": { "addressLine1": "234 Test Street", "city": "Copenhagen", "countryCode": "DNK", "postCode": "2100" }, "cabc": "4814", "merchantName": "Netflix", "parentCompany": "Netflix Inc.", "pspMerchantId": "PSPMER001", "websiteUrl": "https://www.netflix.com" }, "subscriptions": [ { "service": "MTS", "schemes": [ "DK", "MC" ] } ] }
Responses
201Merchant created successfullyoptional
merchantInfoobjectrequired
acquirerMerchantIdstringrequired
example: MER001Acquirer merchant ID
addressobjectoptional
addressLine1stringoptional
example: 234 Test StreetMerchant address line 1
citystringoptional
example: CopenhagenMerchant city
countryCodestringoptional
example: DNKMerchant country code in ISO 3166-1 alpha-3 format
postCodestringoptional
example: 2100Merchant postal code
cabcstringrequired
example: 4814Merchant Category Code (Card Acceptor Business Code)
merchantNamestringrequired
example: NetflixMerchant name
parentCompanystringoptional
example: Netflix Inc.Parent company of the merchant
pspMerchantIdstringoptional
example: PSPMER001PSP merchant ID
websiteUrlstring (uri)optional
example: https://www.netflix.comMerchant website URL
subscriptionsarrayrequired
List of subscriptions for the merchant
servicestringrequired
example: MTSService the Merchant wants to subscribe Possible values are
- AAU - Acquirer Account Updater Service
- MTS - Merchant Tokenization Service
AAU,MTSschemesarrayrequired
List of Schemes the Merchant wants to subscribe the service for. Possible values are
- MC - Mastercard
- VI - Visa
- DK - Dankort
400Bad requestoptional
errorCodestringrequired
example: AAU-1514Application-specific error code returned for error scenarios
401Unauthorizedoptional
403Forbiddenoptional
404NotFound Erroroptional
409Conflict Erroroptional
500Internal Erroroptional
503ServiceUnavailable Erroroptional
- InvalidRequestFormat
- InvalidDataFormat
- GenericException
- 201
{ "errorCode": "AAU-1514" }
List merchants for the requesting Acquirer
GET /merchantsReturns a paginated list of merchants for the requesting acquirer using page-based or keyset pagination. page and nextKey are mutually exclusive. Do not provide both parameters in the same request.
Parameters
X-Acquirer-IDstringrequired
Unique ID for the acquirer provided during Acquirer registration
X-PSP-IDstringrequired
Unique ID for the PSP provided during PSP registration
X-Provider-IDstringrequired
Unique ID for the provider provided during Provider registration
X-Request-IDstring (uuid)required
Unique ID for each request used for tracing and troubleshooting
pageinteger (int32)optional
1-based page number for page-based pagination
sizeinteger (int32)optional
Number of elements to return
nextKeyinteger (int64)optional
Continuation key for keyset pagination
List merchants for the requesting Acquirer
- C#
- PHP
- Node
- Shell
var client = new RestClient("https://api-gateway2.nets.eu/merchants?page=1&size=50&nextKey=5130"); var request = new RestRequest(Method.GET); request.AddHeader("X-Acquirer-ID", "SOME_STRING_VALUE"); request.AddHeader("X-PSP-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Provider-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Request-ID", "SOME_STRING_VALUE"); IRestResponse response = client.Execute(request);
Responses
200Successful Operationoptional
merchantsarrayoptional
pspMerchantIdstringoptional
example: PSP_MER001PSP merchant ID
acquirerMerchantIdstringrequired
example: MER001Acquirer merchant ID
cabcstringrequired
example: 4814Merchant Category Code (Card Acceptor Business Code)
merchantNamestringrequired
example: NetflixMerchant name
parentCompanystringoptional
example: Netflix Inc.Parent company of the merchant
websiteUrlstringoptional
example: https://www.netflix.comWebsite URL of the merchant
nextKeyinteger (int64)optional
example: 5130Value to be used in the next request for keyset pagination
numberOfElementsinteger (int32)optional
example: 50Number of elements in the current page
pageNumberinteger (int32)optional
example: 2Current page number
sizeinteger (int32)optional
example: 50Requested page size
totalElementsinteger (int32)optional
example: 201Total number of elements available
totalPagesinteger (int32)optional
example: 5Total number of pages available
400Bad requestoptional
errorCodestringrequired
example: AAU-1514Application-specific error code returned for error scenarios
401Unauthorizedoptional
403Forbiddenoptional
404NotFound Erroroptional
409Conflict Erroroptional
500Internal Erroroptional
503ServiceUnavailable Erroroptional
- InvalidRequestFormat
- InvalidDataFormat
- GenericException
- 200
{ "errorCode": "AAU-1514" }
Get a merchant by acquirer merchant ID
GET /merchants/{acquirerMerchantId}Fetches the Merchant details for the provided Acquirer Merchant ID.
Parameters
X-Acquirer-IDstringrequired
Unique ID for the acquirer provided during Acquirer registration
X-PSP-IDstringrequired
Unique ID for the PSP provided during PSP registration
X-Provider-IDstringrequired
Unique ID for the provider provided during Provider registration
X-Request-IDstring (uuid)required
Unique ID for each request used for tracing and troubleshooting
acquirerMerchantIdstringrequired
Acquirer merchant ID used during Merchant Onboarding
Get a merchant by acquirer merchant ID
- C#
- PHP
- Node
- Shell
var client = new RestClient("https://api-gateway2.nets.eu/merchants/{acquirerMerchantId}"); var request = new RestRequest(Method.GET); request.AddHeader("X-Acquirer-ID", "SOME_STRING_VALUE"); request.AddHeader("X-PSP-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Provider-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Request-ID", "SOME_STRING_VALUE"); IRestResponse response = client.Execute(request);
Responses
200Successful Operationoptional
merchantInfoobjectrequired
acquirerMerchantIdstringrequired
example: MER001Acquirer merchant ID
addressobjectoptional
addressLine1stringoptional
example: 234 Test StreetMerchant address line 1
citystringoptional
example: CopenhagenMerchant city
countryCodestringoptional
example: DNKMerchant country code in ISO 3166-1 alpha-3 format
postCodestringoptional
example: 2100Merchant postal code
cabcstringrequired
example: 4814Merchant Category Code (Card Acceptor Business Code)
merchantNamestringrequired
example: NetflixMerchant name
parentCompanystringoptional
example: Netflix Inc.Parent company of the merchant
pspMerchantIdstringoptional
example: PSPMER001PSP merchant ID
websiteUrlstring (uri)optional
example: https://www.netflix.comMerchant website URL
subscriptionsarrayrequired
List of subscriptions for the merchant
servicestringrequired
example: MTSService the Merchant wants to subscribe Possible values are
- AAU - Acquirer Account Updater Service
- MTS - Merchant Tokenization Service
AAU,MTSschemesarrayrequired
List of Schemes the Merchant wants to subscribe the service for. Possible values are
- MC - Mastercard
- VI - Visa
- DK - Dankort
400Bad requestoptional
errorCodestringrequired
example: AAU-1514Application-specific error code returned for error scenarios
401Unauthorizedoptional
403Forbiddenoptional
404NotFound Erroroptional
409Conflict Erroroptional
500Internal Erroroptional
503ServiceUnavailable Erroroptional
- InvalidRequestFormat
- InvalidDataFormat
- GenericException
- 200
{ "errorCode": "AAU-1514" }
Update merchant information
PUT /merchants/{acquirerMerchantId}/merchant-infoUpdates merchant information for the provided acquirer merchant ID.
Parameters
X-Acquirer-IDstringrequired
Unique ID for the acquirer provided during Acquirer registration
X-PSP-IDstringrequired
Unique ID for the PSP provided during PSP registration
X-Provider-IDstringrequired
Unique ID for the provider provided during Provider registration
X-Request-IDstring (uuid)required
Unique ID for each request used for tracing and troubleshooting
acquirerMerchantIdstringrequired
Acquirer merchant ID used during merchant onboarding
Update merchant information
- C#
- PHP
- Node
- Shell
var client = new RestClient("https://api-gateway2.nets.eu/merchants/{acquirerMerchantId}/merchant-info"); var request = new RestRequest(Method.PUT); request.AddHeader("content-type", "application/json"); request.AddHeader("X-Acquirer-ID", "SOME_STRING_VALUE"); request.AddHeader("X-PSP-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Provider-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Request-ID", "SOME_STRING_VALUE"); request.AddParameter("application/json", "{\"REPLACE_REQUEST_BODY\":\"REPLACE_REQUEST_BODY\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Request body
merchantInfoobjectrequired
Merchant fields to update
addressobjectoptional
addressLine1stringoptional
example: 234 Test StreetMerchant address line 1
citystringoptional
example: CopenhagenMerchant city
countryCodestringoptional
example: DNKMerchant country code in ISO 3166-1 alpha-3 format
postCodestringoptional
example: 2100Merchant postal code
cabcstringrequired
example: 4814Merchant Category Code (Card Acceptor Business Code)
merchantNamestringrequired
example: NetflixMerchant name
parentCompanystringoptional
example: Netflix Inc.Parent company of the merchant
websiteUrlstring (uri)optional
example: https://www.netflix.comMerchant website URL
Request body
{ "merchantInfo": { "address": { "addressLine1": "234 Test Street", "city": "Copenhagen", "countryCode": "DNK", "postCode": "2100" }, "cabc": "4814", "merchantName": "Netflix", "parentCompany": "Netflix Inc.", "websiteUrl": "https://www.netflix.com" } }
Responses
204Merchant information updated successfullyoptional
400Bad requestoptional
errorCodestringrequired
example: AAU-1514Application-specific error code returned for error scenarios
401Unauthorizedoptional
403Forbiddenoptional
404NotFound Erroroptional
409Conflict Erroroptional
500Internal Erroroptional
503ServiceUnavailable Erroroptional
- InvalidRequestFormat
- InvalidDataFormat
- GenericException
{ "errorCode": "AAU-1514" }
Test API availability
GET /pingChecks API availability and returns service health status.
Parameters
X-Acquirer-IDstringrequired
Unique ID for the acquirer provided during Acquirer registration
X-PSP-IDstringrequired
Unique ID for the PSP provided during PSP registration
X-Provider-IDstringrequired
Unique ID for the provider provided during Provider registration
X-Request-IDstring (uuid)required
Unique ID for each request used for tracing and troubleshooting
Test API availability
- C#
- PHP
- Node
- Shell
var client = new RestClient("https://api-gateway2.nets.eu/ping"); var request = new RestRequest(Method.GET); request.AddHeader("X-Acquirer-ID", "SOME_STRING_VALUE"); request.AddHeader("X-PSP-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Provider-ID", "SOME_STRING_VALUE"); request.AddHeader("X-Request-ID", "SOME_STRING_VALUE"); IRestResponse response = client.Execute(request);
Responses
200API is availableoptional
messagestringrequired
example: Service is up and runningHealth check message
statusstringrequired
example: UPService status
UP
401Unauthorizedoptional
403Forbiddenoptional
404Not Foundoptional
serviceAvailable
{ "message": "Service is up and running", "status": "UP" }