Add this first. This tool needs an access token, so add Get PayPal Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Get a PayPal order by its order ID. Get a PayPal access token first if you do not already have one. Use it when the customer asks whether a PayPal payment went through. Report the status (for example CREATED, APPROVED or COMPLETED) and the amount. The response can include the payer's name, email and shipping address, so never read those out or share them.
Request
GEThttps://api-m.paypal.com/v2/checkout/orders/{{orderId}}
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}
Parameters
orderId stringThe PayPal order ID.accessToken stringThe access_token value returned by Get PayPal Access Token. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "1a5cd1df-fb56-4ab4-bcc7-1de7ec1ed69e",
"type": "HTTP_REQUEST",
"label": "Get PayPal Order",
"name": "get_paypal_order",
"customName": false,
"description": "Get a PayPal order by its order ID. Get a PayPal access token first if you do not already have one. Use it when the customer asks whether a PayPal payment went through. Report the status (for example CREATED, APPROVED or COMPLETED) and the amount. The response can include the payer's name, email and shipping address, so never read those out or share them.",
"parameters": [
{
"name": "orderId",
"type": "string",
"description": "The PayPal order ID."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by Get PayPal Access Token. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "GET",
"url": "https://api-m.paypal.com/v2/checkout/orders/{{orderId}}"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": null,
"timeout": null
}
}
}IDs are regenerated on every copy.