Menu
shopPayPaymentRequestSessionSubmit
Finalizes a Shop Pay payment request session. Call this mutation after creating a session with shopPayPaymentRequestSessionCreate.
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the shopPayPaymentRequestSessionSubmit action (under Shop).
- Fill in the fields below, then reference the result from later steps as
{{shoppaypaymentrequestsessionsubmit.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation ShopPayPaymentRequestSessionSubmit($token: String!, $paymentRequest: ShopPayPaymentRequestInput!, $idempotencyKey: String!, $orderName: String) {
shopPayPaymentRequestSessionSubmit(
token: $token
paymentRequest: $paymentRequest
idempotencyKey: $idempotencyKey
orderName: $orderName
) {
paymentRequestReceipt {
paymentRequest {
deliveryMethods
discountCodes
discounts
lineItems
locale
presentmentCurrency
selectedDeliveryMethodType
shippingAddress
shippingLines
subtotal
total
totalShippingPrice
totalTax
}
processingStatusType
token
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"token": "string",
"paymentRequest": {
"total": {
"amount": "string",
"currencyCode": "USD"
},
"subtotal": {
"amount": "string",
"currencyCode": "USD"
},
"locale": "string",
"presentmentCurrency": "USD",
"discountCodes": [
"string"
],
"lineItems": [
{
"quantity": "string",
"label": "string",
"sku": "string",
"requiresShipping": "string",
"image": "string",
"originalLinePrice": "string",
"finalLinePrice": "string",
"lineDiscounts": "string",
"originalItemPrice": "string",
"finalItemPrice": "string",
"itemDiscounts": "string"
}
],
"shippingLines": [
{
"code": "string",
"label": "string",
"amount": "string"
}
],
"discounts": [
{
"label": "string",
"amount": "string"
}
],
"totalShippingPrice": {
"discounts": [
"string"
],
"originalTotal": {
"amount": "string",
"currencyCode": "string"
},
"finalTotal": {
"amount": "string",
"currencyCode": "string"
}
},
"totalTax": {
"amount": "string",
"currencyCode": "USD"
},
"deliveryMethods": [
{
"code": "string",
"label": "string",
"detail": "string",
"amount": "string",
"minDeliveryDate": "string",
"maxDeliveryDate": "string",
"deliveryExpectationLabel": "string"
}
],
"selectedDeliveryMethodType": "SHIPPING"
},
"idempotencyKey": "string",
"orderName": "string"
}
Response
Read the result with {{shoppaypaymentrequestsessionsubmit.response.data.data.shopPayPaymentRequestSessionSubmit}}. If the API returns errors, the step fails and they are at {{shoppaypaymentrequestsessionsubmit.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?