# POST /v1/platform/purchases/{offerId}/payment

Pay the prepared invoice with an offered MPP or x402 method. Keep OAuth Authorization: Bearer; send MPP's complete Payment credential in the separate Payment header, or an x402 credential in PAYMENT-SIGNATURE. Omit the request body. Retry pending outcomes through purchase status before trying another method. A 402 is a wallet challenge, not payment consent or proof of settlement.

[All operations](/docs/api-reference/) · [Reusable schemas](/docs/api-reference/components/)

## Complete operation contract


```json
{
  "operationId": "platform.pay",
  "description": "Pay the prepared invoice with an offered MPP or x402 method. Keep OAuth Authorization: Bearer; send MPP's complete Payment credential in the separate Payment header, or an x402 credential in PAYMENT-SIGNATURE. Omit the request body. Retry pending outcomes through purchase status before trying another method. A 402 is a wallet challenge, not payment consent or proof of settlement.",
  "parameters": [
    {
      "name": "X-Economico-Business",
      "in": "header",
      "required": true,
      "description": "Explicit business slug for this request; must be approved by the connection and token.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "offerId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "method",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "enum": [
          "mpp",
          "x402"
        ]
      }
    },
    {
      "name": "invoiceId",
      "in": "query",
      "required": false,
      "description": "The ordinary renewal or extra-event invoice to pay, when supplied by the purchase response.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "Payment",
      "in": "header",
      "required": false,
      "description": "MPP Payment credential; independent of the OAuth Authorization header.",
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "PAYMENT-SIGNATURE",
      "in": "header",
      "required": false,
      "description": "x402 payment signature; independent of the OAuth Authorization header.",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Canonical result; missing read objects are null. Money is in decimal integer strings.",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "202": {
      "description": "Payment outcome is pending; recover status before collecting again.",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "400": {
      "description": "Invalid envelope, query or domain input; also `missing_rates`, a foreign-currency command whose exchange rates the shared store could not supply (`details.missing_rates: [{ base, quote, date }]`, plus `details.refusal: { code, message }` when the command also refused), answered by stating an evidenced `exchangeRate`.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid bearer token. Follow the WWW-Authenticate resource_metadata URL.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "402": {
      "description": "MPP or x402 payment challenge.",
      "content": {
        "application/json": {
          "schema": {}
        }
      },
      "headers": {
        "WWW-Authenticate": {
          "schema": {
            "type": "string"
          }
        },
        "PAYMENT-REQUIRED": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "403": {
      "description": "Membership revoked, business unavailable for writes, or command credential requirements not met (browser-only commands refuse all OAuth tokens). `demo_business`: the business is a demo (`demo: true` on the business read: fictional, its owner's alone) and the command would reach someone else, send a message (support included, for now), publish it, take a plan or make it look like a real company, or the demo has recorded the 2,000 events it may record; tell the user, who can create their own business to do this.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Unknown route or missing required resource.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "405": {
      "description": "Method not supported.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "headers": {
        "Allow": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "408": {
      "description": "Request body transfer timed out (code `upload_timeout`): it took over 30 s, or paused over 5 s between chunks; retry the same request.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "409": {
      "description": "Domain or idempotency conflict.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "411": {
      "description": "Length required (code `length_required`): a JSON body larger than 256 KiB must send Content-Length.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "413": {
      "description": "Payload too large (code `payload_too_large`): the request body exceeds the admitted byte limit.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "JSON body required.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "429": {
      "description": "Address rate budget exhausted. Wait for Retry-After seconds before retrying.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "headers": {
        "Retry-After": {
          "schema": {
            "type": "string",
            "pattern": "^[0-9]+$"
          }
        }
      }
    },
    "500": {
      "description": "Internal failure.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "503": {
      "description": "Busy (code `busy`): the business is still receiving other document uploads or serving other large documents, and did not start this request. Retry the same request after Retry-After seconds.",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "headers": {
        "Retry-After": {
          "schema": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-payment-info": {
    "price": {
      "mode": "dynamic",
      "currency": "USD"
    },
    "protocols": [
      {
        "mpp": {
          "method": "stripe",
          "intent": "charge",
          "currency": "usd"
        }
      },
      {
        "mpp": {
          "method": "tempo",
          "intent": "charge",
          "currency": "usd"
        }
      },
      {
        "x402": {}
      }
    ],
    "offers": [
      {
        "method": "stripe",
        "intent": "charge",
        "currency": "usd",
        "description": "Pay the prepared plan or extra-events invoice with a Stripe shared payment token (Link or card) when the MPP challenge offers it. The amount is that invoice's amount on the runtime 402 challenge, not a fixed per-call price."
      },
      {
        "method": "tempo",
        "intent": "charge",
        "currency": "usd",
        "description": "Pay the same invoice with a Tempo transfer when the MPP challenge offers Tempo. The challenge names the token. The amount is that invoice's amount on the runtime 402 challenge, not a fixed per-call price."
      }
    ]
  }
}
```


