Skip to main content

Accepting payment

Alice needs somewhere real to send her 200 USDT. Mercatto asks Ishtaran for one.

MercattocreatePaymentIntent(200)real deposit addressPaymentIntentPENDING📥200 USDTAlice
The deposit address is real and unique to this order — Mercatto never has to invent a payment identifier of its own.

Code

examples/marketplace-mercatto/pay-order.ts
const intent = await mercatto.deposits.createPaymentIntent(organizationId, transactionId, assetNetworkId, GROSS_AMOUNT, undefined);
const fullIntent = await mercatto.deposits.getPaymentIntent(intent.paymentIntentId);
const depositAddress = fullIntent.depositAddress!;

Result

{ "paymentIntentId": "…", "depositAddress": "dep-…", "status": "PENDING" }

What happened under the hood

The real depositAddress is only on the follow-up GET (getPaymentIntent), never on the create response — a deliberate two-step shape. expiresAt is caller-controlled (undefined here means "use Mercatto's own default policy") — see Failure scenarios for what happens when a Payment Intent genuinely expires, and for a late deposit that lands after it does.