Skip to content
Last updated

Step 1: Send seller details to Trustap

The following parameters are required when creating a transaction.

Parameter Description
seller_emailValid email address of your seller. Ensure this email is correct as Trustap will send all transaction correspondence to this email.
seller_phone_numberPhone number of seller.
seller_country_codeISO 3166-1 alpha-2 country code representing the country of your seller.
currencyISO 4217 three-character currency code representing the currency of the transaction.
descriptionDescription of the product or service. This description is shown in all emails and payment screens.
valueThe price of the product or service. This value must be provided in a currency's smallest unit. For example, £125 is provided as 12500.
ad_idUnique ID for the product or service. Not used by Trustap internally, but returned in webhook events.
image_urlURL of the image displayed on the Trustap payment page to show your buyer the item they are paying for. Supports jpg, png, gif, bmp and svg files. Images displayed as a squares. Non-square images are cropped.
curl -X POST "https://dev.stage.trustap.com/api/v1/p2p/listings/create_with_seller" \
  -u "<API_KEY>:" \
  -H "Content-Type: application/json" \
  -d '{
    "seller_email": "sarah.garcia@gmail.com",
    "seller_phone_number": "34543503034",
    "seller_country_code": "ie",
    "currency": "eur",
    "description": "2022 BMW 3 Series - 201 D 1234",
    "value": 10000,
    "ad_id": "588a98",
    "image_url": "https://www.topgear.com/sites/default/files/news-listicle/image/e28.jpg"
  }'

Step 2: Redirect buyer to payment

To start the payment flow, redirect your buyer to the payment screen using actions_url the response from step 1.

Append a redirect_uri to the actions_url. This redirect_uri is the URL your buyer will be directed to following payment. Your redirect_uri must be URL-encoded if it contains special characters.

Your actions_url will look like the following.

https://actions.stage.trustap.com/f2f/transactions/24707/created_pay_deposit?redirect_uri=https://www.my-marketplace.ie/

Step 3: Listen for a webhook to disable listing

When the buyer's payment has been confirmed, Trustap sends a webhook to the URL you set during setup with the following payload.

{
  "code":"reservation_disabled",
  "reservation_updated_at":"2025-04-31T10:10:00Z",
  "metadata": {
      "ad_id": "588a98"
    }
}

This signals that the item should be marked as unavailable.

Step 4: Buyer and seller transact using Trustap

Your buyer and seller manage the transfer of their goods or services. Trustap provides support and protection for the buyer and seller. Trustap handles all in-transaction communication and dispute resolution.

Optional: Listen for webhook to indicate transaction was cancelled

Trustap manage the transaction until completion. One possible outcome is the transaction is cancelled. This could be used to mark the listing as available again on the marketplace.

If a transaction is cancelled, Trustap send a webhook to the URL you set during setup with the following payload.

{
  "code":"reservation_enabled",
  "reservation_updated_at":"2025-04-31T10:10:00Z",
  "metadata": {
      "ad_id": "588a98"
    }
}