Hi,
We are facing an issue when creating a draft order with a paymentTemplateId
. When we set up a payment term with a 15% deposit and enable the “require” option, the invoice URL does not appear when creating the draft order. Does anyone know how to assign a deposit to a draft order? [my store plan_name: partner_test]
Hi,
We might need a bit more detail on this to troubleshoot. Is this a mutation you’re making? Can you post the full mutation and any userErrors that are being returned?
@Liam-Shopify, I perform the following mutation.
Mutation
mutation draftOrderCreate($input: DraftOrderInput!) {
draftOrderCreate(input: $input) {
draftOrder {
id
invoiceUrl
}
userErrors {
field
message
}
}
}
Body:
input: {
lineItems: [
{
variantId: "gid://xxx",
quantity: 1
}
],
purchasingEntity: {
purchasingCompany: {
companyId: "gid://xxx",
companyContactId: "gid://xxx",
companyLocationId: "gid://xxx"
}
},
shippingAddress: {
address1: "CLand Tower",
address2: "CHAHA",
city: "Ha Noi",
company: "test 123",
countryCode: "VN",
firstName: "tét",
lastName: "tét",
phone: null,
provinceCode: null,
zip: "10000"
},
billingAddress: {
address1: "CLand Tower",
address2: "CHAHA",
city: "Hà Nội",
company: "test 123",
countryCode: "VN",
firstName: "tét",
lastName: "tét",
phone: "+84335045675",
provinceCode: null,
zip: "10000"
},
paymentTerms: {
paymentSchedules: {
dueAt: null,
issuedAt: "2025-01-16T02:53:04+00:00"
},
paymentTermsTemplateId: "gid://xxx"
}
}
Output
I am setting up a selected product within a catalog for B2B customers and configuring the payment term for that company location.
Do you get the value for invoiceUrl
returned in the code of the mutation return?
@Liam-Shopify, Yes, I did receive the URL.
And so you want to display the url link on the page that the customer sees?
@Liam-Shopify, I want that when the deposit is set to 15%, the draft order displayed to the customer to show the “Total Due Today” as 15% of the total order value so they can make a partial payment according to the payment terms. However, when setting up and creating the draft order with the payment term ID, the “Total Due Today” always shows as 0.
Hi @Liam-Shopify,
I’m facing the same issue with deposits when creating a DraftOrder using the GraphQL Admin API. The API only provides options for paymentTemplateId
and lacks a direct deposit
field. As a result, when using paymentTerm
settings for B2B customers (e.g., a 20% deposit), the created DraftOrder doesn’t reflect the required deposit, even though orders created via the storefront cart do.
Is there a way to ensure that DraftOrders apply the same deposit terms as regular orders?
@Liam-Shopify Could you take a look at this issue?