Skip to main content
Use dynamic delivery to generate a key or other goods for each paid order. Paysum sends a signed request to your server. Paysum saves the items in your response and delivers them to the buyer.

Set up the product

Open the product. Under Delivery, select Dynamic. Enter your Webhook URL, select Create, and save the product.

Handle the request

Paysum sends a JSON POST with event: "delivery.requested". Verify x-webhook-signature with your store’s secret before you parse the body. See Verifying signatures.
The Idempotency-Key header matches delivery_id. Use that ID to save the goods in your database and return the same goods on a retry. If test is true, return sample goods, not real stock.

Return the goods

Return 2xx within 15 seconds. Return one item per unit. For example:
Paysum also accepts an array of strings, { "item": "EXAMPLE-KEY" }, { "content": "EXAMPLE-KEY" }, or a plain text item. The response limit is 64 KB, with up to 100 items and up to 4,000 characters per item. Paysum does not follow redirects. An invalid, empty, or non-2xx response causes Delivery failed. Paysum can try again when the delivery is next requested. It stops calling your server for the delivery after it saves a valid response.