USDC Settlement to 3rd Party - Solana

Merchants who have payers that dont have wallets and are settling USDC to a 3rd party wallet can learn how to implement card checkout with this guide.

Setup

  1. Register a sandbox account or production account
    • Please let the Coinflow team know what your merchant id is on account creation
  2. Customize your branding if using Coinflow’s SDK or Checkout link
  3. Create your API Key
  4. Complete the form to get you setup with chargeback protection
  5. Cards that can be used while testing
  6. Configure settlement location. Options include:

API Implementation

  1. Share payer events with Coinflow 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.

    SignUpEvent
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/events \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'content-type: application/json' \
    5 --data '
    6{
    7 "eventType": "SignUp",
    8 "customerId": "user-123-abc",
    9 "country": "US",
    10 "username": "therock72",
    11 "email": "dwaynejohnson@gmail.com",
    12 "firstName": "Dwayne",
    13 "lastName": "Johnson"
    14}
    15'
    SignInEvent
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/events \
    3 --header 'Authorization: YOU_API_KEY' \
    4 --header 'content-type: application/json' \
    5 --data '
    6{
    7 "eventType": "SignIn",
    8 "customerId": "user-123-abc",
    9 "country": "US",
    10 "email": "dwaynejohnson@gmail.com"
    11}
    12'
    SignInFailureEvent
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/events \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'content-type: application/json' \
    5 --data '
    6{
    7 "eventType": "SignInFailure",
    8 "customerId": "user-123-abc",
    9 "country": "US",
    10 "email": "dwaynejohnson@gmail.com",
    11 "failureReason": "Password Failed"
    12}
    13'
    BuyerChallengeEvent
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/events \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'content-type: application/json' \
    5 --data '
    6{
    7 "eventType": "BuyerChallenge",
    8 "type": "thirdPartyKyc",
    9 "status": "successfullyFulfilled",
    10 "customerId": "user-123-abc",
    11 "country": "US",
    12 "email": "dwaynejohnson@gmail.com"
    13}
    14'
  2. Fetch a session key This creates a JWT token for the customer, and authorizes the user to call these endpoints. You will pass the returned session key as x-coinflow-auth-session-key header.

    • Note: x-coinflow-auth-user-id can be thought of as a unique customer id that you use/define on your systems.
    Request
    1curl --request GET \
    2 --url https://api-sandbox.coinflow.cash/api/auth/session-key \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'accept: application/json' \
    5 --header 'x-coinflow-auth-user-id: customer123'
    Response
    {
    "key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTQ1NSwiZXhwIjoxNzQxODA1ODU1fQ.XYKT0mOfxHggOAoC5vsbGQgHltoyvgi2c1EADFnvVPA"
    }
  3. Get the Totals for the checkout to show the customer a quote inclusive of all fees.

    Request
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/checkout/totals/merchantId \
    3 --header 'accept: application/json' \
    4 --header 'content-type: application/json' \
    5 --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiY3VzdG9tZXIxMjMiLCJtZXJjaGFudElkIjoidHlsZWUiLCJpYXQiOjE3MzQzNjY4NDksImV4cCI6MTczNDQ1MzI0OX0.rxyzFgSZNtIR7KguHyb7MFq2xeDNKH2-3NA49eHH-7Y' \
    6 --data '
    7{
    8 "subtotal": {
    9 "cents": 100
    10 },
    11 "settlementType": "USDC"
    12}
    13'
    Response
    {
    "card": {
    "subtotal": {
    "cents": 100
    },
    "creditCardFees": {
    "cents": 40
    },
    "chargebackProtectionFees": {
    "cents": 0
    },
    "gasFees": {
    "cents": 0
    },
    "total": {
    "cents": 140
    }
    },
    "ach": {
    "subtotal": {
    "cents": 100
    },
    "creditCardFees": {
    "cents": 100
    },
    "chargebackProtectionFees": {
    "cents": 0
    },
    "gasFees": {
    "cents": 0
    },
    "total": {
    "cents": 200
    }
    }
    }
  4. Tokenize the Credit Card Number. See tab: Tokenize New Card

  5. Tokenize the wallet address which will be receiving the USDC for settlement.

    Request
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/checkout/destination-auth-key \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'accept: application/json' \
    5 --header 'content-type: application/json' \
    6 --data '
    7{
    8 "blockchain": "solana",
    9 "destination": "78C3dn4yUJST9pcX9GtA3yWBcKUCjDw1RWqw1MLpoUDh"
    10}
    11'
    Response
    1{
    2 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcyMTA0NCwiZXhwIjoxNzQxODA3NDQ0fQ.gpMMF0O-Axhpwlpvhtv8cxejuMya6jNgbKzxf3lHERo"
    3}
  6. Enable a New Card Checkout This endpoint will enable a new user who has never made a purchase to complete their purchase with a credit card. Below is an example of how you’d call the card checkout endpoint:

    • Request
      1curl --request POST \
      2 --url https://api-sandbox.coinflow.cash/api/checkout/card/testtest \
      3 --header 'accept: application/json' \
      4 --header 'content-type: application/json' \
      5 --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTQ1NSwiZXhwIjoxNzQxODA1ODU1fQ.XYKT0mOfxHggOAoC5vsbGQgHltoyvgi2c1EADFnvVPA' \
      6 --data '
      7{
      8 "subtotal": {
      9 "currency": "USD",
      10 "cents": 500
      11 },
      12 "webhookInfo": {
      13 "example": "{\"wineId\": \"123abc\"}"
      14 },
      15 "card": {
      16 "cardToken": "411111YJM5TX1111", // The credit card token retrieved from Step 3
      17 "expYear": "30",
      18 "expMonth": "10",
      19 "email": "test@gmail.com",
      20 "firstName": "sdfadfsd",
      21 "lastName": "sdfsdfsd",
      22 "address1": "380 prospect ave",
      23 "city": "brooklyn",
      24 "zip": "11215",
      25 "state": "ny",
      26 "country": "US"
      27 },
      28 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTc3NiwiZXhwIjoxNzQxODA2MTc2fQ.gKk_-wNDxcqaqCVnOzHKAV-gU2HiGW_fQdsnZGMZOkQ", // tokenized wallet address
      29 "settlementType": "USDC"
      30}
      31'
      Response
      {
      "paymentId": "f3fc8a34-680b-4b91-905b-1db5628bbb0e"
      }
  7. Re-tokenize a saved card number. See tab: Refresh Token w/ CVV

  8. Enable a Saved Card Checkout This endpoint will enable a returning user to complete a purchase with a previously saved card. The returning user will need to enter their CVV before confirming the purchase. Once you’ve retrieved the refreshed card token, pass it into the Saved Card Checkout endpoint. Below is an example request:

