Edit in GitHubLog an issue

getPaymentOrder query

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_id
id
status
payment_source_details {
card {
name
last_digits
card_expiry_month
card_expiry_year
bin_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:

AttributeData TypeDescription
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:

AttributeData TypeDescription
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.

AttributeData TypeDescription
card
Card
The payment card details for the order

Card attributes

The PaymentSourceDetails object has a Card object containing the following attributes:

AttributeData TypeDescription
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:

AttributeData TypeDescription
bin
String
Card bin number
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.