Send a payment link
const url = 'https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/payment-link';const options = { method: 'POST', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/orders/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/payment-link \ --cookie bottle.session_token=<bottle.session_token>A hosted page on the business’s own Stripe account, for the amount including VAT. The customer is emailed it straight away, and the order says it is awaiting payment until Stripe says it was paid. Call again to send it again. An order paid by link is not planned onto a round until it is paid.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”UUID v7
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Responses
Section titled “Responses”Sent
object
UUID v7
UUID v7
UUID v7
object
UUID v7
Delivery: goes on a round. collection: the customer picks it up from the yard; never planned onto a van, and comes off stock when marked collected.
UUID v7
On_account: billed later, nothing to collect. link: a payment link raised in the accounting system. cash: the driver takes it at the door.
object
UUID v7
UUID v7
Pence, excluding VAT.
object
UUID v7
object
UUID v7
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "deliveryAddressId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "roundId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "placed", "fulfilment": "delivery", "source": "office", "trackingRef": "7K3M9QWXZ2", "leaveInstruction": "none", "deliveryOptionId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "paymentMethod": "on_account", "lines": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productName": "19kg propane" } ], "collect": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "productName": "19kg propane" } ], "paidVia": "stripe", "invoice": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "number": "INV-BTL00042", "status": "sent" }}Not signed in
object
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
object
Example
{ "error": "not_found", "message": "Customer not found"}Not found
object
Example
{ "error": "not_found", "message": "Customer not found"}Already paid, or the business cannot take payment yet
object
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed, or a line names something not sold
object
object
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}Payments are not configured on this installation
object
Example
{ "error": "not_found", "message": "Customer not found"}