Request
1curl --request POST \
2 --url https://api-sandbox.coinflow.cash/api/checkout/token/testtest \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTQ1NSwiZXhwIjoxNzQxODA1ODU1fQ.XYKT0mOfxHggOAoC5vsbGQgHltoyvgi2c1EADFnvVPA' \
6 --data '
7{
8 "subtotal": {
9 "currency": "USD",
10 "cents": 500
11 },
12 "webhookInfo": {
13 "example": "{\"wineId\": \"123abc\"}"
14 },
15 "settlementType": "USDC",
16 "token": "411111YJM5TX1111",
17 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTc3NiwiZXhwIjoxNzQxODA2MTc2fQ.gKk_-wNDxcqaqCVnOzHKAV-gU2HiGW_fQdsnZGMZOkQ"
18}
19'
Response
{
"paymentId": "0090c04b-1ae8-4672-a108-32874df36f11"
}
  1. Optional Implementation: Get payment by id This endpoint allows your to get details about the payment.
Request
1curl --request GET \
2 --url https://api-sandbox.coinflow.cash/api/merchant/payments/enhanced/21d842d0-564b-4957-961e-d91ad98aa04b \
3 --header 'Authorization: YOUR_API_KEY' \
4 --header 'accept: application/json'
Response
{
"info": {
"firstName": "Dwayne",
"lastName": "Johnson",
"email": "customer@email.com",
"streetAddress": "385 Prospect Ave",
"city": "Brooklyn",
"state": "NY",
"zip": "11215",
"country": "US",
"bin": "411111",
"ip": "35.160.120.126",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"expMonth": "10",
"expYear": "30",
"ipLocation": {
"lat": "45.5235",
"lon": "-122.676",
"country": "United States",
"region": "OR",
"isp": "Amazon.com, Inc.",
"city": "Portland",
"zip": "97207"
},
"deviceInfo": {
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "131.0.0.0",
"major": "131"
},
"engine": {
"name": "Blink",
"version": "131.0.0.0"
},
"os": {
"name": "Mac OS",
"version": "10.15.7"
},
"device": {
"vendor": "Apple",
"model": "Macintosh"
},
"cpu": {}
}
}
}
  1. At this point, you’ve successfully made a purchase with a new card and with a saved card. Next, lets add 3DS for card purchases. Please reach out to the Coinflow team when you’ve reached this step so we can configure 3DS on your account.

