This API Updates Accepted Payment Methods of an existing Business Profile.
Endpoint
PUT https://enrollbusiness.com/Api/PaymentMethods/Profile/en
HTTP Headers
You must specify following HTTP Headers when making API call:
- content-type: application/json
- Referer: https://EnrollBusiness.com
- APIKey: {YOUR_API_KEY}
Note: To know how to obtain API Key, Please refer to Getting Started page.
Request Body
{
"ProfileID": "678",
"AcceptedPaymentMethods": [
"Cash",
"DebitCard",
"CreditCard"
]
}
- ProfileID [Mandatory] : Numeric ID of the of the existing valid profile. This must be a numeric value. If you have created profile using Create Business Profile API, you will get ProfileID as part of the successful response. Regardless, if you don't know ProfileID, here is how you can obtain it. Please refer to the following screenshot:
-
AcceptedPaymentMethods [Mandatory] :
These are the various payment methods the business accepts when dealing with monetary transactions. Valid values are : Cash, DebitCard, CreditCard, Cheque, Paypal and MoneyOrder
Note: If you want to clear/remove existing Payment Methods, just pass empty Array like this - "AcceptedPaymentMethods" : []
Response
Success Response:
Once successful the response returns HTTP Status Code: 200. Response Body will look like this.
{
"ResultCode": 1,
"Message": "Saved Successfully."
}
Error Response:
HTTP Status Code: 401 Unauthorized:
If APIKey header has not been supplied or it's invalid, the call will return Http Status Code: 401 Unauthorized. Response Body might look like:
{
"ResultCode":5,
"Message":"You are not authorized to perform this operation."
}
HTTP Status Code: 400 Bad Request:
If we are not able to understand the request or some of the values are not valid, the call will return Http Status Code: 400 Bad Request. Response Body might look like:
{
"ResultCode": 6,
"Errors": {
"AcceptedPaymentMethods": "Invalid Payment Method : cashxyz. Valid Payment Methods are: Cash, DebitCard, CreditCard, Cheque, Paypal and MoneyOrder"
}
}
HTTP Status Code: 500 Internal Server error:
If we are not able process the request for internal processing error, the call will return Http Status Code: 500 Internal Server error. Response Body might look like:
{
"ResultCode":3,
"Message":"Unknown Error occurred. Please try again."
}