getPaymentOrder query
This query is available only if you have installed Payment Services for Adobe Commerce 2.3.0 or higher.
The getPaymentOrder
query retrieves the payment details for the order. You must run the getPaymentOrder
query when the Signifyd integration and hosted_fields
are enabled in Payment Services.
Syntax
Copied to your clipboard{getPaymentOrder(cartId: String!id: String!) PaymentOrderOutput}
Example usage
The following example runs the getPaymentOrder
query:
Request:
Copied to your clipboard{getPaymentOrder (cartId: "rPG5SFUQN6ePsfNNDnhrmmr9SNWqpPSS"id: "9XD295279E1088104") {mp_order_ididstatuspayment_source_details {card {namelast_digitscard_expiry_monthcard_expiry_yearbin_details {bin}}}}}
Response:
Copied to your clipboard{"data": {"getPaymentOrder": {"mp_order_id": "mp-order-972b389e-690c-4deb-b68a-f83c9076a6e7","id": "9XD295279E1088104","status": "APPROVED","payment_source_details": {"card": {"name": "Testf Testl","last_digits": "7763","card_expiry_month": "12","card_expiry_year": "2026","bin_details": {"bin": "455676"}}}}}}
Input attributes
The getPaymentOrder
query must contain the following input attributes:
Attribute | Data Type | Description |
---|---|---|
cartId | String! | The unique ID of the cart |
id | String! | The unique order ID generated by PayPal |
Output attributes
The PaymentOrderOutput
object contains the following attributes:
Attribute | Data Type | Description |
---|---|---|
id | String | The unique order ID generated by PayPal |
mp_order_id | String | The unique order ID generated in Commerce if Payment Services is enabled after PayPal returns the id |
payment_source_details | PaymentSourceDetails | The payment source details for the order |
status | String | The status of the payment order. See order status for more information |
PaymentSourceDetails
attributes
The PaymentSourceDetails
object contains the payment details for the order for the type of payment source. Hosted fields only works with credit card. All child attributes are listed in alphabetical order.
Attribute | Data Type | Description |
---|---|---|
card | Card | The payment card details for the order |
Card
attributes
The PaymentSourceDetails
object has a Card
object containing the following attributes:
Attribute | Data Type | Description |
---|---|---|
bin_details | CardBin | Card bin details |
card_expiry_month | String | Expiry month on the card |
card_expiry_year | String | Expiry year on the card |
last_digits | String | Last digits of the card |
name | String | Name on the card |
BinDetails
attributes
The bin_details
CardBin contains the following attribute:
Attribute | Data Type | Description |
---|---|---|
bin | String | Card bin number |