FaTPay Docs
🇺🇸 English
🇺🇸 English
  • Overview
  • Get Started
    • Onboarding
    • Quickstarts
  • Best Practices
    • Exchanges
    • Crypto Projects
    • Wallets
    • Affiliate Partners
    • NFT
  • Reference
    • Integration Tutorial
      • On-ramp Widget Customization
      • NFT Checkout Widget Customization
      • Interface Customization
      • Widget Themes Gallery
      • Widget Signature
    • API Reference
      • APIs
        • List all cryptocurrencies
        • List all fiat currencies and payment methods
        • Retrieve quoted price
        • List all orders
      • Webhooks
        • Webhook for order events
      • API Signature & Webhook Validation
  • Appendix
    • Demo
      • Widget Signature Demo
      • API Signature Demo
      • Webhook Validation Demo
    • Languages
    • Fiat Currencies
    • Cryptocurrencies (on-ramp)
    • Cryptocurrencies (NFT Checkout)
    • Errors
Powered by GitBook
On this page
  • Summary
  • Guide
  • Domain
  • Request Protocol
  • Encoding
  • Common header parameters
  • Responses
  1. Reference

API Reference

PreviousWidget SignatureNextAPIs

Last updated 2 years ago

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

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

Summary

  • List all cryptocurrencies

    • List all the cryptocurrencies supported by FaTPay;

  • List all fiat currencies and payment methods

    • List all the fiat currencies and its' payment methods supported by FaTPay;

  • Retrieve quoted price

    • Query cryptocurrency quotes based on fiat currency amount and present exchange rate;

  • List all orders

    • Query orders list;

  • Webhook for order events

    • Webhook notification will be sent by FaTPay to the partner when the order status is changed;

Guide

Please follow this guide to call FaTPay API interface.

Domain

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

Request Protocol

Protocol
Method
Content-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.

Key
Format
Description

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

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.

Key
Type
Required
Description

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.

Signature generated by request parameters and APIPrivateKey. Check [] for signature algorithm.

API Signature & Webhook Validation
Premium Partner