updatePaymentTypes
put
/ccadmin/v1/merchant/paymentTypes
Update Payment Types. Update payment types based on request parameters.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : updatePaymentTypes_request
{
"paymentTypes":[
"visa"
]
}
- paymentTypes
-
Type:
arraypaymentTypesRequired:trueAdditional Properties Allowed:Array of payment types to enable.
Nested Schema : paymentTypes
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updatePaymentTypes_response
- items
-
Type:
arrayitemsAdditional Properties Allowed:List of payment types.
Nested Schema : items
Nested Schema : items
Type:
object- code
-
Type:
stringThe payment gateway specific code for the payment type. - cvvLength
-
Type:
stringValid cvv length. - iin
-
Type:
stringIssuer identification number for the payment type. - img
-
Type:
objectimgAdditional Properties Allowed:Payment type image URL. - length
-
Type:
stringValid card number length. - name
-
Type:
stringThe internal name for the payment type. - repositoryId
-
Type:
stringThe repository ID of the payment type item. - startDateRequired
-
Type:
booleanWhether the the start date of the credit card is required for this payment type. - type
-
Type:
stringKind of payment type.For e.g.: card,check,etc. - value
-
Type:
stringThe value for the payment type.
Nested Schema : img
Type:
objectPayment type image URL.
- name
-
Type:
stringName of the image. - path
-
Type:
stringRelative path of the image. - repositoryId
-
Type:
stringThe id of the media external image file. - url
-
Type:
stringThe derived URL for the image.
Example application/json
{
"items":[
{
"img":{
"path":"/ccimg/visa_straight.png",
"name":"Visa",
"repositoryId":"imgVisa",
"url":"http://localhost:9080/file/ccimg/visa_straight.png"
},
"code":"001",
"name":"Visa",
"startDateRequired":false,
"length":"13|16",
"repositoryId":"visa",
"type":"card",
"value":"visa",
"cvvLength":3,
"iin":"4"
},
{
"img":{
"path":"/ccimg/mastercard.png",
"name":"Mastercard",
"repositoryId":"imgMastercard",
"url":"http://localhost:9080/file/ccimg/mastercard.png"
},
"code":"002",
"name":"Mastercard",
"startDateRequired":false,
"length":"16",
"repositoryId":"mastercard",
"type":"card",
"value":"mastercard",
"cvvLength":3,
"iin":"5[0-5]"
},
{
"img":{
"path":"/ccimg/amex.png",
"name":"American Express",
"repositoryId":"imgAmex",
"url":"http://localhost:9080/file/ccimg/amex.png"
},
"code":"003",
"name":"American Express",
"startDateRequired":false,
"length":"15",
"repositoryId":"amex",
"type":"card",
"value":"amex",
"cvvLength":4,
"iin":"3[47]"
}
]
}
Default Response
The error response
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{"paymentTypes": ["visa"]}
Sample Response Payload returned by endpoint:
{"items": [
{
"img": {
"path": "/ccimg/visa_straight.png",
"name": "Visa",
"repositoryId": "imgVisa",
"url": "http://localhost:9080/file/ccimg/visa_straight.png"
},
"code": "001",
"name": "Visa",
"startDateRequired": false,
"length": "13|16",
"repositoryId": "visa",
"type": "card",
"value": "visa",
"cvvLength": 3,
"iin": "4"
},
{
"img": {
"path": "/ccimg/mastercard.png",
"name": "Mastercard",
"repositoryId": "imgMastercard",
"url": "http://localhost:9080/file/ccimg/mastercard.png"
},
"code": "002",
"name": "Mastercard",
"startDateRequired": false,
"length": "16",
"repositoryId": "mastercard",
"type": "card",
"value": "mastercard",
"cvvLength": 3,
"iin": "5[0-5]"
},
{
"img": {
"path": "/ccimg/amex.png",
"name": "American Express",
"repositoryId": "imgAmex",
"url": "http://localhost:9080/file/ccimg/amex.png"
},
"code": "003",
"name": "American Express",
"startDateRequired": false,
"length": "15",
"repositoryId": "amex",
"type": "card",
"value": "amex",
"cvvLength": 4,
"iin": "3[47]"
}
]}