Test payment options should never be used for live merchant configurations.
Merchant Configs
A Merchant Config defines the available payment options for paying a Payment Request .
Merchant Config Model
Attributes
Payment Option Config Model
Attributes
-
type
string required -
walletId
string -
paypalMerchantAccountId
string -
paypalStoreId
string -
farmlandsMerchantNumber
string -
externalMerchantId
string -
collectionIds
string
See Asset Types for values that may be present in the type
field.
Create Merchant Config
This endpoint allows you to create a Merchant Config for a Merchant.
Attributes
-
paymentOptions
array required -
allowedRedirectUrls
array experimental
Errors
-
INVALID_WALLET_TYPE
403 -
LIVENESS_MISMATCH
403 -
COLLECTIONS_INVALID
403
curl -X POST \ https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "paymentOptions": [ { "type": "centrapay.nzd.main", "walletId": "1234c486308f3f0a23f0f92b" }, { "type": "epay.main", "externalMerchantId": "11000021" }, { "type": "farmlands.nzd.main", "farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf" }, { "type": "quartz.nzd.main", "externalMerchantId": "0012399012" } ]}'
{ "id": "mc_5ee168e8597be5002af7b454", "merchantId": "5ee0c486308f590260d9a07f", "createdAt": "2021-11-12T01:17:46.499Z", "updatedAt": "2021-11-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "paymentOptions": [ { "type": "centrapay.nzd.main", "walletId": "1234c486308f3f0a23f0f92b" }, { "type": "epay.main", "externalMerchantId": "11000021" }, { "type": "farmlands.nzd.main", "farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf" }, { "type": "quartz.nzd.main", "externalMerchantId": "0012399012" } ]}
Get Merchant Config
This endpoint allows you to retrieve a Merchant Config by id.
curl -X GET \ https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs/5ee168e8597be5002af7b454 \ -H 'x-api-key: <TOKEN>'
{ "id": "mc_5ee168e8597be5002af7b454", "merchantId": "5ee0c486308f590260d9a07f", "createdAt": "2021-11-12T01:17:46.499Z", "updatedAt": "2021-11-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "paymentOptions": [ { "type": "farmlands.nzd.main", "farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf" } ]}
List Merchant Configs
This endpoint allows you to retrieve a list of Merchant Configs.
curl -X GET \ https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs \ -H 'x-api-key: <TOKEN>'
[ { "id": "mc_5ee168e8597be5002af7b454", "merchantId": "5ee0c486308f590260d9a07f", "createdAt": "2021-09-12T01:17:46.499Z", "updatedAt": "2021-09-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "paymentOptions": [ { "type": "farmlands.nzd.main", "farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf" } ] }, { "id": "mc_5ee168e8597be5002af7baed", "merchantId": "5ee0c486308f590260d9a07f", "createdAt": "2021-11-12T01:17:46.499Z", "updatedAt": "2021-11-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "paymentOptions": [ { "type": "test" } ] }]
Update Merchant Config
This endpoint allows you to update a Merchant Config.
Attributes
-
paymentOptions
array required -
allowedRedirectUrls
array experimental
Errors
-
INVALID_WALLET_TYPE
403 -
LIVENESS_MISMATCH
403 -
COLLECTIONS_INVALID
403
curl -X PUT \ https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs/mc_5ee168e8597be5002af7baed \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "paymentOptions": [ { "type": "bitcoin.main" }, { "type": "centrapay.nzd.test", "walletId": "1234c486308f3f0a23f0f92b" }, { "type": "farmlands.nzd.main", "farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf" } ]}'
{ "id": "mc_5ee168e8597be5002af7baed", "merchantId": "5ee0c486308f590260d9a07f", "createdAt": "2021-09-12T01:17:46.499Z", "updatedAt": "2021-12-12T01:17:46.499Z", "createdBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "updatedBy": "crn:WIj211vFs9cNACwBb04vQw:api-key:MyApiKey", "paymentOptions": [ { "type": "bitcoin.main" }, { "type": "centrapay.nzd.test", "walletId": "1234c486308f3f0a23f0f92b" }, { "type": "farmlands.nzd.main", "farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf" } ]}