Payments
Create and inspect payments, list payment history, and build / submit the signed transaction that settles a payment.
Get payment
https://api.gobtcpay.com/public/api/v1.2/instant/transaction/get-paymentReturns the current state of a payment by paymentId, including its status, amounts, merchant / POS details, and qrString. Poll this to track a payment until it is paid or expired.
Authorization: walletAuth
Body required
application/jsonpaymentIdstringrequiredTransaction (payment) identifier, the paymentId returned by Create payment.
3fa85f64-5717-4562-b3fc-2c963f66afa6Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/instant/transaction/get-payment" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"currency": "USD",
"merchantName": "Satoshi Coffee",
"posTerminalLabel": "Front desk",
"posTerminalLocation": "Lisbon, PT",
"merchantDisplayName": "Satoshi Coffee",
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "Order #1024",
"amountSats": "string",
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"currencySymbol": "$",
"amount": 10,
"metadata": {},
"expiresAt": 1718012345,
"qrString": "bitcoin:bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq?amount=0.0005"
}
}
}List payments
https://api.gobtcpay.com/public/api/v1.2/instant/transaction/listReturns a paginated list of payment transactions with optional dateRange and status filters. Each item carries merchant / POS context, fiat and BTC amounts, and on-chain settlement data when available. totalCount reflects the filtered total.
Authorization: walletAuth
Body required
application/jsonpaginationobjectfiltersobjectResponses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/instant/transaction/list" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"pagination": {
"limit": 20,
"skip": 0
},
"filters": {
"dateRange": {
"start": 0,
"end": 0
},
"status": [
"success"
]
}
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"items": [
{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"paymentTxId": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"status": "success",
"merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchantName": "Satoshi Coffee",
"posTerminalLabel": "Front desk",
"posTerminalLocation": "Lisbon, PT",
"merchantDisplayName": "Satoshi Coffee",
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amountSats": "string",
"description": "Order #1024",
"metadata": {},
"createdAt": 1718012345,
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"currency": "USD",
"amount": 10,
"currencySymbol": "$",
"onChain": {
"tx": null,
"amountSats": null,
"feeSats": null,
"createdAt": null,
"blockNumber": null
}
}
],
"totalCount": 0
}
}
}Build payment transaction
https://api.gobtcpay.com/public/api/v1.2/instant/psbt/build-transaction-to-sign-paymentBuilds the unsigned PSBT that settles a payment. Pass the paymentId; the response returns a jobId, the psbtBase64 to sign with the wallet key, and a summary of inputs, fee, and change. Sign it client-side, then submit via Settle payment.
Authorization: walletAuth
Body required
application/jsonpaymentIdstringrequiredThe payment to settle, as returned by Create payment (/instant/transaction/create-payment).
3fa85f64-5717-4562-b3fc-2c963f66afa6Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/instant/psbt/build-transaction-to-sign-payment" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"jobId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"psbtBase64": "cHNidP8BAHECAAAAAfYI0kF1pQ0i3xL0AAAAAAD9////AsBdAQAAAAAAFgAUdR5",
"summary": {
"fromAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"toAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"amountSats": "string",
"feeRateSatVb": 50000,
"estVsize": 140,
"feeSats": "string",
"changeSats": "string",
"inputCount": 0
}
}
}
}List on-chain transactions
https://api.gobtcpay.com/public/api/v1.2/instant/transaction/on-chain-listReturns the wallet's on-chain transactions with optional dateRange and type filters. Each entry includes the tx id, amounts, fee, block number (null while unconfirmed), and the payments settled by that transaction.
Authorization: walletAuth
Body required
application/jsonfiltersobjectResponses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/instant/transaction/on-chain-list" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"filters": {
"dateRange": {
"start": 0,
"end": 0
},
"type": [
"in"
]
}
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"items": [
{
"tx": "02000000000101a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f6071829ffffffff",
"amountSats": "string",
"feeSats": "string",
"createdAt": 1718012345,
"blockNumber": 845000,
"type": "in",
"paymentTxs": [
{
"paymentId": null,
"paymentTxId": null,
"status": null,
"merchantId": null,
"merchantName": null,
"posTerminalLabel": null,
"posTerminalLocation": null,
"merchantDisplayName": null,
"posTerminalId": null,
"amountSats": null,
"description": null,
"metadata": null,
"createdAt": null,
"btcPriceInUsd": null,
"currency": null,
"amount": null,
"currencySymbol": null,
"btcPriceInCurrency": null
}
]
}
]
}
}
}Cancel payment
https://api.gobtcpay.com/public/api/v1.2/merchant/payment/cancelCancels a payment that has not been paid yet, use it when the order is dropped on your side. Only initiated and expired payments can be canceled; once funds are seen on-chain (detected) or confirmed (paid) the call fails with payment_not_cancelable. Cancelling an already-canceled payment succeeds and changes nothing, so retries are safe. Unlike expired, canceled is terminal: the watcher stops following the address, so late funds will not flip it to paid.
Authorization: merchantAuth
Body required
application/jsonpaymentIdstringrequiredIdentifier of the payment (UUID).
3fa85f64-5717-4562-b3fc-2c963f66afa6Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/merchant/payment/cancel" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"currency": "USD",
"merchantName": "Satoshi Coffee",
"storeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"posTerminalLabel": "Front desk",
"posTerminalLocation": "Lisbon, PT",
"merchantDisplayName": "Satoshi Coffee",
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "Order #1024",
"amountSats": "string",
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"currencySymbol": "$",
"amount": 10,
"metadata": {},
"expiresAt": 1718012345,
"qrString": "bitcoin:bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq?amount=0.0005",
"version": 0,
"transactions": [],
"paidAt": null
}
}
}