Skip to content

Latest commit

 

History

History
5395 lines (3871 loc) · 56.5 KB

reference.md

File metadata and controls

5395 lines (3871 loc) · 56.5 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() -> SellerList

🔌 Usage

client.sellers().listSellers(
    ListSellersRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

externalId: Optional<String> — Find the seller with this external id.

status: Optional<ListSellersRequestStatus>

client.sellers.createSeller(request) -> SellerObject

🔌 Usage

client.sellers().createSeller(
    CreatePartyDto
        .builder()
        .externalId("external_id")
        .build()
);

⚙️ Parameters

request: CreatePartyDto

client.sellers.getSeller(id) -> SellerObject

🔌 Usage

client.sellers().getSeller(
    "id",
    GetSellerRequest
        .builder()
        .build()
);

⚙️ 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",
    EraseSellerRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.sellers.updateSeller(id, request) -> SellerObject

🔌 Usage

client.sellers().updateSeller(
    "id",
    UpdateSellerRequest
        .builder()
        .body(
            UpdatePartyDto
                .builder()
                .build()
        )
        .build()
);

⚙️ Parameters

id: String

request: UpdatePartyDto

client.sellers.putStorefront(id, request) -> StorefrontObject

🔌 Usage

client.sellers().putStorefront(
    "id",
    StorefrontDto
        .builder()
        .name("name")
        .slug("jane-templates")
        .build()
);

⚙️ Parameters

id: String

name: String

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

description: Optional<String>

metadata: Optional<Map<String, String>>

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",
    OnboardingLinkDto
        .builder()
        .returnUrl("return_url")
        .refreshUrl("refresh_url")
        .build()
);

⚙️ 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: Optional<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",
    GetSellerProfileRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

Buyers

client.buyers.listBuyers() -> BuyerList

🔌 Usage

