Skip to content
msMarketSDK

all endpoints

// api reference

Orders

GET /v1/orders

List orders, newest first

secret key only

GET /v1/ordersrequest
curl https://api.marketsdk.com/v1/orders \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, order list
{
  "object": "list",
  "data": [
    {
      "object": "order",
      "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
      "listing": "string",
      "buyer": "string",
      "seller": "string",
      "quantity": 0,
      "price": {
        "unit_amount": 0,
        "amount": 0,
        "currency": "USD"
      },
      "fee": {
        "amount": 4900,
        "currency": "USD"
      },
      "payments": false,
      "payment": {
        "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
        "status": "awaiting_payment",
        "checkout_url": null,
        "client_secret": null,
        "amount_refunded": 0,
        "amount_released": 0,
        "release_status": "held"
      },
      "state": "awaiting_payment",
      "state_reason": "payment_expired",
      "claimed_by": "buyer",
      "cancellation_proposal": {
        "proposed_by": "buyer",
        "expires_at": "2026-10-01T12:00:00.000Z"
      },
      "timer_expires_at": null,
      "completed_at": null,
      "review_window_closes_at": null,
      "dispute_window_closes_at": null,
      "metadata": {},
      "created_at": "2026-10-01T12:00:00.000Z",
      "updated_at": "2026-10-01T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

parameters

Parameters
fieldtypeabout
limitinteger, in querymin 1, max 100, default 20
starting_afterstring, in queryThe next_cursor of the previous page.
buyerstring, in query
sellerstring, in query
listingstring, in query
stateone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired, in query

returns 200, order list

fields
Response fields
fieldtypeabout
objectrequiredone of: list
datarequiredarray of order
data[].objectrequiredone of: order
data[].idrequiredstring
data[].listingrequiredstring
data[].buyerrequiredstring
data[].sellerrequiredstring
data[].quantityrequiredinteger
data[].pricerequiredorder price
data[].price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
data[].price.amountrequiredintegerunit_amount times quantity. Minor units.
data[].price.currencyrequiredstring
data[].feerequiredmoneyThe customer's platform fee, fixed when the order was created.
data[].fee.amountrequiredintegerInteger minor units.
data[].fee.currencyrequiredstring
data[].paymentsrequiredbooleanWhether payments were on when the order was created.
data[].paymentrequiredorder payment or null
data[].payment.idrequiredstring
data[].payment.statusrequiredone of: awaiting_payment, succeeded, canceled
data[].payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
data[].payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
data[].payment.amount_refundedrequiredintegerRefunded so far. Minor units.
data[].payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
data[].payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
data[].staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
data[].state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
data[].claimed_byrequiredone of: buyer, seller, null or null
data[].cancellation_proposalrequiredcancellation proposal or null
data[].cancellation_proposal.proposed_byrequiredone of: buyer, seller
data[].cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
data[].timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
data[].completed_atrequiredtimestamp or null
data[].review_window_closes_atrequiredtimestamp or null
data[].dispute_window_closes_atrequiredtimestamp or null
data[].metadatarequiredobject of strings
data[].created_atrequiredtimestamp
data[].updated_atrequiredtimestamp
has_morerequiredbooleanWhether another page follows.
next_cursorrequiredstring or nullPass as starting_after (or cursor for search) to get the next page.

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 429Rate limited. See Retry-After.

POST /v1/orders

Create an order

The buyer commits to buy. Quantity is reserved at once. With payments off the order is committed; with payments on it awaits payment.

secret key only

POST /v1/ordersrequest
curl -X POST https://api.marketsdk.com/v1/orders \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"listing":"lst_034XtPDs7UJ0TXzTsdaHZa","buyer":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
201 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

body, create order

Request body
fieldtypeabout
listingrequiredstring
buyerrequiredstringThe buyer placing the order. The actor for this transition.
quantityintegermin 1, default 1
checkoutcheckout urlsPayments on only. With these, the order's payment includes a Stripe-hosted checkout URL; without them, a client secret for Stripe Elements on your own page.
checkout.success_urlrequiredstringWhere Stripe sends the buyer after paying.
checkout.cancel_urlrequiredstringWhere Stripe sends the buyer if they go back.
metadataobject of strings

returns 201, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

GET /v1/orders/{id}

Retrieve an order

secret key only

GET /v1/orders/{id}request
curl https://api.marketsdk.com/v1/orders/{id} \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 429Rate limited. See Retry-After.

GET /v1/orders/{id}/events

An order's transitions, oldest first

secret key only

GET /v1/orders/{id}/eventsrequest
curl https://api.marketsdk.com/v1/orders/{id}/events \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, order event list
{
  "object": "list",
  "data": [
    {
      "object": "order_event",
      "id": "oev_034XtPDs7UJ0TXzTsdaHZa",
      "order": "string",
      "sequence": 0,
      "from_state": null,
      "to_state": "string",
      "actor_type": "buyer",
      "actor": null,
      "reason": null,
      "created_at": "2026-10-01T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

returns 200, order event list

fields
Response fields
fieldtypeabout
objectrequiredone of: list
datarequiredarray of order event
data[].objectrequiredone of: order_event
data[].idrequiredstring
data[].orderrequiredstring
data[].sequencerequiredinteger
data[].from_staterequiredstring or null
data[].to_staterequiredstring
data[].actor_typerequiredone of: buyer, seller, system, customer
data[].actorrequiredstring or null
data[].reasonrequiredstring or null
data[].created_atrequiredtimestamp
has_morerequiredbooleanWhether another page follows.
next_cursorrequiredstring or nullPass as starting_after (or cursor for search) to get the next page.

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/claim

Claim the deal is done (committed to claimed)

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition.

secret key only

POST /v1/orders/{id}/claimrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/claim \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, actor

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/confirm

Confirm a claim (claimed to completed), by the party who did not claim

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition.

secret key only

POST /v1/orders/{id}/confirmrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/confirm \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, actor

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/back_out

Back out (committed to cancelled)

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition. Writes a backed_out reputation event against the actor.

secret key only

POST /v1/orders/{id}/back_outrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/back_out \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, actor

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/propose_cancel

Propose cancelling by agreement

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition. The other party can accept within the agreement window. A declined or lapsed proposal changes nothing.

secret key only

POST /v1/orders/{id}/propose_cancelrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/propose_cancel \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, actor

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/accept_cancel

Accept a proposal to cancel (committed to cancelled, reason mutual)

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition.

secret key only

POST /v1/orders/{id}/accept_cancelrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/accept_cancel \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, actor

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/decline_cancel

Decline a proposal to cancel. The order stays committed.

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition.

secret key only

POST /v1/orders/{id}/decline_cancelrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/decline_cancel \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa"}'
200 example response, order
{
  "object": "order",
  "id": "ord_034XtPDs7UJ0TXzTsdaHZa",
  "listing": "string",
  "buyer": "string",
  "seller": "string",
  "quantity": 0,
  "price": {
    "unit_amount": 0,
    "amount": 0,
    "currency": "USD"
  },
  "fee": {
    "amount": 4900,
    "currency": "USD"
  },
  "payments": false,
  "payment": {
    "id": "pay_034XtPDs7UJ0TXzTsdaHZa",
    "status": "awaiting_payment",
    "checkout_url": null,
    "client_secret": null,
    "amount_refunded": 0,
    "amount_released": 0,
    "release_status": "held"
  },
  "state": "awaiting_payment",
  "state_reason": "payment_expired",
  "claimed_by": "buyer",
  "cancellation_proposal": {
    "proposed_by": "buyer",
    "expires_at": "2026-10-01T12:00:00.000Z"
  },
  "timer_expires_at": null,
  "completed_at": null,
  "review_window_closes_at": null,
  "dispute_window_closes_at": null,
  "metadata": {},
  "created_at": "2026-10-01T12:00:00.000Z",
  "updated_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, actor

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.

returns 200, order

fields
Response fields
fieldtypeabout
objectrequiredone of: order
idrequiredstring
listingrequiredstring
buyerrequiredstring
sellerrequiredstring
quantityrequiredinteger
pricerequiredorder price
price.unit_amountrequiredintegerPer unit, fixed when the order was created. Minor units.
price.amountrequiredintegerunit_amount times quantity. Minor units.
price.currencyrequiredstring
feerequiredmoneyThe customer's platform fee, fixed when the order was created.
fee.amountrequiredintegerInteger minor units.
fee.currencyrequiredstring
paymentsrequiredbooleanWhether payments were on when the order was created.
paymentrequiredorder payment or null
payment.idrequiredstring
payment.statusrequiredone of: awaiting_payment, succeeded, canceled
payment.checkout_urlrequiredstring or nullStripe-hosted checkout, when checkout URLs were given.
payment.client_secretrequiredstring or nullFor Stripe Elements on your own page, with your own Stripe publishable key.
payment.amount_refundedrequiredintegerRefunded so far. Minor units.
payment.amount_releasedrequiredintegerReleased to the seller so far. Minor units.
payment.release_statusrequiredone of: held, releasing, released, failed, nothing_to_release, null or nullNull until the buyer has paid. The seller share is held until the order completes, unless the marketplace releases at commitment.
staterequiredone of: awaiting_payment, committed, claimed, disputed, completed, cancelled, expired
state_reasonrequiredone of: payment_expired, backed_out, mutual, auto_confirmed, dispute, null or null
claimed_byrequiredone of: buyer, seller, null or null
cancellation_proposalrequiredcancellation proposal or null
cancellation_proposal.proposed_byrequiredone of: buyer, seller
cancellation_proposal.expires_atrequiredtimestampThe proposal lapses after this. A lapsed or declined proposal changes nothing.
timer_expires_atrequiredtimestamp or nullWhen the current state's timer passes.
completed_atrequiredtimestamp or null
review_window_closes_atrequiredtimestamp or null
dispute_window_closes_atrequiredtimestamp or null
metadatarequiredobject of strings
created_atrequiredtimestamp
updated_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.

GET /v1/orders/{id}/reviews

An order's reviews

secret key only

GET /v1/orders/{id}/reviewsrequest
curl https://api.marketsdk.com/v1/orders/{id}/reviews \
  -H "Authorization: Bearer $MARKETSDK_KEY"
200 example response, review list
{
  "object": "list",
  "data": [
    {
      "object": "review",
      "id": "rev_034XtPDs7UJ0TXzTsdaHZa",
      "order": "string",
      "author_role": "buyer",
      "author": "string",
      "subject": "string",
      "visible": false,
      "rating": null,
      "body": null,
      "removed": false,
      "created_at": "2026-10-01T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

returns 200, review list

fields
Response fields
fieldtypeabout
objectrequiredone of: list
datarequiredarray of review
data[].objectrequiredone of: review
data[].idrequiredstring
data[].orderrequiredstring
data[].author_rolerequiredone of: buyer, seller
data[].authorrequiredstring
data[].subjectrequiredstring
data[].visiblerequiredbooleanFalse until both parties have reviewed or the review window has closed. Rating and body are withheld until then.
data[].ratingrequiredinteger or nullmin 1, max 5
data[].bodyrequiredstring or null
data[].removedrequiredbooleanRemoved by moderation. A removed review stops counting toward reputation.
data[].created_atrequiredtimestamp
has_morerequiredbooleanWhether another page follows.
next_cursorrequiredstring or nullPass as starting_after (or cursor for search) to get the next page.

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 404No object with that id in this marketplace.
  • 429Rate limited. See Retry-After.

POST /v1/orders/{id}/reviews

Review the other party

Called from your server. actor says which end user is acting; we check they are a party to the order and may make this transition. Only on a completed order, inside the review window, once per party. Hidden until both have reviewed or the window closes.

secret key only

POST /v1/orders/{id}/reviewsrequest
curl -X POST https://api.marketsdk.com/v1/orders/{id}/reviews \
  -H "Authorization: Bearer $MARKETSDK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"actor":"buy_034XtPDs7UJ0TXzTsdaHZa","rating":1}'
201 example response, review
{
  "object": "review",
  "id": "rev_034XtPDs7UJ0TXzTsdaHZa",
  "order": "string",
  "author_role": "buyer",
  "author": "string",
  "subject": "string",
  "visible": false,
  "rating": null,
  "body": null,
  "removed": false,
  "created_at": "2026-10-01T12:00:00.000Z"
}

parameters

Parameters
fieldtypeabout
idrequiredstring, in path

body, create review

Request body
fieldtypeabout
actorrequiredstringThe buyer id or seller id of the end user doing this. We check they are a party to the order and may make this transition.
ratingrequiredintegermin 1, max 5
bodystringup to 5000 characters

returns 201, review

fields
Response fields
fieldtypeabout
objectrequiredone of: review
idrequiredstring
orderrequiredstring
author_rolerequiredone of: buyer, seller
authorrequiredstring
subjectrequiredstring
visiblerequiredbooleanFalse until both parties have reviewed or the review window has closed. Rating and body are withheld until then.
ratingrequiredinteger or nullmin 1, max 5
bodyrequiredstring or null
removedrequiredbooleanRemoved by moderation. A removed review stops counting toward reputation.
created_atrequiredtimestamp

errors

  • 400The request is not valid.
  • 401No API key, or not a valid one.
  • 403Not allowed with this key, or the marketplace is read-only.
  • 404No object with that id in this marketplace.
  • 409The object is not in a state that allows this.
  • 429Rate limited. See Retry-After.