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: string
Current organization context of the logged in user
-
X-CCVisitorId: 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:
array items
The details of all the payments in the current order.
Nested Schema : items
Type:
Show Source
object
-
amount:
number
Amount to be authorized from the gift card.
-
balance:
number
Total available balance on the gift card or store credit.
-
customProperties:
object customProperties
Custom object with dynamic properties. This will be passed to the webhook request
-
gatewayName:
string
Payment gateway name. e.g. chaseGiftCard.
-
giftCardNumber:
string
Gift card number used for payment. Payment type:physicalGiftCard.
-
giftCardPin:
string
Gift card pin. Payment type:physicalGiftCard.
-
isAmountRemaining:
boolean
A boolean to decide if more payment can be made from this payment.
-
paymentExpired:
boolean
True if cached payment details have expired.
-
paymentMethod:
string
Payment method. e.g. physicalGiftCard/ creditCard.
-
paymentState:
string
The state of the payment group. e.g. INITIAL.
-
storeCreditNumber:
string
Store credit number used for payment. Payment type:storeCredit.
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code