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>"
]
}Retrieve the full record for a single payment, including customer info, event timeline, on-chain transaction data, and fee details.
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>"
]
}Pass your JWT token in the Authorization header as a Bearer token.
The target business ID.
The payment ID to look up.
Was this page helpful?