API Reference

The API interface is only available to Premium Partners. Please visit [Premium Partner] to check how to apply.

You will get your own partnerId and APIPrivateKeys to call APIs once you become Premium Partner.

Summary

Guide

Please follow this guide to call FaTPay API interface.

Domain

https://api.ramp.fatpay.xyz/

Request Protocol

ProtocolMethodContent-Type
HTTPS
GETPOST
application/jsonmultipart/form-data

FaTPay API is HTTPS-only.

Encoding

UTF-8

Common header parameters

The following common parameters should be included in headers of FaTPay API requests.

Keys and values are case-sensitive.

KeyFormatDescription

X-Fp-Partner-Id

String

Assigned by FaTPay during onboarding process to be Premium Partner, e.g. mqMBpCIP630LJxLY

X-Fp-Nonce

Integer(6)

Random integer, e.g. 183216

X-Fp-Timestamp

Integer(10)

Unix timestamp in second, e.g. 1656600459

X-Fp-Version

String

Version of FaTPay API, e.g. v1.0

X-Fp-Signature

String

Signature generated by request parameters and APIPrivateKey. Check [API Signature & Webhook Validation] for signature algorithm.

Responses

Normally, the API response consists of code, msg and data. data would be null if code is not 10000. The returned data might be an Object or Array. It depends on the specific API.

Check [Errors] for the definitions of error codes and messages.

KeyTypeRequiredDescription

code

String

Y

Error code

msg

String

Y

Error message

data

Object

N

Object/Array

API response example
// data in response is an object
{
  "code": "10000",
  "msg": "success",
  "data": {
    "foo": "bar"
  }
}

// data in response is an array
{
  "code": "10000",
  "msg": "success",
  "data": [
    {
      "foo": "bar1"
    },
    {
      "foo": "bar2"
    }
  ]
}

// data in response is null
{
  "code": "10003",
  "msg": "Signature error",
  "data": null
}

All fields of the objects contained in data will be returned if code is 100000. Even there is no value for some fields. They will be also responded as empty string.

Last updated