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

Rest API

post
https://cbridge-prod2.celer.network
/v2/partner/markRefRelation
Make a reference between transfer transaction with 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.network`, null, null);
const response = await client.markRefRelation(request, null);

Request Parameters

Name
Type
Description
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.