getPaymentOrder query
data-variant=info
data-slots=text
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
{
getPaymentOrder(
cartId: String!
id: String!
) PaymentOrderOutput
}
Reference
The getPaymentOrder reference provides detailed information about the types and fields defined in this query.
Example usage
The following example runs the getPaymentOrder query:
Request:
{
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:
{
"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:
cartIdidOutput attributes
The PaymentOrderOutput object contains the following attributes:
idmp_order_ididpayment_source_detailsPaymentSourceDetails 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.
cardCard attributes
The PaymentSourceDetails object has a Card object containing the following attributes:
bin_detailscard_expiry_monthcard_expiry_yearlast_digitsnameBinDetails attributes
The bin_details CardBin contains the following attribute:
bin