NAV Navbar
Ruby Java
  • Introduction
  • Authorization
  • API Methods
  • Error codes
  • Testing
  • REVO iFrame description
  • Website presentation
  • Introduction

    API Factoring is based on the HTTPS protocol with JSON queries.

    The documentation consists of 4 main parts:

    Authorization

    Base URL addresses

    BASE_URL = "https://r.revo.ru"
    BASE_URL = "https://demo.revoup.ru"
    
    1. To interact with Revo services, two base addresses are used:
      • https://r.revo.ru - the production address of the service.
      • https://demo.revoup.ru - the demo address of the service.
    2. BASE_URL - variable containing the base address.

    Authorization parameters

    Parameters example

    secret_key = "098f6bcd4621d373cade4e832627b4f6"
    STORE_ID1 = 12
    STORE_ID2 = 13
    
    1. On Revo’s side a unique store identifier and a secret key are generated, which are transferred to the partner:
      • store_id - unique store identifier. In most cases, at least two unique identifiers are generated: STORE_ID1 is used for Registration and Limit methods. STORE_ID2 - for all the other methods.
      • secret_key - a secret key used when generating the digital signature for authentication of query parameters to protect the form from being launched by third parties. Key length is 8 bytes. Encryption algorithm is SHA1.
    2. For authorization, the partner sends POST query, using digital signature and unique store identifier store_id.
    3. Examples of URL queries can be found in API Methods section.

    Digital signature generation

    Algorithm of digital signature generation

    require 'digest/sha1'
    secret_key = '9fff8c602b08b00323567be0001480f6'
    data = "{\"order_id\": \"FACTPRECHR152632\", \"amount\": \"8300.00\"}"
    SIGNATURE = Digest::SHA1.hexdigest(data + secret_key)
    

    The result of the encryption in the above example is "cbfb21630cd585f59c3a50fc3365d8c26b97cd4e".

    import java.io.UnsupportedEncodingException;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.Formatter;
    
    public class Main {
    
        static String secret_key = "098f6bcd4621d373cade4e832627b4f6"; // Это пример
        static String data = "{\"callback_url\":\"https://shop.ru/revo/decision\",\"redirect_url\":\"https://shop.ru/revo/redirect\",\"current_order\":{\"amount\":\"7500.00\",\"order_id\":\"R001233\"},\"primary_phone\":\"9268180621\"}";
    
        public static void main(String[] args) {
    
            String signature = encryptPassword(data + secret_key); // Тут всегда будет 40 символов по SHA1
            System.out.println(signature);
        }
    
        private static String encryptPassword(String password) {
            String sha1 = "";
            try {
                MessageDigest crypt = MessageDigest.getInstance("SHA-1");
                crypt.reset();
                crypt.update(password.getBytes("UTF-8"));
                sha1 = byteToHex(crypt.digest());
            } catch(NoSuchAlgorithmException e) {
                e.printStackTrace();
            } catch(UnsupportedEncodingException e) {
                e.printStackTrace();
            }
            return sha1;
        }
    
        private static String byteToHex(final byte[] hash) {
            Formatter formatter = new Formatter();
            for (byte b : hash) {
                formatter.format("%02x", b);
            }
            String result = formatter.toString();
            formatter.close();
            return result;
        }
    }
    

    A secret key secret_key is added to an escaped (adding \ in front of " and \) json body data string. SHA1 algorithm is then used to the generate a string which forms a digital signature.

    API Methods

    Registration

    POST BASE_URL/factoring/v1/limit/auth?store_id=STORE_ID1&signature=SIGNATURE
    

    The method returns a URL to the iFrame in order to get the client's limit. Upon completion of the form a json response with information about client's limit is sent to the address specified in callback_url.

    Depending on the information about the user in the Revo system the form will have a different number of steps (primary_phone has to be specified) - see more info on REVO iFrame description.

    Parameters

    Json query example

    {
      "callback_url": "https://shop.ru/revo/decision",
      "redirect_url": "https://shop.ru/revo/redirect",
      "primary_phone": "9268180621",
      "primary_email": "ivan@gmail.com",
      "current_order":
      {
        "order_id": "R001233"
      },
      "person":
      {
        "first_name": "Петр",
        "surname": "Чернышев",
        "patronymic": "Александрович",
        "birth_date": "15.01.1975"
      }
    }
    
    callback_url
    string
    URL for Revo response with information about client's limit.
    redirect_url
    string
    URL for redirecting upon clicking the button "Return to online store” in the Revo form.
    current_order
    object
    An object containing information about the order.
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.
    primary_phone
    string, optional
    Client’s phone number consisting of 10 digits (omitting the country code).
    primary_email
    string, optional
    Client’s email.
    person
    object, optional
    The object containing information about the client.
    first_name
    string, optional
    Client’s name.
    surname
    sring, optional
    Client’s surname.
    patronymic
    string, optional
    Client's patronymic.
    birth_date
    object, optional
    Client’s birth date in dd.mm.yyyy format.

    Response Parameters

    Response example in case of successful authentication.

    {
      "status": 0,
      "message": "Payload valid",
      "iframe_url": "https://r.revo.ru/form/v1/af45ef12f4233f"
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.
    iframe_url
    string
    URL to the generated iFrame.

    callback parameters

    Callback example in case of successful authentication.

    {
      "order_id": "32423",
      "decision": "approved",
      "amount": 5000.00,
      "mobile_phone": "89262341793",
      "email": "ivan@gmail.com"
    }
    
    order_id
    string
    Unique order number. Maximum 255 characters.
    decision
    string
    Decision on instalments. In case of positive decision - approved (the order is waiting to be finalized). In case of negative decision - declined.
    amount
    float
    Amount in rubles.
    mobile_phone
    string
    Client’s phone number consisting of 10 digits (omitting the country code).
    email
    string
    Client's email.

    Limit

    POST BASE_URL/api/external/v1/client/limit?store_id=STORE_ID1&signature=SIGNATURE
    

    The method for obtaining the client’s limit amount using his phone number. Not applicable for new customers.

    Parameters

    Json query example

    {
      "client":
      {
        "mobile_phone": "9031234567"
      }
    }
    
    client
    object
    An object containing information about the client.
    mobile_phone
    string
    Client’s phone number consisting of 10 digits (omitting the country code).

    Response Parameters

    Response example in case of a returning customer

    {
      "meta":
      {
        "status": 0,
        "message": "Payload valid"
      },
      "client":
      {
        "mobile_phone": "9031234567",
        "limit_amount": "9500.00",
        "status": "active"
      }
    }
    

    Response example in case of a returning customer with installments products unavailable

    {
      "meta":
      {
        "status": 0,
        "message": "Payload valid"
      },
      "client":
      {
        "mobile_phone": "9031234567",
        "limit_amount": "6700.00",
        "status": "inactive"
      }
    }
    

    Response example in case of a new customer

    {
      "meta":
      {
        "status": 0,
        "message": "Payload valid"
      },
      "client":
      {
        "mobile_phone": "9031234567",
        "limit_amount": "0.00",
        "status": "new"
      }
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.
    client
    object
    An object containing information about the client.
    mobile_phone
    string
    Client’s phone number consisting of 10 digits (omitting the country code).
    limit_amount
    string
    The amount of funds available to the client in rubles.
    status
    string
    User status. Possible values:
    active - the installments product is available to the user;
    inactive - the installments product is unavailable to the user;
    new - a new user with installments product available.

    Checkout

    POST BASE_URL/factoring/v1/precheck/auth?store_id=STORE_ID2&signature=SIGNATURE
    

    The method returns a URL to the iFrame for client's order registration. Upon completion of the form a json response with information about order registration is sent to the address specified in callback_url. In case of successful registration amount is withheld from clinent's funds in the Revo system.

    Depending on the information about the user in the Revo system the form will have a different number of steps (primary_phone has to be specified) - see more info on REVO iFrame description.

    In case where prepayment is needed, there are 2 ways of prepayment implementation: * If prepayment is made prior to opening the iFrame, then the prepayment amount should be sent using prepayment_amount. * If prepayment is to be made after the iFrame is called, the corresponding setting on the Revo side is made. Parameter skip_result_page should be set as true and redirect_url should be set to the prepayment page, to which the client will be redirected upon the completion of registration in Revo iFrame.

    Parameters

    Json query example

    {
      "callback_url": "https://shop.ru/revo/decision",
      "redirect_url": "https://shop.ru/revo/redirect",
      "primary_phone": "9268180621",
      "primary_email": "ivan@gmail.com",
      "current_order":
      {
        "order_id": "R001233",
        "valid_till": "21.07.2018 12:08:01+03:00",
        "term": 3,
        "amount": 59499.00,
        "prepayment_amount": 1000.00
      },
      "person":
      {
        "first_name": "Петр",
        "surname": "Чернышев",
        "patronymic": "Александрович",
        "birth_date": "15.01.1975"
      },
      "cart_items":
      [{
        "sku": "1231",
        "name": "Samsung Note 8",
        "price": 55999,
        "quantity": 1,
        "brand": "Samsung",
        "category": "Mobile phone"
      },
      {
        "sku": "23543",
        "name": "Чехол фирменный",
        "price": 3500,
        "sale_price": 2999,
        "quantity": 1,
        "brand" : "Samsung",
        "category": "Accessories"
      }],
      "skip_result_page": true,
      "delivery_info":
      {
        "first_name": "Петр",
        "surname": "Чернышев",
        "patronymic": "Александрович",
        "type": "Pickpoint",
        "address": "ул. Ленина, д.1",
        "phone": "9268180621",
        "email": "ivan@gmail.com"
      },
      "additional_data":
      [{
        "name": "Color",
        "value": "Black"
      },
      {
        "name": "Size",
        "value": "Large"
      }]
    }
    
    callback_url
    string
    URL for Revo response with information about client's limit.
    redirect_url
    string
    URL for redirecting upon clicking the button "Return to online store” in the Revo form.
    current_order
    object
    An object containing information about the order.
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.
    valid_till
    String, optional
    A period during which the order is considered to be valid (funds are withheld for this period of time). When this period expires, the order is cancelled. Format: dd.mm.yyyy hh:mm:ss+hh:mm, where hh:mm after "+" is the time zone relative to GMT. The default value is 24 hours.
    term
    integer, optional
    Installments period in months.
    amount
    float
    Total order amount in rubles.
    prepayment_amount
    float, optional
    The amount already prepaid by the client in rubles.
    primary_phone
    string, optional
    Client’s phone number consisting of 10 digits (omitting the country code).
    primary_email
    string, optional
    Client’s email.
    person
    object, optional
    An object containing information about the client.
    first_name
    string, optional
    Client’s name.
    surname
    sring, optional
    Client’s surname.
    patronymic
    string, optional
    Client's patronymic.
    birth_date
    string, optional
    Client’s birth date in dd.mm.yyyy format.
    cart_items
    object, optional
    An object containing information about the order.
    sku
    string, optional
    Stock keeping unit.
    name
    string
    Product name.
    price
    float
    Product price.
    sale_price
    float, optional
    Product price with discount (if any).
    quantity
    integer
    Product quantity.
    brand
    string, optional
    Product brand.
    skip_result_page
    bool, optional
    A flag that determines whether the results page of the iFrame will be displayed. The default value is false.
    true - upon successful registration completion the user is immediately redirected to redirect_url.
    false - upon successful registration completion the user is presented with result page.
    additional_data
    object, optional
    An object containing additional order information.
    name
    string, optional
    Parameter name.
    value
    string, optional
    Parameter value.

    Response Parameters

    Response example in case of successful authentication.

    {
      "status": 0,
      "message": "Payload valid",
      "iframe_url": "https://revo.ru/factoring/v1/form/6976174c5b6a1bb089d15b80e0a6afc62d4283fe"
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.
    iframe_url
    string
    URL to the generated iFrame.

    Callback parameters

    Callback example in case of success order registration.

    {
      "order_id": "R107356",
      "decision": "approved",
      "amount": 6700.00,
      "prepayment_amount": 1000.00,
      "total_amount": 7700.00,
      "term": 3,
      "client":
      {
        "primary_phone": "8880010203"
        "email": "ivan@gmail.com",
        "full_name": "Иванов Иван Иванович",
        "first_name": "Иван",
        "surname": "Иванов",
        "patronymic": "Иванович"
      },
      "schedule":
      [{
        "date": "01.01.2018",
        "amount": 2933.33
      },
      {
        "date": "01.02.2018",
        "amount": 2933.33
      },
      {
        "date": "01.03.2018",
        "amount": 2933.33
      }]
    }
    
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.
    decision
    string
    Decision on instalments. In case of positive decision - approved (the order is waiting to be finalized). In case of negative decision - declined.
    amount
    float
    Amount in rubles withheld from client's Revo account.
    prepayment_amount
    float, optional
    The amount already prepaid by the client in rubles.
    total_amount
    float, optional
    Total order amount, including prepayment.
    term
    integer
    Installments period in months.
    client
    object
    An object containing information about the client.
    primary_phone
    string
    Client’s phone number consisting of 10 digits (omitting the country code).
    primary_email
    string, optional
    Client’s email.
    full_name
    string
    Client's full name: last name, first name and patronymic diveded by spaces.
    first_name
    string
    Cleint's first name.
    surname
    sring
    Client's last name.
    patronymic
    string
    Client's patronymic.
    schedule
    object
    Object containing information about the payment schedule.
    date
    string
    Payment date in dd.mm.yyyy format.
    amount
    float
    Payment amount in rubles.
    monthly_overpayment
    float
    Monthly overpayment amount in rubles.

    Schedule

    POST BASE_URL/factoring/v1/schedule?store_id=STORE_ID2&signature=SIGNATURE
    

    The method returns information on the available preliminary payment schedules for the specified purchase price.

    Parameters

    Json query example

    {
      "amount": 5000.00
    }
    
    amount
    float
    Amount in rubles withheld from client's Revo account.

    Response Parameters

    Response example in case when 2 payment schedules are available: 3 and 6 months.

    {
      "status": 0,
      "message": "Payload valid",
      "payment_schedule":
      [{
        "total": 7000.01,
        "monthly_payment": 2334,
        "monthly_overpayment": 666.67,
        "term": 3,
        "payment_dates":
        [{
          "date": "11.06.2018",
          "amount": 2334.00
        },
        {
          "date": "09.07.2018",
          "amount": 2334.00
        },
        {
          "date": "09.08.2018",
          "amount": 2332.01
        }]
      },
      {
        "total": 6500,
        "monthly_payment": 1100,
        "monthly_overpayment": 250,
        "term": 6,
        "payment_dates":
        [{
          "date": "11.06.2018",
          "amount": 1100.00
        },
        {
          "date": "09.07.2018",
          "amount": 1100.00
        },
        {
          "date": "09.08.2018",
          "amount": 1100.00
        },
        {
          "date": "10.09.2018",
          "amount": 1100.00
        },
        {
          "date": "09.10.2018",
          "amount": 1100.00
        },
        {
          "date": "09.11.2018",
          "amount": 1000.00
        }]
      }]
    }
    
    message
    string
    A short text description of the response.
    payment_schedule
    object
    Object containing information about the payment schedule.
    total
    float
    Total order amount, including overpayment.
    monthly_payment
    float
    Monthly payment amount in rubles.
    monthly_overpayment
    float
    Monthly overpayment amount in rubles.
    term
    int
    Installments period in months.
    payment_dates
    object
    Object containing information about the payment schedule.
    date
    string
    Payment date in dd.mm.yyyy format.
    amount
    float
    Payment amount in rubles.

    Status

     POST BASE_URL/factoring/v1/status?store_id=STORE_ID2&signature=SIGNATURE
    

    The method returns information on the order status.

    Parameters

    Json query example

     {
       "order_id": "R107356"
     }
    
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.

    Response Parameters

    Response example in case when the client has completed the registration process (Revo iFrame) and is awaiting the Partner response

    {
      "status": 0,
      "message": "Payload valid",
      "current_order":
      {
        "order_id": "FACTPRECHR00004768",
        "expired": false,
        "status": "hold",
        "decision": "approved",
        "amount": 4999.0,
        "term": 3
      }
    }
    

    Response example in case when the client has completed the registration process (Revo iFrame) and the Parter has cancelled the order.

    {
      "status": 0,
      "message": "Payload valid",
      "current_order":
      {
        "order_id": "FACTPRECHR00004768",
        "expired": true,
        "status": "canceled",
        "decision": "approved",
        "amount": 4999,
        "term": 3
      }
    }
    

    Response example in case when the client has completed the registration process (Revo iFrame) and the Partner has confirmed the order.

    {
      "status": 0,
      "message": "Payload valid",
      "current_order":
      {
        "order_id": "FACTR00004755",
        "expired": false,
        "status": "finished",
        "decision": "approved",
        "amount": 1000,
        "term": 3
      }
    }
    

    Response example in case when the order was declined by Revo

    {
      "status": 0,
      "message": "Payload valid",
      "current_order":
      {
        "order_id": "FACTPRECHR00004721",
        "expired": true,
        "status": "declined",
        "decision": "declined",
        "amount": 6498,
        "term": null
      }
    }
    

    Response example in case when funds withholding period has elapsed. The order is cancelled.

    {
      "status": 0,
      "message": "Payload valid",
      "current_order":
      {
        "order_id": "FACTPRECHR141531",
        "expired": true,
        "status": "expired",
        "decision": "approved",
        "amount": 9000,
        "term": 3
      }
    }
    

    Response example in case when the client has completed the registration process (Revo iFrame) and the Partner has confirmed the order. Then the order has been returned.

    {
      "status": 0,
      "message": "Payload valid",
      "current_order":
      {
        "order_id": "FACTPRECHR00004714",
        "expired": true,
        "status": "refunded",
        "decision": "approved",
        "amount": 734.51,
        "term": 3
      }
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.
    current_order
    object
    An object containing information about the order.
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.
    expired
    bool
    Flag showing the current order status (funds withholding). The value is false for valid orders and true for expired orders (valid_till date and time has come).
    status
    string
    Order status information. Possible values:
    pending, hold, finished, canceled, declined, refunded.
    decision
    string
    Decision on instalments. In case of positive decision - approved (the order is waiting to be finalized). In case of negative decision - declined.
    amount
    float
    Total order amount in rubles.
    term
    integer
    Installments period in months.

    Status and Decision values

    Decision Status Description
    null pending Client hasn't completed the registration form. There is no decision yet.
    approved hold Client's limit is approved, funds are withheld and the order is avaiting finalization.
    approved finished Order is finalized. In case of subsequent expiration or in case of partial return this status doesn't change.
    approved canceled Order is cancelled. In case of subsequent expiration this status doesn't change.
    approved expired Client's limit is approved, order expired.
    approved refunded Order was fully refunded. In case of partial return status is qual to finished.
    approved declined Client's limit is approved, installments product is unavailable to the client (order amount is above client's limit).
    declined declined Client's limit is declined by Revo.

    Change

    POST BASE_URL/factoring/v1/precheck/change?store_id=STORE_ID2&signature=SIGNATURE
    

    Method for changing an order.

    Parameters

    Json query example

    {
      "order_id": "R107356",
      "amount": 59999.00,
      "valid_till": "29.07.2018 12:08:01+03:00"
      "cart_items":
      [{
        "sku": "1231",
        "name": "Samsung Note 8",
        "price": 55999,
        "quantity": 1
      }]
    }
    
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.
    amount
    float
    Total order amount in rubles.
    valid_till
    String, optional
    A period during which the order is considered to be valid (funds are withheld for this period of time). When this period expires, the order is cancelled. Format: dd.mm.yyyy hh:mm:ss+hh:mm, where hh:mm after "+" is the time zone relative to GMT. The default value is 24 hours.
    cart_items
    object
    An object containing information about the order.
    sku
    string, optional
    Stock keeping unit.
    name
    string
    Product name.
    price
    float
    Product price.
    sale_price
    float, optional
    Product price in case of discount (if available).
    quantity
    integer
    Product quantity.
    brand
    string, optional
    Product brand.

    Response parameters

    Response example in case of successful change.

    {
      "status": 0,
      "message": "Payload valid",
      "schedule":
      [{
        "date": "01.01.2018",
        "amount": 2933.33
      },
      {
        "date": "01.02.2018",
        "amount": 2933.33
      },
      {
        "date": "01.03.2018",
        "amount": 2933.33
      }]
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.
    schedule
    object
    Object containing information about the payment schedule.
    date
    string
    Payment date in dd.mm.yyyy format.
    amount
    float
    Payment amount in rubles.

    Cancel

    POST BASE_URL/factoring/v1/precheck/cancel?store_id=STORE_ID2&signature=SIGNATURE
    

    Method for order cancellation. The whitheld amount of client's funds is unblocked upon cancellation.

    Parameters

    Json query example

    {
      "order_id": "R107356"
    }
    
    order_id
    string
    Unique order number. Maximum 255 characters. A unique random string can be used.

    Response Parameters

    Response example in case of successful order cancellation.

    {
      "status": 0,
      "message": "Payload valid"
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.

    Finish

    POST BASE_URL/factoring/v1/precheck/finish?store_id=STORE_ID2&signature=SIGNATURE
    

    Method for finalizing the order by transferring the sales contract to Revo. The query content type is multipart/form-data. Two keys have to be specified in the query: the first one named 'body' that contains the json query and the second one named check where the file (fiscal document, i.e. receipt) is attached. Signature is formed in the usual way - without the second key.

    Parameters

    Json query example

    {
      "order_id": "R107356",
      "amount": 6700.00,
      "check_number": "ZDDS3123F"
    }
    
    order_id
    string
    Unique order number. Maximum 255 characters.
    amount
    float
    Amount in rubles.
    check_number
    string
    Fiscal document number according to Partner's system (i.e. receipt number).

    Response Parameters

    Response example in case of successful document upload.

    {
      "status": 0,
      "message": "Payload valid"
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.

    Return

    POST BASE_URL/factoring/v1/return?store_id=STORE_ID2&signature=SIGNATURE
    

    Method for performing a full or partial return. Only a finalized order can be returned. For unfinalized orders Cancel method has to be used. Partial returns are available starting from the next day after finalization. Client's funds are fully reimbursed including any overpayments at any given point in time until the end of installments payment period.

    Parameters

    Json query example

    {
      "order_id": "R001233",
      "amount": 2010.00
    }
    
    order_id
    string
    Unique order number. Maximum 255 characters.
    amount
    float
    Amount to be returned in rubles. A return can either be full or partial.

    Response Parameters

    Json response example in case of successful return

    {
      "status": 0,
      "message": "Payload valid"
    }
    

    Json response example in case of unsuccessful return

    {
      "status": 10,
      "message": "JSON decode error"
    }
    
    status
    integer
    Response code.
    message
    string
    A short text description of the response.

    Error codes

    Code Message Comments
    0 Payload valid Everything is OK.
    10 JSON decode error Incorrect json query.
    20 Order order_id missing
    21 Wrong order order_id format
    22 Order exists Order with specified order_id already exist and is finalized.
    23 Order expired Order with specified order_id has expired.
    24 Order with specified id not found
    32 Order amount is different from the amount specified before Occurs when trying to finalize an order with incorrect amount.
    33 Order amount is outside of tariff_limits Order amount is outside of tariff limits specified for the partner.
    34 Order term value is wrong Incorrect term value is specified.
    35 Order prepayment amount is wrong prepayment_amount is greater than amount.
    40 Order callback_url missing
    41 Order redirect_url missing
    50 Store id is missing
    51 Store not found Unable to find store with specified store_id.
    60 Signature missing
    61 Signature wrong
    62 Error saving file
    70 Phone number is different
    71 Client has not enough limit Client has insufficient funds for the specified order.
    80 Unable to finish - order is already finished/canceled
    81 Unable to cancel - order is already finished/canceled
    82 Unable to change - order is already finished/canceled
    90 Cart items are missing Unable to change order - no cart_items specified.
    100 At the moment the server cannot process your request Occurs in any other cases.

    Testing

    Integration testing is performed on demo server (https://demo.revoup.ru). As demo server does send SMS messages, it's recommended to use an inexistent 888 phone prefix, so that no SMS messages are sent to real people. It's not allowed to use 888 prefix on production server.

    All confirmation codes and pin codes are 8888.

    REVO iFrame description

    Client registration

    1-2. Form completion.
    3. SMS code entry and phone number verification screen.
    3.1 In case of an error in the mobile phone number the client can change the phone number on the corresponding screen.
    4.1 Upon entering the correct sms code, "The registration was successful" screen is displayed. Client's available limit is displayed on this screen.
    4.2 Alternatively the "Unfortunately, installments product is not available to you” screen is displayed.

    The first Revo iFrame screen has the following personal information data fields:

    Validation:

    Client authorization

    1. Login button click on the first screen.
      2.1 Mobile phone entry and "Send SMS" button click.
      2.2 If no such mobile phone number is found in the database, the "We haven't found you with the specified phone number" screen is presented. Clicking on the "Register in 1 minute" button presents the first screen.
      3.1 If a mobile phone number is found in the database, the SMS code confirmation screen is presented.
      3.2 In case of an error in the mobile phone number the client can change the phone number on the corresponding screen.
      4.1 Upon entering the correct SMS code, "The registration was successful" screen is displayed. Client's available limit is displayed on this screen.
      4.2 Alternatively the "Unfortunately, installments product is not available to you” screen is displayed.

    А list of frequently asked questions is displayed in the upper right corner of the form when clicking on the FAQ button.

    Checkout

    1. Form completion.
      2.1 Mobile phone entry and "Send SMS" button click.
      2.2 In case of an error in the mobile phone number the client can change the phone number on the corresponding screen.
      3.1 In case prepayment is not required a screen with term selection is presented.
      3.2 In case prepayment is required a screen with term selection and prepayment amount slider is presented.
      4.1 In case of successful checkout without prepayment a "Checkout successful" screen is presented with a button to return to the Parter web site.
      4.2 Alternatively the "Unfortunately, installments product is not available to you” screen is displayed.
      4.3 In case of successful checkout with prepayment a "Checkout successful" screen is presented with a button that opens Parter's payment page.
      4.4 Alternatively the "Unfortunately, installments product is not available to you” screen is displayed.

    Website presentation

    Recommendations on how to present Revo installments product on a Partner web site are available here. Implementation of individual elements is described below.

    iFrame generation

    REVO.Form.show(iframe_url, target_selector);
    

    Revo Registration iFrame has to be called when any of the following buttons are clicked: "Register in 1 minute", "?" to right from "or 150 Rub/month". Revo Checkout iFrame has to be called when "Pay with REVO" button is clicked on the checkout page. That is performed by generating a link with Registration or Checkout methods and sending the link to a js method from Revo plugin.

    iframe_url – iFame URL, obligatory parameter. target_selector – element selector that will contain the iFrame.

    Revo JS plugin then inserts <iframe src= iframe_url /> and processed iFrame operations.

    Plugin is available at the following address: https://{BASE_URI}/javascripts/iframe/v2/revoiframe.js.

    <script src="https://{BASE_URI}/javascripts/iframe/v2/revoiframe.js"></script>
    

    Plugin also supports the following events: form closed - onClose, form loaded - onLoad, decision made - onResult.

    REVO.Form.onClose(function () { alert('closed'); });
    REVO.Form.onLoad(function () { console.log('frame loaded'); });
    REVO.Form.onResult(function() { console.log('result'); });
    

    Displaying client's available funds

    Funds available to the already registered client might be obtained using the Limit method.