🚀Create an Application

Guide to creating your first application

App Types

  • Private Available to you and your sub accounts (if Agency tariff), moderation-free

  • Public Available to all users of the platform after moderation

To integrate with the Marketplace, you need to implement a separate application service that communicates with both the POS system and the Marketplace.

This service must expose several endpoints that the Marketplace will interact with.

App Endpoints

Check Credentials

post

This method is used to verify the user credentials specified when installing the application.

Body
Responses
200
Successful response
application/json
post
POST /check-credentials HTTP/1.1
Host: app-domain.example
Content-Type: application/json
Accept: */*
Content-Length: 113

[
  {
    "name": "merchantId",
    "value": "8481654933"
  },
  {
    "name": "accessToken",
    "value": "M0MTAsImV4cCI6MTcyNjEzNzAxMCwicm9sZ"
  }
]
200

Successful response

{
  "isValid": true
}

Get Inventory

post

This method is used to retrieve an inventory tree (for example, a restaurant menu). The method is used during application installation and when inventory-based rules are triggered.

Body
Responses
200
Successful response
application/json
post
POST /get-inventory HTTP/1.1
Host: app-domain.example
Content-Type: application/json
Accept: */*
Content-Length: 113

[
  {
    "name": "merchantId",
    "value": "8481654933"
  },
  {
    "name": "accessToken",
    "value": "M0MTAsImV4cCI6MTcyNjEzNzAxMCwicm9sZ"
  }
]
200

Successful response

{
  "inventoryItems": [
    {
      "type": "group",
      "id": "123",
      "title": "Group 1",
      "items": [
        {
          "type": "item",
          "id": "1234",
          "title": "Item 1"
        }
      ]
    }
  ]
}


Example app for marketplace


Marketplace API Documentation

https://docs.dev.boomerangme.cards/#tag/Marketplace-API

Check credentials

post

Retrieve a bundle of app installation credentials using any one of them.

For example, on a service webhook or at the application service level, you may only have the merchant ID and need to obtain the service API token.

Header parameters
X-App-TokenstringRequired

App static authorization token

Body
namesstring[]Required

Optional credential names to return. If not specified, all merchant credentials are returned.

Responses
200
Successful response
application/json
post
POST /api/v2/marketplace/resolve-credentials HTTP/1.1
Host: api.digitalwallet.cards
X-App-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "names": [
    "text"
  ],
  "credentials": [
    {
      "name": "text",
      "value": "text"
    }
  ]
}
{
  "credentials": [
    {
      "name": "text",
      "value": "text"
    }
  ]
}

Accrual action

post

Perform an accrual action on a purchase.

A customer's phone number, email, or card serial number is required to find or register a loyalty card.

Header parameters
X-App-TokenstringRequired

App static authorization token

Body
checkone of | nullableRequired
phonestring | nullableOptional

Customer's phone.

emailstring | nullableOptional

Customer's email.

firstNamestring | nullableOptional

Customer's first name.

lastNamestring | nullableOptional

Customer's last name.

serialNumberstring | nullableOptional

Customer's loyalty card serial number.

transactionIdstring | nullableRequired

Unique transaction id.

Responses
200
Successful response
application/json
post
POST /api/v2/marketplace/accrue HTTP/1.1
Host: api.digitalwallet.cards
X-App-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 304

{
  "check": {
    "amount": 1,
    "currency": "text",
    "selections": [
      {
        "id": "text",
        "groupId": "text",
        "displayName": "text",
        "price": 1,
        "quantity": 1,
        "totalPrice": 1
      }
    ]
  },
  "phone": "text",
  "email": "text",
  "firstName": "text",
  "lastName": "text",
  "serialNumber": "text",
  "transactionId": "text",
  "credentials": [
    {
      "name": "text",
      "value": "text"
    }
  ]
}
{
  "transactionId": "text",
  "results": [
    {
      "installationId": 1,
      "templateId": 1,
      "companyId": 1,
      "isSuccess": true,
      "errorMessage": "text",
      "cardType": 1,
      "serialNumber": "text",
      "checkAmount": 1,
      "accrualAmount": 1,
      "accruedValue": 1,
      "createdAt": "text",
      "reversedAt": "text"
    }
  ]
}

Refund action

post

Revert a previously performed accrual action using the transaction ID.

Header parameters
X-App-TokenstringRequired

App static authorization token

Body
transactionIdstring | nullableRequired

Unique transaction id.

Responses
200
Successful response
application/json
post
POST /api/v2/marketplace/reverse HTTP/1.1
Host: api.digitalwallet.cards
X-App-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "transactionId": "text",
  "credentials": [
    {
      "name": "text",
      "value": "text"
    }
  ]
}
{
  "transactionId": "text",
  "results": [
    {
      "installationId": 1,
      "templateId": 1,
      "companyId": 1,
      "isSuccess": true,
      "errorMessage": "text",
      "cardType": 1,
      "serialNumber": "text",
      "checkAmount": 1,
      "accrualAmount": 1,
      "accruedValue": 1,
      "createdAt": "text",
      "reversedAt": "text"
    }
  ]
}

Last updated

Was this helpful?