payment_instruction

This class provides RESTful services to add, get, update, and delete payment instructions for the current shopping cart.

Handler Class:

com.ibm.commerce.rest.order.handler.PaymentInstructionHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/cart/@self/payment_instructionGets payment instructions for the shopping cart.
GET/store/{storeId}/cart/@self/payment_instruction/sensitive_data_mask_by_plain_stringGets sensitive data mask information for plain string.
POST/store/{storeId}/cart/@self/payment_instructionAdds payment instruction to the shopping cart.
PUT/store/{storeId}/cart/@self/payment_instructionUpdates payment instructions in the shopping cart.
DELETE/store/{storeId}/cart/@self/payment_instructionDeletes all payment Instructions from the shopping cart.
DELETE/store/{storeId}/cart/@self/payment_instruction/{paymentInstruction_id}Deletes a payment instruction in the shopping cart.

Method Details

GET /store/{storeId}/cart/@self/payment_instruction

Gets payment instructions for the shopping cart.

Handler Method:

getPaymentInfo

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

cart-payment_instruction

GET /store/{storeId}/cart/@self/payment_instruction/sensitive_data_mask_by_plain_string

Gets sensitive data mask information for plain string.

Handler Method:

getSensitiveDataMaskByPlainString

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
plainStringThe plain string for the sensitive datapathstringtrueN/A
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.edp.beans.EDPSensitiveDataMaskHelperDataBean_IBM_sensitiveDataMaskByPlainString


Example

Request:
GET /wcs/resources/store/10001/cart/@self/payment_instruction/sensitive_data_mask_by_plain_string?plainString=4111111111111111&responseFormat=json
HTTP Status Code:

200

Response:
{
	"resultList": [
		{
			"maskChar": "*",
			"maskedString": "************1111",
			"plainLength": -4
		}
	]
}

POST /store/{storeId}/cart/@self/payment_instruction

Adds payment instruction to the shopping cart.

Handler Method:

addPaymentInstruction

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
bodybody data required for rest methodbodycart-payment_instructionfalseN/A
HTTP Status Codes:
HTTP Status CodeDescription
201The requested resource has been created.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.order.handler.PaymentInstructionHandler$PaymentInstructionList


Example

Request:
POST /wcs/resources/store/10001/cart/@self/payment_instruction?responseFormat=json
Body:
{
	"account": "4111111111111111",
	"authToken": "12051%2CyptDDaIcXYQblKS3z%2BxMsMNKlhs%3D",
	"billing_address_id": "15808",
	"cc_brand": "VISA",
	"cc_cvc": "111",
	"checkRoutingNumber": " ",
	"check_routing_number": " ",
	"checkingAccountNumber": " ",
	"expire_month": "11",
	"expire_year": "2014",
	"payMethodId": "VISA",
	"paymentTermConditionId": "",
	"piAmount": "90.00000",
	"requesttype": "ajax",
	"valueFromPaymentTC": " ",
	"valueFromProfileOrder": " "
}
HTTP Status Code:

201

Response:
{
	"orderId": "25206",
	"paymentInstruction": [
		{
			"piId": "14018"
		}
	]
}

PUT /store/{storeId}/cart/@self/payment_instruction

Updates payment instructions in the shopping cart.

Handler Method:

updatePaymentInstruction

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
bodyRequest body.bodycart-payment_instructionfalseN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.order.handler.PaymentInstructionHandler$PaymentInstructionList

DELETE /store/{storeId}/cart/@self/payment_instruction

Deletes all payment Instructions from the shopping cart.

Handler Method:

deleteAllPaymentInstructions

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.

DELETE /store/{storeId}/cart/@self/payment_instruction/{paymentInstruction_id}

Deletes a payment instruction in the shopping cart.

Handler Method:

deletePaymentInstruction

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
paymentInstruction_idPayment instruction identifier to delete.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.

Data Type Details

cart-payment_instruction

Properties:
NameData TypeRequired
financialTransactioncom.ibm.commerce.order.facade.datatypes.FinancialTransactionType arrayfalse
userDataFieldcart-payment_instruction.userDataField arrayfalse
paymentStatusstringfalse
paymentInstructioncart-payment_instruction.paymentInstruction arrayfalse
orderIdstringfalse

cart-payment_instruction.paymentInstruction

