Retrieve all payments
get
/ccstore/v1/orders/current/payments
This API is used by the CX Commerce OSF Storefront. This API is currently not used by CX Commerce Classic Storefront but may be used in the future. It may be used in applications outside of CX Commerce Storefront.
Get all the payments from the cart. This operation will fetch all the payments retained on the current order.
This endpoint is part of a group of APIs used in conjunction with each other to perform granular actions on the cart (current incomplete order).
Request
Supported Media Types
- application/json
Header Parameters
-
X-CCOrganization(optional): string
Current organization context of the logged in user
-
X-CCVisitorId(optional): string
ID provided by the Oracle Commerce Visit Service to uniquely identify the current visitor. It is required for every request to enable full endpoint capabilities for all shopper types.
Response
Supported Media Types
- application/json
200 Response
Returned when the operation succeeds.
Root Schema : getPayments_response
Type:
Show Source
object
-
items(optional):
array items
The details of all the payments in the current order.
Nested Schema : items
Type:
Show Source
object
-
amount(optional):
number
Amount to be authorized from the gift card.
-
balance(optional):
number
Total available balance on the gift card or store credit.
-
customProperties(optional):
object customProperties
Custom object with dynamic properties. This will be passed to the webhook request
-
gatewayName(optional):
string
Payment gateway name. e.g. chaseGiftCard.
-
giftCardNumber(optional):
string
Gift card number used for payment. Payment type:physicalGiftCard.
-
giftCardPin(optional):
string
Gift card pin. Payment type:physicalGiftCard.
-
isAmountRemaining(optional):
boolean
A boolean to decide if more payment can be made from this payment.
-
paymentExpired(optional):
boolean
True if cached payment details have expired.
-
paymentMethod(optional):
string
Payment method. e.g. physicalGiftCard/ creditCard.
-
paymentState(optional):
string
The state of the payment group. e.g. INITIAL.
-
storeCreditNumber(optional):
string
Store credit number used for payment. Payment type:storeCredit.
-
type(optional):
string
Payment type: physicalGiftCard, storeCredit
Nested Schema : customProperties
Type:
object
Custom object with dynamic properties. This will be passed to the webhook request
Example Response (application/json)
{
"totalResults":"2",
"offset":"0",
"hasMore":"false",
"limit":"250",
"links":[
{
"method":"PATCH",
"rel":"/rels/updatePayments",
"href":"http://localhost:8080/ccstoreui/v1/orders/current/payments"
},
{
"method":"GET",
"rel":"last",
"href":"http://localhost:8080/ccstoreui/v1/orders/current/payments?offset=0&limit=2"
},
{
"method":"POST",
"rel":"/rels/addPayments",
"href":"http://localhost:8080/ccstoreui/v1/orders/current/payments/add"
},
{
"method":"GET",
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/orders/current/payments"
},
{
"method":"GET",
"rel":"canonical",
"href":"http://localhost:8080/ccstoreui/v1/orders/current/payments"
},
{
"method":"GET",
"rel":"first",
"href":"http://localhost:8080/ccstoreui/v1/orders/current/payments?offset=0&limit=250"
}
],
"items":[
{
"paymentGroupId":"pg230431",
"amount":9.11,
"customPaymentProperties":{
},
"balance":"9.11",
"gatewayName":"demoGenericGiftCardGateway",
"giftCardNumber":"6035718888920014103",
"paymentMethod":"physicalGiftCard",
"isAmountRemaining":false,
"paymentState":"INITIAL",
"maskedCardNumber":"xxxxxxxxxxxxxxx4103"
},
{
"paymentGroupId":"pg230433",
"amount":5.88,
"customPaymentProperties":{
},
"balance":"28.61",
"gatewayName":"demoGenericGiftCardGateway",
"giftCardNumber":"987655432",
"paymentMethod":"physicalGiftCard",
"isAmountRemaining":true,
"paymentState":"INITIAL",
"maskedCardNumber":"xxxxx5432"
}
]
}
Default Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code