Skip to content
gist.link ↗

setInvoiceShipping

Mutation Pay API — POST https://pay.api.gist.link/graphql

Add/replace the invoice’s single shipping line from a rate of its latest quote and recalculate totals. Shipping is untaxed unless taxRateBps is passed (or PAY_SHIPPING_TAXABLE=1 applies the automatic rate). ROLE_ADMIN or ROLE_PAY_MANAGER.

pay:mutation:setInvoiceShipping

The calling IAM key must hold this permission (or a wildcard that covers it: pay:mutation:* or pay:*) and the access token must have been minted with audience=pay. See Permissions.

type Mutation {
setInvoiceShipping(invoiceId: String!, rateUuid: String!, taxRateBps: Int): Invoice!
}
Argument Type Required Description
invoiceId String! Yes —
rateUuid String! Yes —
taxRateBps Int No —

Invoice! — see the Pay types reference.

Terminal window
curl https://pay.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation SetInvoiceShipping($invoiceId: String!, $rateUuid: String!, $taxRateBps: Int) { setInvoiceShipping(invoiceId: $invoiceId, rateUuid: $rateUuid, taxRateBps: $taxRateBps) { id uuid status currency total created_at updated_at } }",
"variables": {
"invoiceId": "example",
"rateUuid": "example",
"taxRateBps": 10
}
}
JSON