Skip to main content
POST
/
payment
/
api
/
v1
/
offramp
/
accept-quote
Accept Offramp Quote
curl --request POST \
  --url https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "account_id": "245fb369-d8c0-4193-b72f-cdda1b1dedd5",
  "quote_id": "733bb4d7-9ae3-44f6-b73c-82909bba8352"
}
'
import requests

url = "https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote"

payload = {
"account_id": "245fb369-d8c0-4193-b72f-cdda1b1dedd5",
"quote_id": "733bb4d7-9ae3-44f6-b73c-82909bba8352"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '245fb369-d8c0-4193-b72f-cdda1b1dedd5',
quote_id: '733bb4d7-9ae3-44f6-b73c-82909bba8352'
})
};

fetch('https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => '245fb369-d8c0-4193-b72f-cdda1b1dedd5',
'quote_id' => '733bb4d7-9ae3-44f6-b73c-82909bba8352'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote"

payload := strings.NewReader("{\n \"account_id\": \"245fb369-d8c0-4193-b72f-cdda1b1dedd5\",\n \"quote_id\": \"733bb4d7-9ae3-44f6-b73c-82909bba8352\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"245fb369-d8c0-4193-b72f-cdda1b1dedd5\",\n \"quote_id\": \"733bb4d7-9ae3-44f6-b73c-82909bba8352\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.carbnconnect.com/payment/api/v1/offramp/accept-quote")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"245fb369-d8c0-4193-b72f-cdda1b1dedd5\",\n \"quote_id\": \"733bb4d7-9ae3-44f6-b73c-82909bba8352\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "addfec21-2d41-4365-b4c6-0538b7df2eae",
  "status": "PAYMENT_SUBMITTED",
  "source_amount": 0.3,
  "destination_amount": 17.87,
  "offramp_quote_id": "733bb4d7-9ae3-44f6-b73c-82909bba8352",
  "rail_fee": 10,
  "account_details": {
    "accountId": "245fb369-d8c0-4193-b72f-cdda1b1dedd5",
    "currency": "PHP",
    "userId": "0d64857d-1052-4252-a95b-c118ee86efa9",
    "bank_account": {
      "bank_name": "gcash",
      "payment_rail": "",
      "account_holder_name": "Van Cruz",
      "recipient_account_number": "09171149891"
    },
    "bank_account_type": "BUSINESS"
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. Must be included in the x-api-key header.

Body

application/json
account_id
string<uuid>
required

The unique identifier of the registered destination account

Example:

"245fb369-d8c0-4193-b72f-cdda1b1dedd5"

quote_id
string<uuid>
required

The unique identifier of the quote to accept

Example:

"733bb4d7-9ae3-44f6-b73c-82909bba8352"

Response

Quote accepted and transfer initiated successfully

id
string<uuid>

Unique identifier for the offramp transfer

Example:

"addfec21-2d41-4365-b4c6-0538b7df2eae"

status
string

Current status of the offramp transfer

Example:

"PAYMENT_SUBMITTED"

source_amount
number

Amount of crypto being converted (source amount)

Example:

0.3

destination_amount
number

Amount of fiat to be received (destination amount)

Example:

17.87

offramp_quote_id
string<uuid>

The unique identifier of the quote that was accepted

Example:

"733bb4d7-9ae3-44f6-b73c-82909bba8352"

rail_fee
number

Rail fee charged for the transfer

Example:

10

account_details
object