Menu
shopPayPaymentRequestSessionCreate
Creates a Shop Pay payment request session for processing payments. The session includes a checkout URL where customers complete their purchase and a token for subsequent operations like submitting the payment.
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the shopPayPaymentRequestSessionCreate action (under Shop).
- Fill in the fields below, then reference the result from later steps as
{{shoppaypaymentrequestsessioncreate.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 ShopPayPaymentRequestSessionCreate($sourceIdentifier: String!, $paymentRequest: ShopPayPaymentRequestInput!) {
shopPayPaymentRequestSessionCreate(
sourceIdentifier: $sourceIdentifier
paymentRequest: $paymentRequest
) {
shopPayPaymentRequestSession {
checkoutUrl
paymentRequest {
deliveryMethods
discountCodes
discounts
lineItems
locale
presentmentCurrency
selectedDeliveryMethodType
shippingAddress
shippingLines
subtotal
total
totalShippingPrice
totalTax
}
sourceIdentifier
token
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"sourceIdentifier": "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"
}
}
Response
Read the result with {{shoppaypaymentrequestsessioncreate.response.data.data.shopPayPaymentRequestSessionCreate}}. If the API returns errors, the step fails and they are at {{shoppaypaymentrequestsessioncreate.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?