Charge the cart by PIX
Turns the cart into an order, creates the PIX charge (or reuses a live
one for the same order) and posts it into the conversation as the
caller: a message with the QR code card, then one with just the
copy-and-paste code. Needs the contact details and freight
(GET .../cart/customer says what is missing).
Authorization
bearer_auth Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.
In: header
Path Parameters
Store id
uuidConversation id
uuidHeader Parameters
A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.
length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08/cart/pix"{
"conversation": {
"assignee_user_id": "e942d24d-8cee-4fa2-bf68-164509e32e2f",
"attributes": {},
"bot_active": true,
"channel_id": "bbe8aa76-a4bb-46f6-a785-df8e831cc459",
"channel_kind": "web",
"contact_email": "string",
"contact_name": "string",
"contact_phone": "string",
"created_at": "2019-08-24T14:15:22Z",
"csat_comment": "string",
"csat_score": 0,
"customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
"external_id": "string",
"handed_over_at": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"last_message_at": "2019-08-24T14:15:22Z",
"last_message_preview": "string",
"last_message_sender": null,
"priority": "low",
"resolved_at": "2019-08-24T14:15:22Z",
"snoozed_until": "2019-08-24T14:15:22Z",
"status": "open",
"store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
"tags": [
"string"
],
"unread_for_agents": 0,
"unread_for_visitor": 0,
"updated_at": "2019-08-24T14:15:22Z",
"visitor_id": "string"
},
"message": {
"agent_user_id": "10fd0551-5cc1-4920-817b-63bd803087a9",
"attachments": [
{
"index": 0,
"kind": "string",
"mime_type": "string",
"name": "string",
"path": "string",
"size": 0,
"url": "string"
}
],
"conversation_id": "cc71b11a-25cd-4c2d-9950-df2cc38e3407",
"created_at": "2019-08-24T14:15:22Z",
"delivery_error": "string",
"delivery_status": "sent",
"external_id": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"payload": {
"assignee_user_id": "e942d24d-8cee-4fa2-bf68-164509e32e2f",
"attachments": [
{}
],
"cart": null,
"email": {},
"interactive": true,
"kind": "string",
"location": {},
"paid_order_id": "string",
"pix": null,
"pix_code": true,
"products": [
{
"compare_at": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"image": "string",
"price": "string",
"title": "string",
"url": "string"
}
],
"quick_replies": [
"string"
],
"reason": "string"
},
"read_at": "2019-08-24T14:15:22Z",
"sender": "visitor",
"store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
"text": "string"
},
"pix": {
"amount": "string",
"amount_cents": 0,
"cart": null,
"copy_paste": "string",
"expires_at": "2019-08-24T14:15:22Z",
"order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
"order_number": "string",
"qr_code_base64": "string"
}
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}