Get the payment link
complete_checkoutGenerate a Yoco card or Ozow instant-EFT payment link; this does NOT complete payment. Rejects cancelled checkouts and rechecks stock and totals first. An atomic claim prevents competing gateway calls. Returns payment_url or null plus status and message; cloud callers may be held. Retain a successful URL: repeat calls return payment_pending with no URL. Gateway failures raise an error, send no payment-link email and require team review rather than an automatic retry. Poll get_order with customer_email for payment status.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"checkout_id": "<checkout_id>"
},
"name": "complete_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checkout_id | Yes | ||
| payment_method | No | Overrides any value set in create_checkout/update_checkout |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ap2 | No | ||
| items | No | ||
| status | Yes | ||
| message | Yes | ||
| currency | No | ||
| customer | No | ||
| next_step | No | ||
| total_zar | No | ||
| item_count | No | ||
| checkout_id | Yes | ||
| payment_url | Yes | ||
| payment_method | No | ||
| provider_reference | No |