client.buyers().listBuyers(
    ListBuyersRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

externalId: Optional<String> — Find the buyer with this external id.

client.buyers.createBuyer(request) -> BuyerObject

🔌 Usage

client.buyers().createBuyer(
    CreatePartyDto
        .builder()
        .externalId("external_id")
        .build()
);

⚙️ Parameters

request: CreatePartyDto

client.buyers.getBuyer(id) -> BuyerObject

🔌 Usage

client.buyers().getBuyer(
    "id",
    GetBuyerRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.buyers.eraseBuyer(id) -> BuyerObject

🔌 Usage

client.buyers().eraseBuyer(
    "id",
    EraseBuyerRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.buyers.updateBuyer(id, request) -> BuyerObject

🔌 Usage

client.buyers().updateBuyer(
    "id",
    UpdateBuyerRequest
        .builder()
        .body(
            UpdatePartyDto
                .builder()
                .build()
        )
        .build()
);

⚙️ Parameters

id: String

request: UpdatePartyDto

Categories

client.categories.listCategories() -> CategoryList

🔌 Usage

client.categories().listCategories(
    ListCategoriesRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

client.categories.createCategory(request) -> CategoryObject

🔌 Usage

client.categories().createCategory(
    CreateCategoryDto
        .builder()
        .key("ui-kits")
        .name("name")
        .build()
);

⚙️ Parameters

key: String — Your key for the category. Unique per marketplace.

name: String

description: Optional<String>

parent: Optional<String> — Another category of this marketplace.

attributeSchema: Optional<AttributeSchemaObject>

fee: Optional<CategoryFeeDto> — Overrides the marketplace's platform fee for listings in this category. Null uses the marketplace fee.

prohibited: Optional<Boolean> — Listings in a prohibited category cannot be published (section 9.4).

client.categories.getCategory(id) -> CategoryObject

🔌 Usage

client.categories().getCategory(
    "id",
    GetCategoryRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.categories.updateCategory(id, request) -> CategoryObject

🔌 Usage

client.categories().updateCategory(
    "id",
    UpdateCategoryDto
        .builder()
        .build()
);

⚙️ Parameters

id: String

name: Optional<String>

description: Optional<String>

parent: Optional<String>

fee: Optional<CategoryFeeDto>

prohibited: Optional<Boolean> — Listings in a prohibited category cannot be published. Listings already published stay until moderated.

client.categories.getAttributeSchema(id) -> AttributeSchemaObject

🔌 Usage

client.categories().getAttributeSchema(
    "id",
    GetAttributeSchemaRequest
        .builder()
        .build()
);

⚙️ 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",
    PutAttributeSchemaRequest
        .builder()
        .body(
            AttributeSchemaObject
                .builder()
                .attributes(
                    Arrays.asList(
                        AttributeDefinitionObject
                            .builder()
                            .key("format")
                            .type(AttributeDefinitionObjectType.STRING)
                            .build()
                    )
                )
                .build()
        )
        .build()
);

⚙️ Parameters

id: String

request: AttributeSchemaObject

Listings

client.listings.listListings() -> ListingList

📝 Description

With a publishable key, only published listings are listed.

🔌 Usage

client.listings().listListings(
    ListListingsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

seller: Optional<String>

category: Optional<String>

status: Optional<ListListingsRequestStatus>

client.listings.createListing(request) -> ListingObject

🔌 Usage

client.listings().createListing(
    CreateListingDto
        .builder()
        .seller("sel_034XtPDs7UJ0TXzTsdaHZa")
        .title("title")
        .price(
            MoneyDto
                .builder()
                .amount(4900.0)
                .currency("USD")
                .build()
        )
        .build()
);

⚙️ Parameters

request: CreateListingDto

client.listings.createListings(request) -> BulkListingsObject

🔌 Usage

client.listings().createListings(
    BulkCreateListingsDto
        .builder()
        .listings(
            Arrays.asList(
                CreateListingDto
                    .builder()
                    .seller("sel_034XtPDs7UJ0TXzTsdaHZa")
                    .title("title")
                    .price(
                        MoneyDto
                            .builder()
                            .amount(4900.0)
                            .currency("USD")
                            .build()
                    )
                    .build()
            )
        )
        .build()
);

⚙️ Parameters

listings: List<CreateListingDto> — 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",
    GetListingRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.listings.updateListing(id, request) -> ListingObject

🔌 Usage

client.listings().updateListing(
    "id",
    UpdateListingDto
        .builder()
        .build()
);

⚙️ Parameters

id: String

category: Optional<String>

title: Optional<String>

description: Optional<String>

price: Optional<MoneyDto>

quantity: Optional<Double> — The total. Cannot go below what open orders have reserved.

attributes: Optional<Map<String, Object>>

metadata: Optional<Map<String, String>>

expiresAt: Optional<OffsetDateTime>

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",
    PublishListingRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.listings.unpublishListing(id) -> ListingObject

🔌 Usage

client.listings().unpublishListing(
    "id",
    UnpublishListingRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.listings.removeListing(id, request) -> ListingObject

🔌 Usage

client.listings().removeListing(
    "id",
    RemoveListingDto
        .builder()
        .reason("reason")
        .build()
);

⚙️ Parameters

id: String

reason: String — Recorded with the removal.

client.listings.listMedia(id) -> MediaList

🔌 Usage

client.listings().listMedia(
    "id",
    ListMediaRequest
        .builder()
        .build()
);

⚙️ 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",
    CreateMediaDto
        .builder()
        .contentType(CreateMediaDtoContentType.IMAGE_JPEG)
        .sizeBytes(1.1)
        .build()
);

⚙️ Parameters

id: String

contentType: CreateMediaDtoContentType

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

position: Optional<Double>

client.listings.completeMedia(id) -> MediaObject

📝 Description

Checks the stored file against the declared type and size.

🔌 Usage

client.listings().completeMedia(
    "id",
    CompleteMediaRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.listings.deleteMedia(id) -> MediaObject

🔌 Usage

client.listings().deleteMedia(
    "id",
    DeleteMediaRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

Search

client.search.searchListings() -> 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(
    SearchListingsRequest
        .builder()
        .build()
);

⚙️ Parameters

q: Optional<String> — Full text over title and description.

category: Optional<String>

seller: Optional<String>

minPrice: Optional<Double> — Minor units.

maxPrice: Optional<Double> — Minor units.

attributes: Optional<Map<String, Object>> — 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: Optional<SearchListingsSearchRequestSort> — Relevance needs q. Default newest.

limit: Optional<Double>

cursor: Optional<String> — The next_cursor of the previous page.

Orders

client.orders.listOrders() -> OrderList

🔌 Usage

client.orders().listOrders(
    ListOrdersRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

buyer: Optional<String>

seller: Optional<String>

listing: Optional<String>

state: Optional<ListOrdersRequestState>

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(
    CreateOrderDto
        .builder()
        .listing("lst_034XtPDs7UJ0TXzTsdaHZa")
        .buyer("buy_034XtPDs7UJ0TXzTsdaHZa")
        .build()
);

⚙️ Parameters

listing: String

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

quantity: Optional<Double>

checkout: Optional<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: Optional<Map<String, String>>

client.orders.getOrder(id) -> OrderObject

🔌 Usage

client.orders().getOrder(
    "id",
    GetOrderRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.orders.listOrderEvents(id) -> OrderEventList

🔌 Usage

client.orders().listOrderEvents(
    "id",
    ListOrderEventsRequest
        .builder()
        .build()
);

⚙️ 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",
    ClaimOrderRequest
        .builder()
        .body(
            ActorDto
                .builder()
                .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
                .build()
        )
        .build()
);

⚙️ 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",
    ConfirmOrderRequest
        .builder()
        .body(
            ActorDto
                .builder()
                .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
                .build()
        )
        .build()
);

⚙️ 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",
    BackOutOfOrderRequest
        .builder()
        .body(
            ActorDto
                .builder()
                .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
                .build()
        )
        .build()
);

⚙️ 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",
    ProposeCancelRequest
        .builder()
        .body(
            ActorDto
                .builder()
                .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
                .build()
        )
        .build()
);

⚙️ 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",
    AcceptCancelRequest
        .builder()
        .body(
            ActorDto
                .builder()
                .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
                .build()
        )
        .build()
);

⚙️ 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",
    DeclineCancelRequest
        .builder()
        .body(
            ActorDto
                .builder()
                .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
                .build()
        )
        .build()
);

⚙️ Parameters

id: String

request: ActorDto

client.orders.listOrderReviews(id) -> ReviewList

🔌 Usage

client.orders().listOrderReviews(
    "id",
    ListOrderReviewsRequest
        .builder()
        .build()
);

⚙️ 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",
    CreateReviewDto
        .builder()
        .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
        .rating(1.1)
        .build()
);

⚙️ 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: Double

body: Optional<String>

Reviews

client.reviews.listReviews() -> ReviewList

🔌 Usage

client.reviews().listReviews(
    ListReviewsRequest
        .builder()
        .subject("subject")
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<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",
    GetReviewRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

Reputation

client.reputation.listReputationEvents() -> ReputationEventList

🔌 Usage

client.reputation().listReputationEvents(
    ListReputationEventsRequest
        .builder()
        .party("party")
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<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",
    VoidDto
        .builder()
        .reason("reason")
        .build()
);

⚙️ Parameters

id: String

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

Payments

client.payments.listPayments() -> PaymentList

🔌 Usage

client.payments().listPayments(
    ListPaymentsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

order: Optional<String> — Only the payment for this order.

status: Optional<ListPaymentsRequestStatus>

client.payments.getPayment(id) -> PaymentObject

🔌 Usage

client.payments().getPayment(
    "id",
    GetPaymentRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.payments.updatePayment(id, request) -> PaymentObject

🔌 Usage

client.payments().updatePayment(
    "id",
    UpdatePaymentRequest
        .builder()
        .body(
            UpdateMetadataDto
                .builder()
                .metadata(
                    new HashMap<String, String>() {{
                        put("key", "value");
                    }}
                )
                .build()
        )
        .build()
);

⚙️ 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",
    RetryPaymentReleaseRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.payments.listRefunds() -> RefundList

🔌 Usage

client.payments().listRefunds(
    ListRefundsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

payment: Optional<String>

order: Optional<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(
    CreateRefundDto
        .builder()
        .build()
);

⚙️ Parameters

payment: Optional<String> — The payment to refund. Give this or order.

order: Optional<String> — The order whose payment to refund. Give this or payment.

amount: Optional<Double> — Minor units. Defaults to everything not yet refunded.

reason: Optional<CreateRefundDtoReason>

metadata: Optional<Map<String, String>>

client.payments.getRefund(id) -> RefundObject

🔌 Usage

client.payments().getRefund(
    "id",
    GetRefundRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.payments.updateRefund(id, request) -> RefundObject

🔌 Usage

client.payments().updateRefund(
    "id",
    UpdateRefundRequest
        .builder()
        .body(
            UpdateMetadataDto
                .builder()
                .metadata(
                    new HashMap<String, String>() {{
                        put("key", "value");
                    }}
                )
                .build()
        )
        .build()
);

⚙️ 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",
    CreateVerificationDto
        .builder()
        .build()
);

⚙️ Parameters

id: String

returnUrl: Optional<String> — Where Stripe sends the seller after the verification page.

client.trust.listVerifications() -> VerificationList

🔌 Usage

client.trust().listVerifications(
    ListVerificationsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

seller: Optional<String>

client.trust.getVerification(id) -> VerificationObject

🔌 Usage

client.trust().getVerification(
    "id",
    GetVerificationRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.trust.cancelVerification(id) -> VerificationObject

🔌 Usage

client.trust().cancelVerification(
    "id",
    CancelVerificationRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.trust.listDisputes() -> DisputeList

📝 Description

Filter by stage for a queue.

🔌 Usage

client.trust().listDisputes(
    ListDisputesRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

stage: Optional<ListDisputesRequestStage>

order: Optional<String>

client.trust.getDispute(id) -> DisputeObject

🔌 Usage

client.trust().getDispute(
    "id",
    GetDisputeRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.trust.listDisputeEvidence(id) -> DisputeEvidenceList

🔌 Usage

client.trust().listDisputeEvidence(
    "id",
    ListDisputeEvidenceRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.trust.addDisputeEvidence(id, request) -> DisputeEvidenceObject

📝 Description

Only while the dispute is in its evidence stage.

🔌 Usage

client.trust().addDisputeEvidence(
    "id",
    AddEvidenceDto
        .builder()
        .actor("actor")
        .body("body")
        .build()
);

⚙️ Parameters

id: String

actor: String — The buyer or seller giving evidence.

body: String

links: Optional<List<String>> — Links to files the party provided, such as photos you store. HTTPS only.

client.trust.closeDisputeEvidence(id) -> DisputeObject

🔌 Usage

client.trust().closeDisputeEvidence(
    "id",
    CloseDisputeEvidenceRequest
        .builder()
        .build()
);

⚙️ 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",
    DecideDisputeDto
        .builder()
        .against(DecideDisputeDtoAgainst.BUYER)
        .note("note")
        .build()
);

⚙️ Parameters

id: String

against: DecideDisputeDtoAgainst — 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: Optional<Double> — 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: Optional<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",
    OpenDisputeDto
        .builder()
        .actor("buy_034XtPDs7UJ0TXzTsdaHZa")
        .reason("reason")
        .build()
);

⚙️ Parameters

id: String

actor: String — The buyer or seller opening the dispute.

reason: String — What went wrong, in their words.

metadata: Optional<Map<String, String>>

Moderation

client.moderation.listFlags() -> FlagList

🔌 Usage

client.moderation().listFlags(
    ListFlagsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

status: Optional<ListFlagsRequestStatus>

target: Optional<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(
    CreateFlagDto
        .builder()
        .target("lst_034XtPDs7UJ0TXzTsdaHZa")
        .reporter("buy_034XtPDs7UJ0TXzTsdaHZa")
        .reason(CreateFlagDtoReason.PROHIBITED_ITEM)
        .build()
);

⚙️ Parameters

target: String — A listing, seller, or review id.

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

reason: CreateFlagDtoReason

note: Optional<String> — The reporter's own words.

client.moderation.getFlag(id) -> FlagObject

🔌 Usage

client.moderation().getFlag(
    "id",
    GetFlagRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.moderation.getModerationQueue() -> ModerationQueueObject

🔌 Usage

client.moderation().getModerationQueue(
    GetModerationQueueRequest
        .builder()
        .build()
);

⚙️ Parameters

targetType: Optional<GetModerationQueueRequestTargetType>

client.moderation.listModerationActions() -> ModerationActionList

🔌 Usage

client.moderation().listModerationActions(
    ListModerationActionsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

target: Optional<String>

client.moderation.createModerationAction(request) -> ModerationActionObject

📝 Description

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

🔌 Usage

client.moderation().createModerationAction(
    CreateModerationActionDto
        .builder()
        .target("target")
        .action(CreateModerationActionDtoAction.DISMISS)
        .reason("reason")
        .actor("actor")
        .build()
);

⚙️ Parameters

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

action: CreateModerationActionDtoAction — 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() -> WebhookEndpointList

🔌 Usage

client.webhooks().listWebhookEndpoints(
    ListWebhookEndpointsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<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(
    CreateWebhookEndpointDto
        .builder()
        .url("https://shop.example/marketsdk/webhooks")
        .enabledEvents(
            Arrays.asList(CreateWebhookEndpointDtoEnabledEventsItem.ALL)
        )
        .build()
);

⚙️ Parameters

url: String — An HTTPS URL on the public internet.

enabledEvents: List<CreateWebhookEndpointDtoEnabledEventsItem> — Event types to send, or * for all.

description: Optional<String>

metadata: Optional<Map<String, String>>

client.webhooks.getWebhookEndpoint(id) -> WebhookEndpointObject

🔌 Usage

client.webhooks().getWebhookEndpoint(
    "id",
    GetWebhookEndpointRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.webhooks.deleteWebhookEndpoint(id) -> DeletedWebhookEndpointObject

🔌 Usage

client.webhooks().deleteWebhookEndpoint(
    "id",
    DeleteWebhookEndpointRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.webhooks.updateWebhookEndpoint(id, request) -> WebhookEndpointObject

🔌 Usage

client.webhooks().updateWebhookEndpoint(
    "id",
    UpdateWebhookEndpointDto
        .builder()
        .build()
);

⚙️ Parameters

id: String

url: Optional<String>

enabledEvents: Optional<List<UpdateWebhookEndpointDtoEnabledEventsItem>>

description: Optional<String>

status: Optional<UpdateWebhookEndpointDtoStatus> — Turn the endpoint off, or back on after it was turned off.

metadata: Optional<Map<String, String>>

client.webhooks.rotateWebhookSecret(id) -> WebhookEndpointObject

📝 Description

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

🔌 Usage

client.webhooks().rotateWebhookSecret(
    "id",
    RotateWebhookSecretRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.webhooks.listWebhookDeliveries() -> WebhookDeliveryList

🔌 Usage

client.webhooks().listWebhookDeliveries(
    ListWebhookDeliveriesRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

endpoint: Optional<String>

status: Optional<ListWebhookDeliveriesRequestStatus>

client.webhooks.getWebhookDelivery(id) -> WebhookDeliveryObject

🔌 Usage

client.webhooks().getWebhookDelivery(
    "id",
    GetWebhookDeliveryRequest
        .builder()
        .build()
);

⚙️ 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",
    ReplayWebhookDeliveryRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String

client.webhooks.listEvents() -> EventList

🔌 Usage

client.webhooks().listEvents(
    ListEventsRequest
        .builder()
        .build()
);

⚙️ Parameters

limit: Optional<Double>

startingAfter: Optional<String> — The next_cursor of the previous page.

type: Optional<ListEventsRequestType>

client.webhooks.getEvent(id) -> EventObject

🔌 Usage

client.webhooks().getEvent(
    "id",
    GetEventRequest
        .builder()
        .build()
);

⚙️ Parameters

id: String