> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/pay_cart.md).

# Rmfg Pay Cart

Block that pays an RMFG cart through the API. This charges a real card and starts production, so the platform marks it as a sensitive action that a person approves before it runs.

## RMFG Pay Cart

### What it is

Pays an RMFG cart with the saved card and places a real production order

### How it works

Posts to `/v1/carts/{id}/pay` with `card_on_file`, which uses the card saved on the RMFG account page, or with `payment_method` and a Stripe PaymentMethod id you manage; the block refuses `payment_method` without a `payment_method_id` before any request is made. A connected RMFG account must have been approved with "Also allow paid orders" (the `payments` permission); an API key pays whenever the account has a saved card. RMFG only accepts an open cart whose quote is `ready` with a `ship_to` and `shipping_option_id`; anything else, a missing card, or a declined charge is reported as `RMFG <code>: <message>` on `error` and nothing is charged.

The charge is the cart's `totals.amount_total_cents`. A stable `Idempotency-Key` (defaulting to the node execution ID) makes retries safe: repeating a paid cart returns the existing payment rather than charging twice. A 202 means the outcome is not yet known, so `payment_status` is `processing` and `checked_out` is false; re-read the cart instead of paying again. On success the cart becomes `checked_out` and `order_id` points at the new order. The platform marks this block as a sensitive action, so a person approves each run.

### Inputs

| Input               | Description                                                                                                                   | Type                                  | Required |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -------- |
| cart\_id            | Open cart whose quote is ready and which has a ship\_to and shipping option. Its totals.amount\_total\_cents will be charged. | str                                   | Yes      |
| payment\_type       | card\_on\_file charges the card saved on the RMFG account page; payment\_method charges a Stripe PaymentMethod you manage.    | "card\_on\_file" \| "payment\_method" | No       |
| payment\_method\_id | Stripe PaymentMethod id (pm\_...) when payment\_type is payment\_method.                                                      | str                                   | No       |
| customer\_email     | Receipt and order emails; defaults to the account email.                                                                      | str                                   | No       |
| customer\_phone     | Contact number for the order.                                                                                                 | str                                   | No       |
| idempotency\_key    | Stable key so a retry never charges twice; defaults to the node execution ID. Use a new key only for a different purchase.    | str                                   | No       |

### Outputs

| Output                  | Description                                                                      | Type                                                                               |
| ----------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| error                   | Error message if the request failed                                              | str                                                                                |
| cart                    | The full cart, including its latest quote                                        | Cart                                                                               |
| cart\_id                | Cart ID                                                                          | str                                                                                |
| cart\_url               | Website checkout link; anyone holding it can pay, keep it private                | str                                                                                |
| status                  | open, checked\_out or expired                                                    | "open" \| "checked\_out" \| "expired"                                              |
| quote\_status           | Status of the cart's latest quote; only ready carts can be paid                  | "processing" \| "requires\_input" \| "ready" \| "blocked" \| "expired" \| "failed" |
| is\_payable             | True when the cart is open, quoted ready, and has an address and shipping option | bool                                                                               |
| totals                  | Subtotal, shipping, tax and total                                                | CartTotals                                                                         |
| amount\_total\_cents    | What checkout will charge, in USD cents                                          | int                                                                                |
| shipping\_options       | Delivery choices once ship\_to is set; pass an id to Update Cart                 | List\[ShippingOption]                                                              |
| requirements            | Selections or decisions still needed before ordering                             | List\[Requirement]                                                                 |
| manufacturing\_warnings | Advisories from automatic file preparation; they do not block ordering           | List\[ManufacturingReviewWarning]                                                  |
| order\_id               | Order ID; only emitted once the cart has been paid                               | str                                                                                |
| payment\_status         | paid, processing (check the cart again later), failed or refunded                | "paid" \| "processing" \| "failed" \| "refunded"                                   |
| checked\_out            | True once the order exists                                                       | bool                                                                               |

### Possible use case

**Approved Agent Order**: After the customer confirms the total, pay the cart and hand `order_id` to Get Order for tracking.

**Automated Reorder**: Re-order a standard part from a saved configuration with the account's card on file.

**Managed Payment Method**: Pay with a specific Stripe PaymentMethod when the business keeps its own cards.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/pay_cart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
