A valid request URL is required to generate request examples{
"provider": "stripe",
"provider_account_id": "acct_1234",
"published": 2,
"matched": 1,
"failed": 0,
"not_attempted": 0,
"rows": [
{
"price_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "published",
"provider_price_id": "price_1234",
"provider_product_id": "prod_1234",
"error_code": "<string>",
"error": "<string>"
}
]
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Publish this catalogue to a payment provider
Requires billing:write. Creates this environment’s own prices at the gateway and writes down the mapping that makes them chargeable. It is the import’s mirror, for a catalogue that was priced here first: a price with no mapping is one a checkout refuses with price_not_mapped_to_provider, and the only repair before this was to retype it in the gateway’s dashboard and import it back.
Answers 200 with the report, synchronously — this walks your own catalogue, which is tens of rows, rather than an unknown listing at somebody else’s gateway.
It only ever creates
There is no update and no archive in this direction, and the seam does not express one. A catalogue price cannot change here — the money is what somebody agreed to pay, and the schema refuses to edit it — so there is no state for the two sides to disagree about. Withdrawing something is a commercial act performed where the money is, and an archive that travelled from here would stop billing people who are already paying.
What a line does
published — the price now exists at the gateway and is mapped. matched — it already was, so nothing was sent and nothing was written. failed — the gateway refused it, or the row cannot be expressed as a gateway price; error_code names which.
A plan is one product. A plan’s second currency is published under the product its first price created, or under the product that plan is already known as on this account — never a second product with the same name.
Running it twice is free. A published price is matched on the next run, and the gateway request carries an idempotency key derived from the price row, so even a retry whose answer was lost lands on the same gateway object instead of creating a second one.
What it does not attempt
not_attempted is its own number, and reading it matters: a batch is bounded at 25 prices, and a gateway that stops answering stops the run rather than having the prices it never tried reported as refusals. In both cases the same call again continues where this one stopped.
Archived prices, and prices of archived plans, are skipped when publishing the whole environment — creating them at the gateway would publish something nobody can buy. Name one in price_ids and it is reported instead of skipped, because somebody asked about that row.
A valid request URL is required to generate request examples{
"provider": "stripe",
"provider_account_id": "acct_1234",
"published": 2,
"matched": 1,
"failed": 0,
"not_attempted": 0,
"rows": [
{
"price_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "published",
"provider_price_id": "price_1234",
"provider_product_id": "prod_1234",
"error_code": "<string>",
"error": "<string>"
}
]
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Authorizations
A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange. Only a 401 means it is spent; not_a_member (403) is about the organization named in X-Organization-Id and leaves the token good for the others.
Headers
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Path Parameters
The environment's id.
The payment gateway. stripe today. A gateway UserKit has no adapter for is refused here rather than stored, because a connection nothing can charge is discovered at somebody's checkout.
stripe Body
Which prices to publish. Omit it — or send no body at all — to publish every price in this environment that has no mapping on this connection's merchant account. A price named here is always reported, including when it is already mapped or archived.
Response
The report. Read not_attempted beside the tallies: it is what keeps a bounded or interrupted run from reading as “everything is mapped now”.
"stripe"
The merchant account these prices were created in — half of what a gateway price id is unique inside.
"acct_1234"
2
Already mapped: nothing was sent and nothing was written.
1
0
Candidates left over the batch bound, or dropped because the gateway stopped answering. Run it again to continue.
0
Show child attributes
Show child attributes