PeptidesPayment Docs
Set up your store

Custom store

Connect your own storefront over our API. Embed our card field or hand buyers to our checkout, then receive signed webhooks.

No Shopify or WooCommerce? Connect your storefront directly to the PeptidesPayment API. You send us the cart from your server, we run the international checkout and take the payment, and we notify your server with signed webhooks.

Before you start

Every request you make to us is authenticated with two headers, provided by PeptidesPayment when your account is set up:

HeaderValue
x-api-keyYour API key. Keep it server-side, never in browser code.
x-merchant-idYour Merchant ID.

1. Create the cart

From your server, create a cart with the buyer's items and shipping address. Amounts are in minor units (see below). You get back the cart's id, which you send the buyer to for checkout.

POST https://oms.sellabroad.com/carts/from-api
x-api-key: <your key>
x-merchant-id: <your merchant id>

{
  "external_cart_id": "cart-abc-123",
  "currency": "AED",
  "customer_country_code": "AE",
  "email": "shopper@example.com",
  "items": [
    { "sku": "SKU-001", "title": "Premium Espresso Beans", "quantity": 1, "unit_price": 15000, "requires_shipping": true }
  ],
  "shipping_address": {
    "first_name": "Jane", "last_name": "Doe",
    "address_1": "1 Sheikh Zayed Rd", "city": "Dubai",
    "country_code": "AE", "phone": "+971501234567"
  }
}

2. Amounts and money format

Every amount you send (unit_price, shipping, discounts) is an integer in the currency's smallest unit. The multiplier depends only on the currency. There are two short exception lists below; every other currency uses × 100.

CurrencyMultiply the displayed price byExample
Any currency not in the two rows below× 100 (cents)$47.70 → 4770
KWD, BHD, OMR, JOD, TND× 1000 (fils)10.500 KWD → 10500
BIF, CLP, DJF, GNF, JPY, KMF, KRW, MGA, PYG, RWF, UGX, VND, VUV, XAF, XOF, XPF× 1 (no minor unit)¥1000 → 1000

Check: your price times the multiplier must be a whole number. If it is not, you used the wrong row. We convert to each payment processor's format for you, so you never need to know which one runs the charge.

3. Choose how buyers pay

  • Embed our card field. Mount the PeptidesPayment widget on your own checkout page so buyers pay without leaving your site.
  • Hand off to our checkout. Redirect the buyer to a PeptidesPayment checkout page. For this option you also host a few callback endpoints we call during checkout, to fetch your shipping rates and validate coupons.

4. Receive webhooks

PeptidesPayment notifies your server of post-payment events by POSTing to a single webhook_url you register during onboarding. Every event is signed so you can trust it.

Verify the signature. Each request carries an X-Signature header of the form sha256=<hex>, an HMAC-SHA256 of the raw request body using your shared_secret. Compute the same hash over the raw (unparsed) body, compare in constant time, and reject with 401 if it does not match.

Events you receive:

EventWhen
order.createdPayment succeeded and the order is persisted. Create the order on your side and decrement stock.
order.refundedA refund was processed, full or partial.
order.cancelledThe order was cancelled before fulfillment.
order.chargeback_openedA card dispute was opened.
order.chargeback_resolvedA dispute closed, won or lost (a loss is debited from your next payout).

Every event has the body envelope { event_id, event_name, created_at, merchant_id, data }, plus headers X-Event-Id, X-Event-Name, and X-Timestamp.

Delivery. We allow 5 seconds per attempt and retry up to 8 times with backoff. The event_id is stable across retries, so dedupe on it and return 200 for anything you have already processed.

5. Report fulfillment to unlock payout

An order stays ineligible for payout until you confirm it shipped. Call POST /orders/{orderId}/fulfillment with status: fulfilled when the goods leave your warehouse. Until then the funds are held.

On this page