Skip to content

Latest commit

 

History

History
5175 lines (3651 loc) · 52.1 KB

reference.md

File metadata and controls

5175 lines (3651 loc) · 52.1 KB

Reference

Marketplace

$client->marketplace->getMarketplace() -> ?MarketplaceObject

📝 Description

Settings are changed in the dashboard, separately for test and live.

🔌 Usage

$client->marketplace->getMarketplace();

Sellers

$client->sellers->listSellers($request) -> ?SellerList

🔌 Usage

$client->sellers->listSellers(
    new ListSellersRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$externalId: ?string — Find the seller with this external id.

$status: ?string

$client->sellers->createSeller($request) -> ?SellerObject

🔌 Usage

$client->sellers->createSeller(
    new CreatePartyDto([
        'externalId' => 'external_id',
    ]),
);

⚙️ Parameters

$request: CreatePartyDto

$client->sellers->getSeller($id) -> ?SellerObject

🔌 Usage

$client->sellers->getSeller(
    'id',
);

⚙️ Parameters

$id: string

$client->sellers->eraseSeller($id) -> ?SellerObject

📝 Description

Removes the name, external id, metadata, storefront, and review text, and takes the listings down. Orders and reputation stay, without personal data.

🔌 Usage

$client->sellers->eraseSeller(
    'id',
);

⚙️ Parameters

$id: string

$client->sellers->updateSeller($id, $request) -> ?SellerObject

🔌 Usage

$client->sellers->updateSeller(
    'id',
    new UpdateSellerRequest([
        'body' => new UpdatePartyDto([]),
    ]),
);

⚙️ Parameters

$id: string

$request: UpdatePartyDto

$client->sellers->putStorefront($id, $request) -> ?StorefrontObject

🔌 Usage

$client->sellers->putStorefront(
    'id',
    new StorefrontDto([
        'name' => 'name',
        'slug' => 'jane-templates',
    ]),
);

⚙️ Parameters

$id: string

$name: string

$slug: string — Lowercase letters, digits, and hyphens. Unique per marketplace.

$description: ?string

$metadata: ?array

$client->sellers->createOnboardingLink($id, $request) -> ?OnboardingLinkObject

📝 Description

The first link creates the seller's connected account on your Stripe account: Express, with Stripe collecting what the law requires, your platform paying Stripe's fees and bearing losses, and only transfers requested. Send the seller to the link; their payouts status follows as Stripe reports it.

🔌 Usage

$client->sellers->createOnboardingLink(
    'id',
    new OnboardingLinkDto([
        'returnUrl' => 'return_url',
        'refreshUrl' => 'refresh_url',
    ]),
);

⚙️ Parameters

$id: string

$returnUrl: string — Where Stripe sends the seller when they finish or leave onboarding.

$refreshUrl: string — Where Stripe sends the seller if the link expired. Create a new link there.

$country: ?string — The seller's country, two letters. Used only when the seller's Stripe account is created, on the first link. Defaults to your Stripe account's country.

$client->sellers->getSellerProfile($id) -> ?SellerProfileObject

📝 Description

Callable with a publishable key. Shows only what a buyer may see.

🔌 Usage

$client->sellers->getSellerProfile(
    'id',
);

⚙️ Parameters

$id: string

Buyers

$client->buyers->listBuyers($request) -> ?BuyerList

🔌 Usage

$client->buyers->listBuyers(
    new ListBuyersRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$externalId: ?string — Find the buyer with this external id.

$client->buyers->createBuyer($request) -> ?BuyerObject

🔌 Usage

$client->buyers->createBuyer(
    new CreatePartyDto([
        'externalId' => 'external_id',
    ]),
);

⚙️ Parameters

$request: CreatePartyDto

$client->buyers->getBuyer($id) -> ?BuyerObject

🔌 Usage

$client->buyers->getBuyer(
    'id',
);

⚙️ Parameters

$id: string

$client->buyers->eraseBuyer($id) -> ?BuyerObject

🔌 Usage

$client->buyers->eraseBuyer(
    'id',
);

⚙️ Parameters

$id: string

$client->buyers->updateBuyer($id, $request) -> ?BuyerObject

🔌 Usage

$client->buyers->updateBuyer(
    'id',
    new UpdateBuyerRequest([
        'body' => new UpdatePartyDto([]),
    ]),
);

⚙️ Parameters

$id: string

$request: UpdatePartyDto

Categories

$client->categories->listCategories($request) -> ?CategoryList

🔌 Usage

$client->categories->listCategories(
    new ListCategoriesRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$client->categories->createCategory($request) -> ?CategoryObject

🔌 Usage

$client->categories->createCategory(
    new CreateCategoryDto([
        'key' => 'ui-kits',
        'name' => 'name',
    ]),
);

⚙️ Parameters

$key: string — Your key for the category. Unique per marketplace.

$name: string

$description: ?string

$parent_: ?string — Another category of this marketplace.

$attributeSchema: ?AttributeSchemaObject

$fee: ?CategoryFeeDto — Overrides the marketplace's platform fee for listings in this category. Null uses the marketplace fee.

$prohibited: ?bool — Listings in a prohibited category cannot be published (section 9.4).

$client->categories->getCategory($id) -> ?CategoryObject

🔌 Usage

$client->categories->getCategory(
    'id',
);

⚙️ Parameters

$id: string

$client->categories->updateCategory($id, $request) -> ?CategoryObject

🔌 Usage

$client->categories->updateCategory(
    'id',
    new UpdateCategoryDto([]),
);

⚙️ Parameters

$id: string

$name: ?string

$description: ?string

$parent_: ?string

$fee: ?CategoryFeeDto

$prohibited: ?bool — Listings in a prohibited category cannot be published. Listings already published stay until moderated.

$client->categories->getAttributeSchema($id) -> ?AttributeSchemaObject

🔌 Usage

$client->categories->getAttributeSchema(
    'id',
);

⚙️ Parameters

$id: string

$client->categories->putAttributeSchema($id, $request) -> ?AttributeSchemaObject

📝 Description

Refused if a listing already in the category would no longer fit.

🔌 Usage

$client->categories->putAttributeSchema(
    'id',
    new PutAttributeSchemaRequest([
        'body' => new AttributeSchemaObject([
            'attributes' => [
                new AttributeDefinitionObject([
                    'key' => 'format',
                    'type' => AttributeDefinitionObjectType::String->value,
                ]),
            ],
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: AttributeSchemaObject

Listings

$client->listings->listListings($request) -> ?ListingList

📝 Description

With a publishable key, only published listings are listed.

🔌 Usage

$client->listings->listListings(
    new ListListingsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$seller: ?string

$category: ?string

$status: ?string

$client->listings->createListing($request) -> ?ListingObject

🔌 Usage

$client->listings->createListing(
    new CreateListingDto([
        'seller' => 'sel_034XtPDs7UJ0TXzTsdaHZa',
        'title' => 'title',
        'price' => new MoneyDto([
            'amount' => 4900,
            'currency' => 'USD',
        ]),
    ]),
);

⚙️ Parameters

$request: CreateListingDto

$client->listings->createListings($request) -> ?BulkListingsObject

🔌 Usage

$client->listings->createListings(
    new BulkCreateListingsDto([
        'listings' => [
            new CreateListingDto([
                'seller' => 'sel_034XtPDs7UJ0TXzTsdaHZa',
                'title' => 'title',
                'price' => new MoneyDto([
                    'amount' => 4900,
                    'currency' => 'USD',
                ]),
            ]),
        ],
    ]),
);

⚙️ Parameters

$listings: array — All are created, or none.

$client->listings->getListing($id) -> ?ListingObject

📝 Description

With a publishable key, only a published listing can be retrieved.

🔌 Usage

$client->listings->getListing(
    'id',
);

⚙️ Parameters

$id: string

$client->listings->updateListing($id, $request) -> ?ListingObject

🔌 Usage

$client->listings->updateListing(
    'id',
    new UpdateListingDto([]),
);

⚙️ Parameters

$id: string

$category: ?string

$title: ?string

$description: ?string

$price: ?MoneyDto

$quantity: ?float — The total. Cannot go below what open orders have reserved.

$attributes: ?array

$metadata: ?array

$expiresAt: ?DateTime

$client->listings->publishListing($id) -> ?ListingObject

📝 Description

Needs an active seller, verified when seller verification is on, and a category that is not prohibited.

🔌 Usage

$client->listings->publishListing(
    'id',
);

⚙️ Parameters

$id: string

$client->listings->unpublishListing($id) -> ?ListingObject

🔌 Usage

$client->listings->unpublishListing(
    'id',
);

⚙️ Parameters

$id: string

$client->listings->removeListing($id, $request) -> ?ListingObject

🔌 Usage

$client->listings->removeListing(
    'id',
    new RemoveListingDto([
        'reason' => 'reason',
    ]),
);

⚙️ Parameters

$id: string

$reason: string — Recorded with the removal.

$client->listings->listMedia($id) -> ?MediaList

🔌 Usage

$client->listings->listMedia(
    'id',
);

⚙️ Parameters

$id: string

$client->listings->createMedia($id, $request) -> ?MediaUploadObject

📝 Description

Returns a signed URL, valid for 10 minutes. PUT the file there, then complete the upload. The file is stored under a path that begins with the marketplace id.

🔌 Usage

$client->listings->createMedia(
    'id',
    new CreateMediaDto([
        'contentType' => CreateMediaDtoContentType::ImageJpeg->value,
        'sizeBytes' => 1.1,
    ]),
);

⚙️ Parameters

$id: string

$contentType: string

$sizeBytes: float — The exact size of the file, in bytes. At most 10 MB.

$position: ?float

$client->listings->completeMedia($id) -> ?MediaObject

📝 Description

Checks the stored file against the declared type and size.

🔌 Usage

$client->listings->completeMedia(
    'id',
);

⚙️ Parameters

$id: string

$client->listings->deleteMedia($id) -> ?MediaObject

🔌 Usage

$client->listings->deleteMedia(
    'id',
);

⚙️ Parameters

$id: string

Search

$client->search->searchListings($request) -> ?ListingList

📝 Description

Full text over title and description, with filters and sorting. Only published listings with something available are returned. Callable with a publishable key.

🔌 Usage

$client->search->searchListings(
    new SearchListingsRequest([]),
);

⚙️ Parameters

$q: ?string — Full text over title and description.

$category: ?string

$seller: ?string

$minPrice: ?float — Minor units.

$maxPrice: ?float — Minor units.

$attributes: ?array — Attribute filters, as attributes[key]=value for equality, or attributes[key][gte]=n and attributes[key][lte]=n for numbers. Numeric filters need a category.

$sort: ?string — Relevance needs q. Default newest.

$limit: ?float

$cursor: ?string — The next_cursor of the previous page.

Orders

$client->orders->listOrders($request) -> ?OrderList

🔌 Usage

$client->orders->listOrders(
    new ListOrdersRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$buyer: ?string

$seller: ?string

$listing: ?string

$state: ?string

$client->orders->createOrder($request) -> ?OrderObject

📝 Description

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

🔌 Usage

$client->orders->createOrder(
    new CreateOrderDto([
        'listing' => 'lst_034XtPDs7UJ0TXzTsdaHZa',
        'buyer' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
    ]),
);

⚙️ Parameters

$listing: string

$buyer: string — The buyer placing the order. The actor for this transition.

$quantity: ?float

$checkout: ?CheckoutUrlsDto — Payments 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.

$metadata: ?array

$client->orders->getOrder($id) -> ?OrderObject

🔌 Usage

$client->orders->getOrder(
    'id',
);

⚙️ Parameters

$id: string

$client->orders->listOrderEvents($id) -> ?OrderEventList

🔌 Usage

$client->orders->listOrderEvents(
    'id',
);

⚙️ Parameters

$id: string

$client->orders->claimOrder($id, $request) -> ?OrderObject

📝 Description

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.

🔌 Usage

$client->orders->claimOrder(
    'id',
    new ClaimOrderRequest([
        'body' => new ActorDto([
            'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: ActorDto

$client->orders->confirmOrder($id, $request) -> ?OrderObject

📝 Description

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.

🔌 Usage

$client->orders->confirmOrder(
    'id',
    new ConfirmOrderRequest([
        'body' => new ActorDto([
            'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: ActorDto

$client->orders->backOutOfOrder($id, $request) -> ?OrderObject

📝 Description

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.

🔌 Usage

$client->orders->backOutOfOrder(
    'id',
    new BackOutOfOrderRequest([
        'body' => new ActorDto([
            'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: ActorDto

$client->orders->proposeCancel($id, $request) -> ?OrderObject

📝 Description

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.

🔌 Usage

$client->orders->proposeCancel(
    'id',
    new ProposeCancelRequest([
        'body' => new ActorDto([
            'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: ActorDto

$client->orders->acceptCancel($id, $request) -> ?OrderObject

📝 Description

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.

🔌 Usage

$client->orders->acceptCancel(
    'id',
    new AcceptCancelRequest([
        'body' => new ActorDto([
            'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: ActorDto

$client->orders->declineCancel($id, $request) -> ?OrderObject

📝 Description

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.

🔌 Usage

$client->orders->declineCancel(
    'id',
    new DeclineCancelRequest([
        'body' => new ActorDto([
            'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: ActorDto

$client->orders->listOrderReviews($id) -> ?ReviewList

🔌 Usage

$client->orders->listOrderReviews(
    'id',
);

⚙️ Parameters

$id: string

$client->orders->createReview($id, $request) -> ?ReviewObject

📝 Description

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.

🔌 Usage

$client->orders->createReview(
    'id',
    new CreateReviewDto([
        'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        'rating' => 1.1,
    ]),
);

⚙️ Parameters

$id: string

$actor: string — The 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.

$rating: float

$body: ?string

Reviews

$client->reviews->listReviews($request) -> ?ReviewList

🔌 Usage

$client->reviews->listReviews(
    new ListReviewsRequest([
        'subject' => 'subject',
    ]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$subject: string — The buyer or seller the reviews are about.

$client->reviews->getReview($id) -> ?ReviewObject

🔌 Usage

$client->reviews->getReview(
    'id',
);

⚙️ Parameters

$id: string

Reputation

$client->reputation->listReputationEvents($request) -> ?ReputationEventList

🔌 Usage

$client->reputation->listReputationEvents(
    new ListReputationEventsRequest([
        'party' => 'party',
    ]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$party: string — The buyer or seller whose events to list.

$client->reputation->voidReputationEvent($id, $request) -> ?ReputationEventObject

📝 Description

For the customer's team. Writes a second event pointing at the first. The voided event stops counting. Nothing is deleted.

🔌 Usage

$client->reputation->voidReputationEvent(
    'id',
    new VoidDto([
        'reason' => 'reason',
    ]),
);

⚙️ Parameters

$id: string

$reason: string — Why the event is voided. Recorded on the voiding event.

Payments

$client->payments->listPayments($request) -> ?PaymentList

🔌 Usage

$client->payments->listPayments(
    new ListPaymentsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$order: ?string — Only the payment for this order.

$status: ?string

$client->payments->getPayment($id) -> ?PaymentObject

🔌 Usage

$client->payments->getPayment(
    'id',
);

⚙️ Parameters

$id: string

$client->payments->updatePayment($id, $request) -> ?PaymentObject

🔌 Usage

$client->payments->updatePayment(
    'id',
    new UpdatePaymentRequest([
        'body' => new UpdateMetadataDto([
            'metadata' => [
                'key' => 'value',
            ],
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: UpdateMetadataDto

$client->payments->retryPaymentRelease($id) -> ?PaymentObject

📝 Description

For a release that failed, for example because the seller could not yet receive transfers. A release is also tried again by itself when the seller becomes able to receive payouts.

🔌 Usage

$client->payments->retryPaymentRelease(
    'id',
);

⚙️ Parameters

$id: string

$client->payments->listRefunds($request) -> ?RefundList

🔌 Usage

$client->payments->listRefunds(
    new ListRefundsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$payment: ?string

$order: ?string

$client->payments->createRefund($request) -> ?RefundObject

📝 Description

Recorded at once with status pending, then made at Stripe. If the seller's share was already released, the transfer is reversed in the same proportion, so your fee is given back in proportion too.

🔌 Usage

$client->payments->createRefund(
    new CreateRefundDto([]),
);

⚙️ Parameters

$payment: ?string — The payment to refund. Give this or order.

$order: ?string — The order whose payment to refund. Give this or payment.

$amount: ?float — Minor units. Defaults to everything not yet refunded.

$reason: ?string

$metadata: ?array

$client->payments->getRefund($id) -> ?RefundObject

🔌 Usage

$client->payments->getRefund(
    'id',
);

⚙️ Parameters

$id: string

$client->payments->updateRefund($id, $request) -> ?RefundObject

🔌 Usage

$client->payments->updateRefund(
    'id',
    new UpdateRefundRequest([
        'body' => new UpdateMetadataDto([
            'metadata' => [
                'key' => 'value',
            ],
        ]),
    ]),
);

⚙️ Parameters

$id: string

$request: UpdateMetadataDto

Trust

$client->trust->createVerification($id, $request) -> ?VerificationObject

📝 Description

Creates a Stripe Identity session on your Stripe account and returns its page, once. Only the outcome and the session id are kept; no document image or document data. When seller verification is on, a seller can publish only once verified.

🔌 Usage

$client->trust->createVerification(
    'id',
    new CreateVerificationDto([]),
);

⚙️ Parameters

$id: string

$returnUrl: ?string — Where Stripe sends the seller after the verification page.

$client->trust->listVerifications($request) -> ?VerificationList

🔌 Usage

$client->trust->listVerifications(
    new ListVerificationsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$seller: ?string

$client->trust->getVerification($id) -> ?VerificationObject

🔌 Usage

$client->trust->getVerification(
    'id',
);

⚙️ Parameters

$id: string

$client->trust->cancelVerification($id) -> ?VerificationObject

🔌 Usage

$client->trust->cancelVerification(
    'id',
);

⚙️ Parameters

$id: string

$client->trust->listDisputes($request) -> ?DisputeList

📝 Description

Filter by stage for a queue.

🔌 Usage

$client->trust->listDisputes(
    new ListDisputesRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$stage: ?string

$order: ?string

$client->trust->getDispute($id) -> ?DisputeObject

🔌 Usage

$client->trust->getDispute(
    'id',
);

⚙️ Parameters

$id: string

$client->trust->listDisputeEvidence($id) -> ?DisputeEvidenceList

🔌 Usage

$client->trust->listDisputeEvidence(
    'id',
);

⚙️ Parameters

$id: string

$client->trust->addDisputeEvidence($id, $request) -> ?DisputeEvidenceObject

📝 Description

Only while the dispute is in its evidence stage.

🔌 Usage

$client->trust->addDisputeEvidence(
    'id',
    new AddEvidenceDto([
        'actor' => 'actor',
        'body' => 'body',
    ]),
);

⚙️ Parameters

$id: string

$actor: string — The buyer or seller giving evidence.

$body: string

$links: ?array — Links to files the party provided, such as photos you store. HTTPS only.

$client->trust->closeDisputeEvidence($id) -> ?DisputeObject

🔌 Usage

$client->trust->closeDisputeEvidence(
    'id',
);

⚙️ Parameters

$id: string

$client->trust->decideDispute($id, $request) -> ?DisputeObject

📝 Description

Your team's decision: who it went against, in writing, and with payments on, how much goes back to the buyer. On a claimed order, deciding against the party who disputed upholds the claim and completes the order; deciding against the claimant cancels it.

🔌 Usage

$client->trust->decideDispute(
    'id',
    new DecideDisputeDto([
        'against' => DecideDisputeDtoAgainst::Buyer->value,
        'note' => 'note',
    ]),
);

⚙️ Parameters

$id: string

$against: string — Who the decision went against. They get a dispute_lost reputation event; the other party gets dispute_won.

$note: string — The written decision, kept with the dispute.

$refundAmount: ?float — Payments on only. Minor units to refund to the buyer; the rest goes to the seller. Defaults: a claimed order whose claim is upheld refunds nothing; one whose claim is rejected refunds everything; a dispute on a completed order refunds nothing.

$decidedBy: ?string — Who on your team decided, for the record. Up to 200 characters.

$client->trust->openDispute($id, $request) -> ?DisputeObject

📝 Description

On a claimed order, by the party who did not claim: the order becomes disputed. On a completed order, by either party inside the dispute window: the order stays completed.

🔌 Usage

$client->trust->openDispute(
    'id',
    new OpenDisputeDto([
        'actor' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        'reason' => 'reason',
    ]),
);

⚙️ Parameters

$id: string

$actor: string — The buyer or seller opening the dispute.

$reason: string — What went wrong, in their words.

$metadata: ?array

Moderation

$client->moderation->listFlags($request) -> ?FlagList

🔌 Usage

$client->moderation->listFlags(
    new ListFlagsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$status: ?string

$target: ?string — Only flags on this listing, seller, or review.

$client->moderation->createFlag($request) -> ?FlagObject

📝 Description

On behalf of the end user who reported it.

🔌 Usage

$client->moderation->createFlag(
    new CreateFlagDto([
        'target' => 'lst_034XtPDs7UJ0TXzTsdaHZa',
        'reporter' => 'buy_034XtPDs7UJ0TXzTsdaHZa',
        'reason' => CreateFlagDtoReason::ProhibitedItem->value,
    ]),
);

⚙️ Parameters

$target: string — A listing, seller, or review id.

$reporter: string — The end user reporting it: a buyer id or a seller id.

$reason: string

$note: ?string — The reporter's own words.

$client->moderation->getFlag($id) -> ?FlagObject

🔌 Usage

$client->moderation->getFlag(
    'id',
);

⚙️ Parameters

$id: string

$client->moderation->getModerationQueue($request) -> ?ModerationQueueObject

🔌 Usage

$client->moderation->getModerationQueue(
    new GetModerationQueueRequest([]),
);

⚙️ Parameters

$targetType: ?string

$client->moderation->listModerationActions($request) -> ?ModerationActionList

🔌 Usage

$client->moderation->listModerationActions(
    new ListModerationActionsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$target: ?string

$client->moderation->createModerationAction($request) -> ?ModerationActionObject

📝 Description

Resolves the target's open flags and logs who acted and why.

🔌 Usage

$client->moderation->createModerationAction(
    new CreateModerationActionDto([
        'target' => 'target',
        'action' => CreateModerationActionDtoAction::Dismiss->value,
        'reason' => 'reason',
        'actor' => 'actor',
    ]),
);

⚙️ Parameters

$target: string — The listing, seller, or review acted on.

$action: string — dismiss closes the open flags and changes nothing else. remove_content removes a listing or a review; a removed review stops counting toward reputation. suspend_seller suspends the seller, or the seller of a listing, or a seller who wrote a review: they cannot publish or take orders, and their listings leave search. reinstate_seller lifts a suspension.

$reason: string — Why. Kept with the action.

$actor: string — Who on your team took the action, for the log.

Webhooks

$client->webhooks->listWebhookEndpoints($request) -> ?WebhookEndpointList

🔌 Usage

$client->webhooks->listWebhookEndpoints(
    new ListWebhookEndpointsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$client->webhooks->createWebhookEndpoint($request) -> ?WebhookEndpointObject

📝 Description

Returns the signing secret, once. Every delivery carries MarketSDK-Signature: t=<time>,v1=<HMAC-SHA256 of "<time>.<body>">.

🔌 Usage

$client->webhooks->createWebhookEndpoint(
    new CreateWebhookEndpointDto([
        'url' => 'https://shop.example/marketsdk/webhooks',
        'enabledEvents' => [
            CreateWebhookEndpointDtoEnabledEventsItem::All->value,
        ],
    ]),
);

⚙️ Parameters

$url: string — An HTTPS URL on the public internet.

$enabledEvents: array — Event types to send, or * for all.

$description: ?string

$metadata: ?array

$client->webhooks->getWebhookEndpoint($id) -> ?WebhookEndpointObject

🔌 Usage

$client->webhooks->getWebhookEndpoint(
    'id',
);

⚙️ Parameters

$id: string

$client->webhooks->deleteWebhookEndpoint($id) -> ?DeletedWebhookEndpointObject

🔌 Usage

$client->webhooks->deleteWebhookEndpoint(
    'id',
);

⚙️ Parameters

$id: string

$client->webhooks->updateWebhookEndpoint($id, $request) -> ?WebhookEndpointObject

🔌 Usage

$client->webhooks->updateWebhookEndpoint(
    'id',
    new UpdateWebhookEndpointDto([]),
);

⚙️ Parameters

$id: string

$url: ?string

$enabledEvents: ?array

$description: ?string

$status: ?string — Turn the endpoint off, or back on after it was turned off.

$metadata: ?array

$client->webhooks->rotateWebhookSecret($id) -> ?WebhookEndpointObject

📝 Description

Returns the new secret, once. The old one stops at once.

🔌 Usage

$client->webhooks->rotateWebhookSecret(
    'id',
);

⚙️ Parameters

$id: string

$client->webhooks->listWebhookDeliveries($request) -> ?WebhookDeliveryList

🔌 Usage

$client->webhooks->listWebhookDeliveries(
    new ListWebhookDeliveriesRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$endpoint: ?string

$status: ?string

$client->webhooks->getWebhookDelivery($id) -> ?WebhookDeliveryObject

🔌 Usage

$client->webhooks->getWebhookDelivery(
    'id',
);

⚙️ Parameters

$id: string

$client->webhooks->replayWebhookDelivery($id) -> ?WebhookDeliveryObject

📝 Description

Creates a new delivery of the same event to the same endpoint.

🔌 Usage

$client->webhooks->replayWebhookDelivery(
    'id',
);

⚙️ Parameters

$id: string

$client->webhooks->listEvents($request) -> ?EventList

🔌 Usage

$client->webhooks->listEvents(
    new ListEventsRequest([]),
);

⚙️ Parameters

$limit: ?float

$startingAfter: ?string — The next_cursor of the previous page.

$type: ?string

$client->webhooks->getEvent($id) -> ?EventObject

🔌 Usage

$client->webhooks->getEvent(
    'id',
);

⚙️ Parameters

$id: string