4 min citit | Actualizat 25 Nov 2020 | Categorie API | User AvatarAlin Ionut

Implementation Flow

Hello World Developers! Main API Documentation is available at https://dev-docs.infra.cryptocoin.pro/api.

A complete flow for implementing API request is presented bellow, starting with user registration and continuing with purchasing/selling crypto.

If you implement API as a Platform, you have to make sure that Authentication is made as Platform.

Steps

1. User Create

Hit the POST: /api/v1/user endpoint, with required properties.

As specified in endpoint documentation, If you are a Partner, platform.id will be provided to you after onboarding.

2. User Email Verify

Hit the POST: /api/v1/user/verify endpoint, with email code confirmation.

3. User Authentication

Hit the POST: /api/v1/authenticate endpoint, with email and password.

If you are a Partner, you have to Authenticate user as Platform, as specify in Authentication documentation above.


All bellow API Endpoints are under Authorization protection, so you will have to set Header Authorization: Bearer <token>

4. User Phone Create

Hit the POST: /api/v1/user/{user}/phone endpoint, with required properties.

After you hit the API, SMS code will be send to specified number, in order to use at Phone Verification.

5. User Phone Verify

Hit the POST: /api/v1/user/{user}/phone/verify endpoint, with phone code confirmation.

6a. User Add Bank (optional)

Hit the POST: /api/v1/user/{user}/bank endpoint, with required properties.

6b. User Add Card (optional)

Hit the POST: /api/v1/user/{user}/card endpoint, with required properties.

6c. User Add Wallet (optional)

Hit the POST: /api/v1/user/{user}/wallet endpoint, with required properties.

7. Quote Create

Hit the POST: /api/v1/user/{user}/quote endpoint, with required properties.

Quote is available for a limited period of time! Unless is confirmed, it will expire.

8. Quote Confirm

Hit the POST: /api/v1/user/{user}/quote/{quote} endpoint, with required properties.

After Quote is confirmed, Order is returned as Response!

9a. Order Payment (bank - only for buy_with_fiat operation)

Hit the POST: /api/v1/user/{user}/order/{order}/payment-confirmation endpoint, with user proof of payment.

9b. Order Payment (card - only for buy_with_fiat operation)

After Quote is Confirmed, you will receive in Order Resource response, a payment URL, where you can make the payment using Credit Card. Confirmation is made automatically by our Payment Integrators.

10. KYC details (required depending of amount purchased)

Hit the POST: /api/v1/user/{user}/kyc/personal-data endpoint, with required properties.

Required KYC properties are marked in User Profile Endpoint with "required": true, property. Thus, you may be required to submit Personal Data, Address, Documents, Video or EDD, hitting the specific endpoints for each one.

Order will be approved only after all KYC required properties are submitted, and KYC status is Approved.


If this do not answer your questions, please do not hesitate to contact us at contact@cryptocoin.pro.

Mergi Sus