Skip to navigation

Renew Payment Link

View as Markdown

Opens a new payment link for an order whose link has run out, so the shopper can pay. The items are checked first: if any are no longer in stock, it returns 422 and the merchant has to complete the order. While the current link is still open, the order comes back with that link unchanged. Identify the order with a shopper-token, the email entered at checkout, or the key from the order email. An order can be renewed 5 times in 15 minutes.

Keys: public key or secret key.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

identitystring
The identity for the active workspace.

Headers

channelstringRequired
client-ipstringOptional
The shopper's IP address. Read only when the request is signed with a secret key, so a server calling on behalf of many shoppers does not share one rate limit. Ignored for public keys.
shopper-tokenstringOptional
Send it when the shopper is signed in.

Request

This endpoint expects an object.
referencestringRequired<=15 characters
Order reference from the checkout response or confirmation.
emailstringOptionalformat: "email"<=255 characters

The email entered at checkout. Not needed with a shopper-token or a key.

keystringOptional=64 characters

The key from the link in the order email, sent instead of email. When you pass order_url at checkout, the email links there with reference and key in the query string.

return_urlstringOptionalformat: "uri"<=512 characters

Where the shopper goes when they press Back to store after paying, usually your order or thank-you page. Must be https (http only for localhost). With a publishable key it must be on the same site that calls the Store API. When left out, the shopper returns to the workspace’s hosted store.

Response

Payment link ready
statusboolean

Always true on success.

messagestring

Human-readable outcome.

dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error