Checkout Implementation
BitCanuck Checkout represents a way for your platform users to trade crypto in a fast and secure way, powered by our API. In order to gain access, you will need to have a valid platform enrolled in BitCanuck.
Once you accomplish that, you will receive the following:
Platform ID
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Platform Code
xxxxxxxx
JWT Private
-----BEGIN RSA PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END RSA PRIVATE KEY-----
JWT Public
-----BEGIN PUBLIC KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END PUBLIC KEY-----
For best security, JWT RSA Keys are encoded in 2048 bit.
Checkout Base URL
Checkout Query Params
| Parameter | Values | Required | Info | 
|---|---|---|---|
| platform | xxxxxxxx | ✓ | Your platform code. | 
| token | xxxxxxxxxxxxxxxxxxxxxxxx | ✓ | JWT RS512 encoded with provided keys.¹ | 
| - | - | - | - | 
| lang | {ro|en|de} | - | Select the language for the checkout. Default: en. | 
| display | {light|dark} | - | Select the theme for the checkout. Default:light | 
| landing | {true|false} | - | Select if you want to skip the checkout landing page. Default:false | 
- Encryption algorithm can be change from your Partner dashboard. We support: RS512, RS384, RS256, HS512, HS384 and HS256.
Checkout URL Example
Token Payload Checkout Example (JWT RS512 encoded)
{
  "user": {
    "id": "1",
    "username": "username",
    "email": "email@domain.com",
    "first_name": "John",
    "last_name": "Doe",
    "dob": "2000-01-31",  
    "wallet": "0xfFf75cb3916570824CcEFFe589193c2452383C17",
    "phone": "40730000000",
    "country": "RO",
    "city": "Pitesti",
    "street": "Street details here",
    "zip": "111111"
  },
  "payment": {
    "operation": "buy",
    "type": "coin",
    "symbol": "ETH",
    "amount": "10",
    "fiat": "EUR",
    "request_id": "1",
    "method": "card",
    "second_order_type": "withdraw"
    "attempts": "3"
  },
  "redirect_url": "https://www.google.com",
  "ping_url": "https://www.google.com/ping",
  "ip": "86.123.31.5",
  "expire": 1571848640
}
Token Payload Checkout Details
| Property | Validations | Required | Info | 
|---|---|---|---|
| user.id | string|max:191 | ✓ | User identification on your platform. | 
| user.username | alpha_dash|max:191 | - | User username on your platform. | 
| user.email | ✓ | User email. | |
| user.wallet | alpha_num|max:191 | - | User wallet address.¹ | 
| user.phone | numeric|digits_between:7,17 | - | User phone. | 
| user.first_name | alpha_dash|max:191 | ✓ | User first name. | 
| user.last_name | alpha_dash|max:191 | ✓ | User last name. | 
| user.dob | date_format:Y-m-d | ✓ | User date of birth.² | 
| user.country | countryISOcode | - | User country ISO code.³ | 
| user.city | alpha_dash|max:191 | - | User city. | 
| user.zip | alpha_num|between:4,10 | - | User ZIP code. | 
| user.street | string|max:191 | - | User street details. | 
| - | - | - | - | 
| payment.operation | in:buy,sell | ✓ | Transaction side. | 
| payment.type | in:coin,token | ✓ | Transaction type. | 
| payment.symbol | in:ETH,XBT,IPSX,etc | ✓ | Transaction crypto symbol. | 
| payment.amount | numeric | ✓ | Transaction crypto amount. | 
| payment.fiat | in:EUR,USD,etc | ✓ | Transaction fiat symbol. | 
| payment.request_id | unique|max:191 | ✓ | Transaction request ID. | 
| payment.method | in:card,bank | ✓ | Transaction payment method. | 
| payment.second_order_type | in:withdraw|withdrawIco | - | Transaction second operation after “buy”.¹ | 
| payment.attempts | integer|max:5 | - | Transaction max quote attempts. | 
| - | - | - | - | 
| redirect_url | url | ✓ | Web location to redirect after checkout is finalized. | 
| ping_url | url | - | Web location where platform will send notification events.⁴ | 
| ip | ip | - | Restrict checkout access by IP address. | 
| expire | integer|digits:10 | ✓ | Represents checkout request expiration date.⁵ | 
- If wallet is not provided, the funds will remain in user BitCanuck balance. If is provided, a “payment.second_order_type” operation must be set as “withdraw”, and after "buy" order is Approved, a second Withdraw order will be automatically triggered.
- User must have at least 18 years.
- To get a list with all supported countries, interrogate API /countries endpoint.
- If ping_url is different than your Platform IEN URL, we will send data to this address as well as on Platform IEN URL.
- If this date is passed, checkout request will no longer be available.
Token Payload Checkout Details Extra
- Payment.type - Available values depends on your platform settings in BitCanuck platform.
- Payment.symbol - Available values depends on your platform settings in BitCanuck platform.
- Payment.amount - If user has no other order in our BitCanuck platform, limitation may be applied to the maximum amount available for first order.
- Payment.fiat - Available values depends on your platform settings in BitCanuck platform.
- Payment.method - Available values depends on your platform settings in BitCanuck platform.
If this do not answer your questions, please do not hesitate to contact us!