Adding 3DS to Card Checkout

Follow the below recipe to learn how to add 3DS to your new card and saved card requests.

Adding Chargeback Protection

  1. Add the chargeback protection script to every page of your app. This script allows our provider to analyze user behavior and determine if the behavior could lead to fraud.
    • On sandbox, partnerId = COINFTEST
  2. Pass the chargebackProtectionData object to the new and saved card checkout as well as the below headers. See an example of what the request will look like when you pass chargeback protection data to the new card checkout endpoint.
    • x-device-id - Get this after adding the script in step 1
    • x-coinflow-client-ip- the payer’s ip address
    • user-agent - the payer’s User Agent
    Request
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/checkout/card/testtest \
    3 --header 'accept: application/json' \
    4 --header 'content-type: application/json' \
    5 --header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15' \
    6 --header 'x-coinflow-auth-session-key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTQ1NSwiZXhwIjoxNzQxODA1ODU1fQ.XYKT0mOfxHggOAoC5vsbGQgHltoyvgi2c1EADFnvVPA' \
    7 --header 'x-coinflow-client-ip: 123.123.123.123' \
    8 --header 'x-device-id: 123456789' \
    9 --data '
    10{
    11 "subtotal": {
    12 "currency": "USD",
    13 "cents": 500
    14 },
    15 "webhookInfo": {
    16 "example": "{\"wineId\": \"123abc\"}"
    17 },
    18 "card": {
    19 "cardToken": "411111YJM5TX1111",
    20 "expYear": "30",
    21 "expMonth": "10",
    22 "firstName": "sdfadfsd",
    23 "lastName": "sdfadfsd",
    24 "email": "test@gmail.com",
    25 "address1": "380 Prospect Ave",
    26 "city": "Brooklyn",
    27 "zip": "11215",
    28 "state": "NY",
    29 "country": "US"
    30 },
    31 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTc3NiwiZXhwIjoxNzQxODA2MTc2fQ.gKk_-wNDxcqaqCVnOzHKAV-gU2HiGW_fQdsnZGMZOkQ",
    32 "chargebackProtectionData": [
    33 {
    34 "productType": "alcohol", // This may change
    35 "rawProductData": {
    36 "example": "{\"description\": \"pass as much description about the purchase here\", \"region\": \"CA\", \"yearsOld\": 20}"
    37 },
    38 "productName": "California Cab",
    39 "quantity": 1
    40 }
    41 ],
    42 "settlementType": "USDC"
    43}
    44'
  3. Complete the chargeback protection form so we can assign you a proper chargebackProtectionData.productType and partnerId for production.

  1. Tokenize the wallet address which will be receiving the USDC for settlement.
    Request
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/checkout/destination-auth-key \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'accept: application/json' \
    5 --header 'content-type: application/json' \
    6 --data '
    7{
    8 "blockchain": "solana",
    9 "destination": "78C3dn4yUJST9pcX9GtA3yWBcKUCjDw1RWqw1MLpoUDh"
    10}
    11'
    Response
    1{
    2 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcyMTA0NCwiZXhwIjoxNzQxODA3NDQ0fQ.gpMMF0O-Axhpwlpvhtv8cxejuMya6jNgbKzxf3lHERo"
    3}
  2. Call the Get Checkout Link endpoint This endpoint creates a checkout link which you can redirect a user to or embed in an iframe within your application.
