Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
payments
Create a payment
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({currency: '<string>', amount: 1.5})
};

fetch('https://prod-payments-api.forebit.io/v1/businesses/{businessId}/payments', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://prod-payments-api.forebit.io/v1/businesses/{businessId}/payments"

payload = {
"currency": "<string>",
"amount": 1.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
{
  "data": {
    "url": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "message": "<string>",
  "errors": [
    "<string>"
  ]
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}

Authorizations

Authorization
string
header
required

Pass your JWT token in the Authorization header as a Bearer token.

Path Parameters

businessId
integer<int64>
required

The target business ID.

Body

Amount, currency, payment methods, and optional metadata.

currency
string
required

ISO 4217 currency code (e.g. USD, EUR).

Minimum string length: 1
amount
number<double>
required

Payment amount in the specified currency. Minimum 0.50.

Required range: x >= 0.5
name
string | null

Display name shown to the customer on the checkout page.

description
string | null

Internal description. Not visible to customers.

paymentMethods
object | null

Restrict which payment methods the customer can choose. Omit to allow every method enabled on your business.

metadata
object | null

Arbitrary key-value pairs stored with the payment. Use this for your own order IDs or reference data.

customerEmail
string<email> | null

Customer email for receipts and status updates. When omitted, the checkout page collects it.

customerIp
string | null

Customer IP address. Auto-detected from the first checkout page visit when omitted.

customerUserAgent
string | null

Customer user-agent string. Auto-detected from the first checkout page visit when omitted.

redirectUrl
string<uri> | null

Post-payment redirect URL. Falls back to the default URL configured on your business.

notifyUrl
string | null

Webhook URL for this payment. Delivers events independently of your global webhook settings.

feeTransfers
object[] | null

Response

Payment created. Redirect the customer to the returned URL.

data
object
message
string | null
errors
string[] | null