Properties:
NameData TypeRequired
primarystringfalse
organizationUnitNamestringfalse
personTitlestringfalse
phone1stringtrue
phone2stringtrue
addressLinestring arrayfalse
billing_address_idstringfalse
phone1Publishstringfalse
nickNamestringtrue
refundAllowedstringfalse
statestringfalse
mobilePhone1Countrystringtrue
email1stringtrue
email2stringtrue
countrystringfalse
paymentRulestringfalse
paymentTermConditionIdstringfalse
prioritystringfalse
payMethodIdstringfalse
piCurrencystringfalse
bestCallingTimestringfalse
zipCodestringfalse
piAmountstringfalse
fax1stringtrue
fax2stringtrue
organizationIdentifiercom.ibm.commerce.foundation.common.datatypes.OrganizationIdentifierTypefalse
geographicalShippingCodestringfalse
middleNamestringfalse
lastNamestringfalse
piDescriptionstringfalse
mobilePhone1stringtrue
minAmountcom.ibm.commerce.foundation.common.datatypes.MonetaryAmountTypefalse
piStatusstringfalse
addressTypestringfalse
stateOrProvinceNamestringfalse
attributescart-payment_instruction.paymentInstruction.attributes arrayfalse
languagestringfalse
postalCodestringfalse
internalOfficeAddressstringfalse
firstNamestringfalse
maxAmountcom.ibm.commerce.foundation.common.datatypes.MonetaryAmountTypefalse
phone1Typestringfalse
personIdentifiercom.ibm.commerce.foundation.common.datatypes.PersonIdentifierTypefalse
organizationNamestringfalse
phone2Typestringfalse
protocolDatacart-payment_instruction.paymentInstruction.protocolData arrayfalse
userDataFieldcart-payment_instruction.paymentInstruction.userDataField arrayfalse
sequenceNumberstringfalse
citystringfalse
phone2Publishstringfalse
piLanguagestringfalse
piIdstringfalse
geographicalTaxCodestringfalse
businessTitlestringfalse

cart-payment_instruction.paymentInstruction.attributes

Properties:
NameData TypeRequired
attrValuestringfalse
attrKeystringtrue

cart-payment_instruction.paymentInstruction.protocolData

Properties:
NameData TypeRequired
valuestringfalse
namestringtrue

cart-payment_instruction.paymentInstruction.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

cart-payment_instruction.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

com.ibm.commerce.edp.beans.EDPSensitiveDataMaskHelperDataBean_IBM_sensitiveDataMaskByPlainString

Properties:
NameData TypeRequired
plainLengthstringfalse
maskCharstringfalse
maskedStringstringfalse

com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType

Properties:
NameData TypeRequired
valuestringfalse
currencystringfalse

com.ibm.commerce.foundation.common.datatypes.OrganizationIdentifierType

Properties:
NameData TypeRequired
uniqueIDstringfalse
distinguishedNamestringfalse

com.ibm.commerce.foundation.common.datatypes.PersonIdentifierType

Properties:
NameData TypeRequired
externalIdentifiercom.ibm.commerce.foundation.common.datatypes.PersonIdentifierType.externalIdentifierfalse
uniqueIDstringfalse
distinguishedNamestringfalse

com.ibm.commerce.foundation.common.datatypes.PersonIdentifierType.externalIdentifier

Properties:
NameData TypeRequired
identifierstringfalse

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType

Properties:
NameData TypeRequired
paymentInstructionIDstringfalse
requestAmountcom.ibm.commerce.order.facade.datatypes.FinancialTransactionType.requestAmountfalse
paymentProtocolDatacom.ibm.commerce.order.facade.datatypes.FinancialTransactionType.paymentProtocolData arrayfalse
transactionExtensionDatacom.ibm.commerce.order.facade.datatypes.FinancialTransactionType.transactionExtensionData arrayfalse
avsCodestringfalse
responseCodestringfalse
merchantOrderNumberstringfalse
reasonCodestringfalse
trackingIDstringfalse
statusstringfalse
referenceNumberstringfalse
userDatacom.ibm.commerce.order.facade.datatypes.FinancialTransactionType.userDatafalse
transactionTypestringfalse
requestTimestringfalse
expirationTimestringfalse
financialTransactionIdentifiercom.ibm.commerce.order.facade.datatypes.FinancialTransactionType.financialTransactionIdentifierfalse
lastUpdatestringfalse

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType.financialTransactionIdentifier

Properties:
NameData TypeRequired
externalIdentifierstringfalse
uniqueIDstringfalse

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType.paymentProtocolData

Properties:
NameData TypeRequired
valuestringfalse
namestringtrue

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType.requestAmount

Properties:
NameData TypeRequired
valuestringfalse
currencystringfalse

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType.transactionExtensionData

Properties:
NameData TypeRequired
valuestringfalse
namestringtrue

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType.userData

Properties:
NameData TypeRequired
userDataFieldcom.ibm.commerce.order.facade.datatypes.FinancialTransactionType.userData.userDataField arrayfalse

com.ibm.commerce.order.facade.datatypes.FinancialTransactionType.userData.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

com.ibm.commerce.rest.order.handler.PaymentInstructionHandler$PaymentInstructionList

Payment instruction list.

Properties:
NameData TypeRequired
paymentInstructioncom.ibm.commerce.rest.order.handler.PaymentInstructionHandler$PaymentInstructionList$PaymentInstruction arraytrue
orderIdstringtrue

com.ibm.commerce.rest.order.handler.PaymentInstructionHandler$PaymentInstructionList$PaymentInstruction

Payment instruction.

Properties:
NameData TypeRequired
piIdstringtrue