Request
1curl --request POST \
2 --url https://api-sandbox.coinflow.cash/api/checkout/link \
3 --header 'Authorization: YOUR_API_KEY' \
4 --header 'accept: application/json' \
5 --header 'content-type: application/json' \
6 --header 'x-coinflow-auth-user-id: user123' \
7 --data '
8{
9 "subtotal": {
10 "currency": "USD",
11 "cents": 500
12 },
13 "email": "payer@gmail.com",
14 "blockchain": "solana",
15 "settlementType": "USDC",
16 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcxOTc3NiwiZXhwIjoxNzQxODA2MTc2fQ.gKk_-wNDxcqaqCVnOzHKAV-gU2HiGW_fQdsnZGMZOkQ"
17}
18'
Response
1{
2 "link": "https://sandbox.coinflow.cash/solana/purchase-v2/testtest?sessionKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTgwNTczNCwiZXhwIjoxNzQxODkyMTM0fQ.ycTnKxQKF4Q__HOK3WGJDt0E2ZpfbAgK9B_Gjmp0_dY&cents=500&currency=USD&email=payer%40gmail.com&useHeightChange=true&jwtToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoi456C4oKW26LXgtGg45iC64CD6IKM06DgrJbjmqXqooDgsIPjgaDjrIDimZjpkYrkkaDogabEs-mWk8iY6ICN4KCC6aCD64CM5oCJ7ICn6ICHLu-0qMSU7rS76rCM4qKx4oOE6KSJ5ait4qilXHVkOTQ16IiE7Iy46Zic4qy_5LuC7YyK4rmFxLTvtoTpnK_slr7RheOkkeqCsuePqOaMiuWEoOuBoueAuueOk-Ctq-aFk--Bo--CoOiUseaOkeKJsOKCoOqJkOugouWPseyFoOadhumvseKFu-mAoOWisuqHgOqAouOdleGCseaCoeyCkOuEsOuUk--QoO-UkOKGoOiYueOJke2Hg-SUsOmCoueuheyCltmy5YyI6oGj75-x66ya46qX7Jak6ryK6aOk5oO46Z2V6p2U4Zmv6YeB6oCw56Si46KM6YOH74Cg7oaZ4o285byV5rK04ZCmXHVkZmEz5JOB4oGW5qC0452R6oqC5o6R46Gd0LnHqOiuqOa2rOCht-GYie6ThuKhheOiiOS6i-CoouyEo-SIhuegrOG9kuiGteuMmeaZnOS-lOyGje2esuKItO-kutiN5Iem4YW467qO4oKv5K-l4Zen5YeC5qSM4pSM7LaE7oqw5KCo6omm5LSu65ax45eS0ajqpJnsp4TthLjpgqPitL7ruq_ulKPjhLTkq4HpkZnEkuyMiumBtO6hjem-hOSaqu6OhOi1gei1kOKWkOSdvOWArOKZk-GdpOajqeGAkueBkeiBkOa4kOuGoOSjvOaTlemerOKCu-q3iOWNneiek-iukuyEkeKIqOecouCtj-mfoeWBmuaViuGhn-GJgeWlpOmzge-ql-yFn-yLq-utku-puOmeqVx1ZGViNeaElO6Ciu66r-KGgeiTseGBrOS6p-mImuqmg-iMueirn-OMiuO5ruaSoeKLkOGEqeiwpuKim-iKk-iYrOedluGsneCys-aGo-qitOOMgcWI47Wl54mw55OizoHqg47joLrlsa3pjJrji4frgJDqmJrXkO6hv-OPrO-rluagk-CimO2DqOO8iuyIoO6MuuywoeOChemUjeiFoOO0huCsseyCs-GupuOFkOSQtOybgu2CuOiOi-ymvuaYuVx1MDAwYuaLnFx1MDAwYu6QgCIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlkZW1wb3RlbmN5S2V5IjoiSUtjOTc2MWM4Yi1mM2FjLTRhYjktOWU0My1lMGM5Yjk0ZmQwMzUiLCJzdWJ0b3RhbCI6eyJjdXJyZW5jeSI6IlVTRCIsImNlbnRzIjo1MDB9LCJpYXQiOjE3NDE4MDU3MzQsImV4cCI6MTc0MTg5MjEzNH0.76VvN_lJI777IcdU7cUMLz-vYdiC8jX1cOMynU3X8tI"
3}

