Gateway: MarkRefRelation

Mark the transfer with your ref code after you submit on-chain transaction successfully.

Rest API

Make a reference between transfer transaction with your ref code

POST https://cbridge-prod2.celer.app/v2/partner/markRefRelation

Path Parameters

NameTypeDescription

transfer_id*

String

on-chain transaction transfer id

ref_id

String

your ref code

GRPC-Web API

// import getTransferConfig request message 
import {
  MarkRefRelationRequest
} from "../ts-proto/sgn/gateway/v1/gateway_pb";

// import grpc-web WebClient
import { 
  WebClient 
} from "../ts-proto/sgn/gateway/v1/GatewayServiceClientPb";

const request = new MarkRefRelationRequest();
request.setTransferId(YOUR_TRANSFER_ID);
request.setRefId(YOUR_REF_CODE);

const client = new WebClient(`https://cbridge-prod2.celer.app`, null, null);
const response = await client.markRefRelation(request, null);

Request Parameters

NameTypeDescription

transfer_id

String

Auto-generated transferId

ref_id

String

Your reference code

TransferId Generation

Since there are different types of transfer provided by cBridge, you should use corresponding transfer id generation logic, please refer following links.

The best practice for markRefRelation is notifying cBridge gateway after on-chain transaction has been submitted.

Response

Since this request is notifying cBridge gateway one transfer is related to a ref code, normal response returns an empty body.

Last updated