Skip to main content

Payment creation

To generate a new payment link, you need to make a POST request with the following parameters:

URL

https://api.bembit.com/api/v1/checkouts

Method

POST

Params

Important

To generate a new payment link, you need to send a POST request to the designated end-point. The required parameters for this request should be included in the request headers, while the additional data should be included in the request body.

ParamsTypeDefault valuesDescription
apistringundefinedYour API Key.
secretstringundefinedYour secret.

Request Body:

{
"slug": "string",
"title": "string",
"description": "short description",
"logo": "string",
"paymentMethodPix": {
"enabled": true,
"expiryTimeInMinutes": 5
},
"paymentMethodCrypto": {
"enabled": true,
"expiryTimeInMinutes": 30,
"allTokens": true,
"highlightTokens": ["string"]
}
}
  • Slug: Payment's alias (defined when the link is first created).

  • Title: It's Checkout's title, defined when the link is first created.

  • Description: Payment description.

  • Logo: The URL of the payment's logo image.

  • paymentMethodPix / enabled: Indicate the instances in which the PIX payment method is accessible for the ongoing payment process.

  • paymentMethodPix / expiryTimeInMinutes: Time in minutes for the QR Code's lifetime.

  • paymentMethodCrypto / enabled: Indicate the instances in which the Crypto payment method is accessible for the ongoing payment process.

  • paymentMethodCrypto / expiryTimeInMinutes: Time in minutes for the current's payment lifetime.

  • paymentMethodCrypto / allTokens: It will appear as true when all cryptocurrencies are accepted on the current payment.

  • paymentMethodCrypto / highlightTokens: It's an Array of strings that contains all the symbols from the accepted cryptocurrencies for the ongoing payment.

cURL:

curl -X 'POST' \
'https://api-sandbox.bembit.com/api/v1/checkouts' \
-H 'accept: */*' \
-H 'api: [API]' \
-H 'secret: [Secret]' \
-H 'Content-Type: application/json' \
-d '{
"slug": "string",
"title": "string",
"description": "Short description",
"logo": "string",
"paymentMethodPix": {
"enabled": true,
"expiryTimeInMinutes": 5
},
"paymentMethodCrypto": {
"enabled": true,
"expiryTimeInMinutes": 30,
"allTokens": true,
"highlightTokens": [
"string"
]
}
}'

Respostas do Server:

Status 201:

Created

Status 403:

Unauthenticated

See and test our API on Swagger.