Terms of Service API

Introduction

Every merchant that is created by an integrator on the Payyo platform need to pass verification and accept the Payyo terms of service at some point. This verification process is known as Know Your Customer (KYC). During KYC it's often necessary for Payyo to request additional information or documents from merchants.

Usually Payyo handles this communication. But due to legal regulations Payyo is not allowed to contact merchants until they have agreed and established a relationship with Payyo. The easiest way to do that is through the acceptance of Payyo's terms of service.

Through the API, integrators can present the Payyo terms of service to their customers either before the merchant in Payyo is created, or for an existing merchant.

Merchant doesn't exist

1. Retrieve Terms of Service

{
  "jsonrpc": "2.0",
  "method": "termsOfService.show",
  "params": {
    "country_code": "CH",
    "language": "en"
  },
  "id": 1
}
{
  "jsonrpc": "2.0",
  "result": {
    "terms_of_service_id": "general_12345678",
    "type": "general",
    "version": "12345678",
    "language": "en",
    "text": "Lorem ipsum dolor sit amet...",
    "are_accepted": false,
    "deadline": null,
    "accepted_at": null,
    "acceptor": null
  },
  "id": 1
}

2. Create a new merchant and provide all required data to accept Terms of Service

{
  "jsonrpc": "2.0",
  "method": "merchant.create",
  "params": {
    "name": "City Tours",
    "integrator_reference": "12345",
    "integrator_id": "acme_company",
    ...
    "terms_of_service": {
      "terms_of_service_id": "general_12345678",
      "language": "en",
      "acceptor": {
        "name": "John Doe",
        "ip_address": "123.123.123.123"
      }
    }
  },
  "id": 1
}

Merchant exists

1. Get Terms of Service for the merchant

{
  "jsonrpc": "2.0",
  "method": "termsOfService.show",
  "params": {
    "country_code": "CH",
    "language": "en"
  },
  "id": 1
}
{
  "jsonrpc": "2.0",
  "result": {
    "terms_of_service_id": "general_12345678",
    "type": "general",
    "version": "12345678",
    "language": "en",
    "text": "Lorem ipsum dolor sit amet...",
    "are_accepted": false,
    "deadline": null,
    "accepted_at": null,
    "acceptor": null
  },
  "id": 1
}

2. Accept Terms of Service

{
  "jsonrpc": "2.0",
  "result": {
    "terms_of_service_id": "general_12345678",
    "merchant_id": 123,
    "language": "de",
    "acceptor": {
      "name": "John Doe",
      "ip_address": "123.123.123.123"
    }
  },
  "id": 1
}
{
  "jsonrpc": "2.0",
  "result": {
    "terms_of_service_id": "general_12345678",
    "type": "general",
    "version": "12345678",
    "language": "en",
    "text": "Lorem ipsum dolor sit amet...",
    "are_accepted": true,
    "deadline": null,
    "accepted_at": "2019-03-26T13:29:12+01:00",
    "acceptor": {
      "name": "John Doe"
    }
  },
  "id": 1
}