👍 Want to trigger your own on success events?

You can listen to success event messages and get the payment id or pass your own function!

<iframe
allow="payment"
src="COINFLOW_CHECKOUT_URL"
onLoad={() => {
window.addEventListener('message', event => {
if (typeof event.data === 'string' ) {
const data = JSON.parse(event.data);
if (data.data === 'success') {
console.log('payment id', data.info.paymentId)
}
}
});
}}
/>
  1. Customize the UI on your dashboard

React SDK Implementation

  1. Install Coinflow package
    npm i @coinflowlabs/react
  2. Generate a session key for the payer.
    Request
    1curl --request GET \
    2 --url https://api-sandbox.coinflow.cash/api/auth/session-key \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'accept: application/json' \
    5 --header 'x-coinflow-auth-user-id: user123'
    Response
    1{
    2 "key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTgwNTk3MywiZXhwIjoxNzQxODkyMzczfQ.mau9HPQXZQ040-bkQ0tMg57N9IVTbEQZMtV4O9kgkjg"
    3}
  • 🚧 Session keys are valid for 30 minutes and must be refreshed afterwards.

  1. Tokenize the wallet address which will be receiving the USDC for settlement.
    Request
    1curl --request POST \
    2 --url https://api-sandbox.coinflow.cash/api/checkout/destination-auth-key \
    3 --header 'Authorization: YOUR_API_KEY' \
    4 --header 'accept: application/json' \
    5 --header 'content-type: application/json' \
    6 --data '
    7{
    8 "blockchain": "solana",
    9 "destination": "78C3dn4yUJST9pcX9GtA3yWBcKUCjDw1RWqw1MLpoUDh"
    10}
    11'
    Response
    1{
    2 "destinationAuthKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTcyMTA0NCwiZXhwIjoxNzQxODA3NDQ0fQ.gpMMF0O-Axhpwlpvhtv8cxejuMya6jNgbKzxf3lHERo"
    3}
  2. Implement the Coinflow Checkout Component.
1<CoinflowPurchase
2 sessionKey={'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoidXNlcjEyMyIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTgwNTk3MywiZXhwIjoxNzQxODkyMzczfQ.mau9HPQXZQ040-bkQ0tMg57N9IVTbEQZMtV4O9kgkjg'}
3 merchantId={'testtest'} // Replace with your merchantId
4 env={'sandbox'}
5 connection={connection} // Solana RPC connection
6 onSuccess={(...args) => {
7 console.log('Purchase Success', args); // Redirect the user
8 }}
9 blockchain={'solana'}
10 settlementType={SettlementType.USDC}
11 subtotal={{cents: 300, currency: Currency.USD}} // Amount purchase is in (exclude prop if user is to choose a custom amount)
12 webhookInfo={{
13 itemName: "sword",
14 price: "10.99"
15 }} // Pass the webhook data you want to receive
16 email={'user@email.com'} // User's email address
17 chargebackProtectionData={[{
18 productName: 'Sword',
19 productType: "inGameProduct", // Get this value directly from Coinflow
20 quantity: 1,
21 rawProductData: { // Adjust based on the available product data
22 productID: "sword12345",
23 productDescription: "A legendary sword with magical powers.",
24 productCategory: "Weapon",
25 weight: "15 lbs",
26 dimensions: "40 in x 5 in",
27 origin: "Ancient Kingdom",
28 craftedBy: "Master Blacksmith",
29 craftingDate: "2024-06-19",
30 },
31 }]}
32 destinationAuthKey={"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXN0aW5hdGlvbiI6Ijc4QzNkbjR5VUpTVDlwY1g5R3RBM3lXQmNLVUNqRHcxUldxdzFNTHBvVURoIiwiYmxvY2tjaGFpbiI6InNvbGFuYSIsIm1lcmNoYW50SWQiOiJ0ZXN0dGVzdCIsImlhdCI6MTc0MTgwNTkwNCwiZXhwIjoxNzQxODkyMzA0fQ.tice8SSjzfg7Usq3Ojd9Bl78A96MjN5ZPi5Xz53NSXg"}
33 />
  1. Customize the UI on your dashboard