A Merchant Config defines the available payment options for paying a Payment Request API .
Attributes
Attributes
type
walletId
terminalId
paypalMerchantAccountId
paypalStoreId
farmlandsMerchantNumber
externalMerchantId
See Asset Types API for values that may be present in the type
field.
Test payment options should never be used for live merchant configurations.
/api/merchants/{merchantId}/configs
This endpoint allows you to create a Merchant Config for a Merchant.
Attributes
paymentOptions
allowedRedirectUrls
Errors
INVALID_WALLET_TYPE
LIVENESS_MISMATCH
Request
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.nzd.main",
"terminalId": "11000021"
},
{
"type": "farmlands.nzd.main",
"farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf"
}
]
}
'
Response
{
"id": "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.nzd.main",
"terminalId": "11000021"
},
{
"type": "farmlands.nzd.main",
"farmlandsMerchantNumber": "DbgY2SyD5M85zkePJjsQEf"
}
]
}
/api/merchants/{merchantId}/configs/{configId}
This endpoint allows you to retrieve a Merchant Config by id.
Request
curl -X GET \
https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs/5ee168e8597be5002af7b454 \
-H 'x-api-key: <TOKEN>'
Response
{
"id": "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"
}
]
}
/api/merchants/{merchantId}/configs
This endpoint allows you to retrieve a list of Merchant Configs.
Request
curl -X GET \
https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs \
-H 'x-api-key: <TOKEN>'
Response
[
{
"id": "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": "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"
}
]
}
]
/api/merchants/{merchantId}/configs/{configId}
This endpoint allows you to update a Merchant Config.
Attributes
paymentOptions
allowedRedirectUrls
Errors
INVALID_WALLET_TYPE
LIVENESS_MISMATCH
Request
curl -X PUT \
https://service.centrapay.com/api/merchants/5ee0c486308f590260d9a07f/configs/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"
}
]
}
'
Response
{
"id": "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"
}
]
}