Payments
Create and inspect payments, list payment history, and build / submit the signed transaction that settles a payment.
Create payment
https://api.gobtcpay.com/public/api/v1.2/pos/transaction/create-paymentCreates a payment request for a POS terminal. Specify the amount and currency; the response includes the satoshi amount, the BTC price snapshot, an expiresAt deadline, and a qrString to present to the payer. signature and ts may be supplied for request signing.
Authorization: merchantAuth
Body required
application/jsonposTerminalIdstringrequiredPOS terminal that accepts the payment (from Create POS terminal).
3fa85f64-5717-4562-b3fc-2c963f66afa6amountnumberAmount to charge, in the selected fiat currency.
10descriptionstringOptional description shown to the payer.
Order #1024currencystringrequiredFiat currency code (ISO 4217), e.g. USD.
USDmetadataanyInternal system metadata attached to the payment (reserved; not set by clients).
ttlSecondsnumberOptional lifetime of the payment in seconds; after this it expires.
900externalIdstringMerchant's own correlation id (e.g. order / invoice id). Unique per merchant, so reusing it makes create-payment idempotent. Echoed back in payment responses and webhook deliveries.
3fa85f64-5717-4562-b3fc-2c963f66afa6signaturestringrequiredOptional HMAC-SHA256 signature of the request (hex), authenticating the POS terminal with its apiKey.
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7a…tsnumberrequiredRequest timestamp in milliseconds, used together with signature for replay protection.
1718012345000Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/pos/transaction/create-payment" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"amount": 10,
"description": "Order #1024",
"currency": "USD",
"metadata": {},
"ttlSeconds": 900,
"externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"signature": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"ts": 1718012345000
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"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",
"amountSats": "string",
"currency": "USD",
"currencySymbol": "$",
"amount": 10,
"expiresAt": 1718012345,
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"checkoutUrl": "string",
"version": 0,
"btcAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"qrString": "bitcoin:bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq?amount=0.0005"
}
}
}Get payment
https://api.gobtcpay.com/public/api/v1.2/pos/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: merchantAuth
Body required
application/jsonpaymentIdstringrequiredTransaction (payment) identifier, the paymentId returned by Create payment.
3fa85f64-5717-4562-b3fc-2c963f66afa6signaturestringrequiredSignature in hex format sha 256
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7a…tsnumberrequiredTimestamp in milliseconds
1718012345000Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/pos/transaction/get-payment" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"signature": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"ts": 1718012345000
}'{
"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
}
}
}List payments
https://api.gobtcpay.com/public/api/v1.2/pos/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: merchantAuth
Body required
application/jsonpaginationobjectfiltersobjectposTerminalIdstringrequiredIdentifier of the POS terminal (UUID).
3fa85f64-5717-4562-b3fc-2c963f66afa6signaturestringrequiredSignature in hex format sha 256
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7a…tsnumberrequiredTimestamp in milliseconds
1718012345000Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/pos/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": [
"initiated"
]
},
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"signature": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"ts": 1718012345000
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"items": [
{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"amount": 10,
"amountSats": "string",
"currency": "USD",
"currencySymbol": "$",
"description": "Order #1024",
"metadata": {},
"network": "mainnet",
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": 1718012345,
"expiresAt": 1718012345,
"btcAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchantName": "Satoshi Coffee",
"merchantDisplayName": "Satoshi Coffee",
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"posTerminalLabel": "Front desk",
"posTerminalLocation": "Lisbon, PT"
}
],
"totalCount": 0
}
}
}Create payment
https://api.gobtcpay.com/public/api/v1.2/merchant/payment/createCreates a payment from the merchant cabinet. Authorization is the merchant bearer token, no posTerminalId or signature is sent: the payment is booked on the merchant's system POS (created lazily on first use). Specify the amount and currency; the response includes the satoshi amount, the BTC price snapshot, an expiresAt deadline, and a qrString to present to the payer. Pass an optional externalId (your order / invoice id) to make the call idempotent.
Authorization: merchantAuth
Body required
application/jsonamountnumberrequiredAmount in the payment's fiat currency.
10currencystringrequiredFiat currency code (ISO 4217), e.g. USD.
USDdescriptionstringHuman-readable description.
Order #1024externalIdstring3fa85f64-5717-4562-b3fc-2c963f66afa6ttlSecondsnumber900Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/merchant/payment/create" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"amount": 10,
"currency": "USD",
"description": "Order #1024",
"externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ttlSeconds": 900
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"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",
"amountSats": "string",
"currency": "USD",
"currencySymbol": "$",
"amount": 10,
"expiresAt": 1718012345,
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"checkoutUrl": "string",
"version": 0,
"btcAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"qrString": "bitcoin:bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq?amount=0.0005"
}
}
}Get payment
https://api.gobtcpay.com/public/api/v1.2/merchant/payment/getReturns the current state of a payment by paymentId, including its status, amounts, merchant / POS details, and qrString. This endpoint requires no authorization, so the payer can poll it directly to track a payment until it is paid or expired.
Body required
application/jsonpaymentIdstringrequiredIdentifier of the payment (UUID).
3fa85f64-5717-4562-b3fc-2c963f66afa6Responses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/merchant/payment/get" \
-H "Content-Type: application/json" \
-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
}
}
}List payments
https://api.gobtcpay.com/public/api/v1.2/merchant/payment/listReturns a paginated list of the merchant's payments (the payment entity, not the on-chain transaction), scoped to the authenticated merchant. Supports optional dateRange, status, storeIds, posIds, currency, externalId and system filters. For the report of already-paid transactions use /merchant/reports/transactions.
Authorization: merchantAuth
Body required
application/jsonpaginationobjectfiltersobjectResponses
idstringrequired3fa85f64-5717-4562-b3fc-2c963f66afa6resultobjectrequiredcurl -X POST "$BASE_URL/merchant/payment/list" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"pagination": {
"limit": 20,
"skip": 0
},
"filters": {
"dateRange": {
"start": 1718012345,
"end": 1718012345
},
"storeIds": [
"string"
],
"posIds": [
"string"
],
"status": [
"initiated"
],
"externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"currency": "USD",
"system": true,
"paymentIds": [
"string"
]
}
}'{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"result": {
"$case": "success",
"success": {
"items": [
{
"paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "initiated",
"amount": 10,
"amountSats": "string",
"currency": "USD",
"currencySymbol": "$",
"description": "Order #1024",
"metadata": {},
"network": "mainnet",
"btcPriceInUsd": 65000,
"btcPriceInCurrency": 65000,
"externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"createdAt": 1718012345,
"expiresAt": 1718012345,
"btcAddress": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"storeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"posTerminalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"posTerminalLabel": "Front desk",
"posTerminalLocation": "Lisbon, PT",
"settlement": {
"settledAt": null,
"status": null,
"platformFeeSats": null,
"netSats": null,
"payout": null
}
}
],
"totalCount": 0
}
}
}