Create Booking Payment Link
create_booking_payment_linkFor a reservation that reserve_slot returned with payment.required = true: returns the MPP payment link, the amount charged now, and the balance due at the visit. The agent pays it itself (HTTP 402 challenge, then the person's wallet credential); no code is sent to the customer for a paid booking. A booking that takes no payment through Advocate answers payment_required false with a detail, not an error, and, if not confirmed yet, is confirmed with confirm_booking and the customer's code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Business slug identifier | |
| reservation_id | Yes | The reservation_id reserve_slot returned with payment.required = true |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| detail | No | Present when payment_required is false: what to do instead, since no payment is taken through Advocate | |
| currency | No | ||
| expires_at | No | Unix seconds after which the reservation lapses unpaid | |
| amount_cents | No | Minor units charged now | |
| due_at_visit | No | ||
| instructions | No | ||
| payment_link | No | POST here (no body) to receive the HTTP 402 MPP challenge | |
| reservation_id | No | Present when payment_required is false | |
| payment_required | Yes | true: payment for this booking is taken through Advocate; it may already be authorized or in flight, so ask for a new approval only if the pay route answers 402. Comes with payment_link, amount_cents, currency, kind, balance_due_cents, due_at_visit, expires_at and instructions. false: no payment is taken through Advocate for this booking, which does not mean the service is free. Comes with reservation_id and detail only. | |
| balance_due_cents | No | Minor units due at the visit |