Payment by Link & QR Code

To retrieve payment with Link and QR Code; you can create a link on Craftgate, share this link or QR code and you can easily retrieve payment without the need for any technical integration.

Create Link

The endpoint and http method information to create link are stated below.

URL

HTTP Method URL
POST /craftlink/v1/products

Request Parameters

The parameters expected to be sent in requests to create link are listed under the table and subheadings below.

Parameter Name Type Required Description
name string Yes Name of the product
description string Yes Description of the product
orderId string No Order Id to be send to bank. Stock value should be 1 if order id presents.
price number Yes Price
currency Currency Yes Currency. See: Currencies
stock number No Stock if any.
channel string No Payment channel
enabledInstallments number[] Yes Indicates the installments to be shown in the payment step.

Response Parameters

The parameters returned as a result of the link creation are subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

Parameter Name Type Description
id number ID of the product link
name string Name of the product
description string Description of the product
channel string Payment channel
orderId string Bank Order Id
status Status Status of the link
price number Price
currency Currency Currency. See: Currencies
stock number Stock.
soldCount number Indicates how many times the payment is received via the link.
token string Token of the product link
enabledInstallments number[] Indicates the installments to be shown in the payment step.
url string URL
qrCodeUrl string QR code URL.

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Update Link

The endpoint and http method information to update link are stated below.

URL

HTTP Method URL
PUT /craftlink/v1/products/:id
Parameter Name Type Required Description
id number Yes ID of the product link

Request Parameters

The parameters expected to be sent in requests to update link are listed under the table and subheadings below.

Parameter Name Type Required Description
status Status Yes Status of the link
name string Yes Name of the product
description string Yes Description of the product
orderId string No Order Id to be send to bank. Stock value should be 1 if order id presents.
price number Yes Price
currency Currency Yes Currency. See: Currencies
stock number No Stock if any.
channel string Yes Payment channel
enabledInstallments number[] Yes Indicates the installments to be shown in the payment step.

Response Parameters

The parameters returned as a result of the link update are subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

You can refer to the link response for the return value.

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Retrieve Link

The endpoint and http method information to retrieve link are stated below.

URL

HTTP Method URL
GET /craftlink/v1/products/:id
Parameter Name Type Required Description
id number Yes ID of the product link

Response Parameters

The parameters returned as a result of the link inquiry are subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

You can refer to the link response for the return value.

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Delete Link

The endpoint and http method information to delete link are stated below.

URL

HTTP Method URL
DELETE /craftlink/v1/products/:id
Parameter Name Type Required Description
id number Yes ID of the product link

Sample Codes

You can review the sample codes in the open source Craftgate API clients.

Search Links

The endpoint and http method information to search links are stated below.

URL

HTTP Method URL
GET /craftlink/v1/products
Parameter Name Type Required Description
name string No Name of the product link
minPrice number No Min price
maxPrice number No Max price
currency Currency No Currency. See: Currencies
channel string No Payment channel
page number No Start index of the search result
size number No Size of the search result

Response Parameters

The parameters returned as a result of the link search are subject to the rules specified in the Response Formats section of the API documentation home page. In the absence of a systematic or fictional error, the sub-parameters of the object returned in the data parameter are as follows:

Parameter Name Type Description
page number Start index of the search result
size string Size of the search result
totalSize string Total size of the search result
items Link[] List of product links. You can refer to the link response for the return value.

Sample Codes

You can review the sample codes in the open source Craftgate API clients.