Skip to main content
GET
/
v1
/
businesses
/
{businessId}
/
payments
/
{paymentId}
Get a payment
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://prod-payments-api.forebit.io/v1/businesses/{businessId}/payments/{paymentId}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "endAmount": 123,
    "prePaymentAmount": 123,
    "currency": "<string>",
    "status": "AWAITING_PAYMENT",
    "createdAt": "2023-11-07T05:31:56Z",
    "expiresAt": "2023-11-07T05:31:56Z",
    "timeline": [
      {
        "time": "2023-11-07T05:31:56Z",
        "paymentStatus": "AWAITING_PAYMENT"
      }
    ],
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "customer": {
      "id": 123,
      "email": "<string>",
      "ipAddresses": [
        {
          "city": "<string>",
          "ip": "<string>",
          "country": "<string>",
          "riskScore": 123,
          "connectionType": "RESIDENTIAL",
          "isp": "<string>",
          "dateCreated": "2023-11-07T05:31:56Z"
        }
      ]
    },
    "metadata": {},
    "selectedPaymentMethod": "FOREBIT_CRYPTO",
    "forebitCryptoCharge": {
      "amount": 123,
      "coinName": "<string>",
      "exchangeRate": 123,
      "isUnderpaid": true,
      "address": "<string>",
      "transaction": {
        "amount": 123,
        "toAddress": "<string>",
        "id": "<string>",
        "confirmations": 123,
        "blockNumber": "<string>",
        "network": "ETHEREUM",
        "fromAddress": "<string>",
        "tokenName": "BITCOIN"
      },
      "transactions": [
        {
          "amount": 123,
          "toAddress": "<string>",
          "id": "<string>",
          "confirmations": 123,
          "blockNumber": "<string>",
          "network": "ETHEREUM",
          "fromAddress": "<string>",
          "tokenName": "BITCOIN"
        }
      ],
      "walletName": "<string>"
    },
    "contractCharge": {
      "amount": 123,
      "exchangeRate": 123,
      "isUnderpaid": true,
      "address": "<string>",
      "transaction": {
        "amount": 123,
        "toAddress": "<string>",
        "id": "<string>",
        "confirmations": 123,
        "blockNumber": "<string>",
        "network": "ETHEREUM",
        "fromAddress": "<string>",
        "tokenName": "BITCOIN"
      },
      "walletName": "<string>",
      "coinName": "<string>"
    },
    "forebitFee": 123,
    "note": "<string>",
    "onBehalfOfBusinessId": 123,
    "netAmountUsd": 123
  },
  "message": "<string>",
  "errors": [
    "<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.

paymentId
string<uuid>
required

The payment ID to look up.

Response

Payment returned.

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