Checkout Link

Overview

Merchants can use the following documentation to learn how to implement Rapid. This implementation method would require you to call one endpoint which generates a url that payers can be redirected to, or can be embedded in an iframe or webview directly in your app.

Option 1 - Checkout Link

This implementation allows you to put the below url in an iframe, which can be displayed to the user on checkout. You have the ability to white-label the component to match your company branding guidelines.

  1. Share payer events with Rapid
    Sharing major events that a payer makes throughout their lifecycle on your website prior to them making a purchase will allow us to collect more information about them and improve your approval rates.
curl --request POST \
     --url https://api-sandbox.coinflow.cash/api/events \
     --header 'Authorization: YOUR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "eventType": "SignUp",
  "customerId": "user-123-abc",
  "country": "US",
  "username": "therock72",
  "email": "[email protected]",
  "firstName": "Dwayne",
  "lastName": "Johnson"
}
'
curl --request POST \
     --url https://api-sandbox.coinflow.cash/api/events \
     --header 'Authorization: YOU_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "eventType": "SignIn",
  "customerId": "user-123-abc",
  "country": "US",
  "email": "[email protected]"
}
'
curl --request POST \
     --url https://api-sandbox.coinflow.cash/api/events \
     --header 'Authorization: YOUR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "eventType": "SignInFailure",
  "customerId": "user-123-abc",
  "country": "US",
  "email": "[email protected]",
  "failureReason": "Password Failed"
}
'
curl --request POST \
     --url https://api-sandbox.coinflow.cash/api/events \
     --header 'Authorization: YOUR_API_KEY' \
     --header 'content-type: application/json' \
     --data '
{
  "eventType": "BuyerChallenge",
  "type": "thirdPartyKyc",
  "status": "successfullyFulfilled",
  "customerId": "user-123-abc",
  "country": "US",
  "email": "[email protected]"
}
'
  1. Call the Get Checkout Link endpoint which will generate a url to the checkout component. This can be placed inside an iframe.

    • Note: The header x-coinflow-auth-user-id is a unique identifier for the customer. You may pass any string that you, the sweepstakes, uses to identify the customer / buyer.\
    curl --request POST \
         --url https://api-sandbox.coinflow.cash/api/checkout/link \
         --header 'Authorization: YOUR_API_KEY' \
         --header 'accept: application/json' \
         --header 'content-type: application/json' \
         --header 'x-coinflow-auth-user-id: dwaynejohnson75' \
         --data '
    {
      "webhookInfo": {
        "example": "{\"item\": \"lorem ipsum\", \"id\": \"1234\"}"
      }, // pass any webhook info youd like to receive
      "subtotal": {
        "cents": 100
      },
      "customerInfo": {
        "name": "Dwayne Johnson",
        "address": "385 Prospect Ave",
        "city": "Brooklyn",
        "state": "NY",
        "zip": "11215",
        "country": "US",
        "ip": "76.247.13.80",
        "lat": "39.897094",
        "lng": "-77.681522"
      }, // Please include kyc data here so we can pass along to our fraud provider
      "email": "[email protected]",
      "blockchain": "solana",
      "origins": [
        "https://www.yourwebsite.com"
      ],
      "chargebackProtectionData": [
        {
          "productType": "gameOfSkill",// Get this from Coinflow team after submitting Chargeback Protection Questionnaire
          "rawProductData": {
            "description": "asdf",
          }, // Its important to pass as much descriptive data about the purchase for chargeback protection. See doc for example of what data can be passed here.
          "productName": "lorem ipsum",
          "quantity": 1
        }
      ],
      "settlementType": "USDC",
      "deviceId": "..." // Get this after adding chargeback protection script
    }
    '
    {
      "link": "https://sandbox.coinflow.cash/polygon/purchase-v2/testtest?sessionKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiZHdheW5lam9obnNvbjc1IiwibWVyY2hhbnRJZCI6InRlc3R0ZXN0IiwiaWF0IjoxNzMzODU2NDU3LCJleHAiOjE3MzM5NDI4NTd9.mTgqtFyuLw9H-yIuAu2jrryvoiODgI5alNYKjzXYLHo&email=dwaynejohnson7%40gmail.com&jwtToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoi456C4oKW26LXguCzgOWYgOOAoOKwiOGsgOiysOS5lOCxoNyA6LG54YCZ6IKG4ZGg4KaA7rGb5YOA5LCG7pKc4oCD5IiA6piA7rCIybDgp6DHgOCuv-OogOSSqeSqo9CV5Lil5aqi5pWE6bWc5Ze4446h5KKS4qiM5Yqz6omB47yS54aa6omK6LqC5bGw7qSS7JO11Zz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jhiZTvuYPJpeGXteC-luSJiOmSruGrkO2NmOOGjOisiOeVmuKdleSBqsad6Lio75Cn4LqG66WJ5Jy27IiC6qCh5ImR5ZCs4q6W5pKYXHVkYzQz7L6M7Ye446yU75aZ6Kyz4YSm74au4L6F7LOw6qiC4ZqP54Wo4LGN7YmA7LCL4aij7oq_5JiT5p2L6YmF5bC27pS_5o-c6pqg4YGR5Iuw5aSF46qM6Lah4rid7ICm74Wy5ZGZ55Kk5omi6L-H7oO47q6C4ZiF7JWr5aKS5IKI7J-F65qg5LCsXHVkZDA05KWR5LKX5IWA4Zur6Iuy6qOR5LSd7ZS84pqM4LiP4aOO7qGN75uo5bGTXHVkOTA24pa64oCk6qCs7JOo5LCk56aJ4bWB6K6j6rm35Iyv4LOw5LCR7Zai77i94bGW7KeY5Zq44ZOl7pSO5a6R5Iiw4YCA17JcdTAwMDAiLCJtZXJjaGFudElkIjoidGVzdHRlc3QiLCJpZGVtcG90ZW5jeUtleSI6IklLNDVhZjkwZGEtN2JiMC00ODE5LWE1MmEtMzlkZDcwODA0NTNjIiwiYW1vdW50IjoiMS4wMCIsImlhdCI6MTczMzg1NjQ1NywiZXhwIjoxNzMzOTQyODU3fQ.Bd7R0AlEK2zSup1JAbF-iCX03w7mxhcb9TaDaCFAe2c"
    }
  2. Confirm a purchase > go to merchant dashboard > see payment settled & payment amount settled to the in-app wallet.

📘

Ensure you're passing as much descriptive data about the purchase to chargebackProtectionData.rawProductData

the rawProductData field is free-form JSON and merchants can pass any descriptive data they have about the item. See this doc for an example implementation.

  1. To withdraw your earnings from all card payments, go to admin dashboard > withdrawals > withdraw funds.