Payments
A payment is one amount owed by one payer, with its outcome.
Payments are normally created by a payment session. Use this resource to read status and card details, list payments, or create a payment ahead of a session.
The payment object
idstring
Prefixed
pay_.amountinteger
In the smallest currency unit.
currencystring
statusenum
created, processing, succeeded, failed, canceled or refunded.customerstring | null
Customer the payment belongs to.
descriptionstring | null
external_referencestring | null
Your reference, from the session or payment create call.
metadataobject
collection_methodenum | null
card, wallet or bank_invoice once known.refunded_amountinteger
Total refunded so far.
failure_reasonstring | null
Processor's reason when
status is failed.card_brandstring | null
For example
visa or mc.card_last4string | null
wallet_typestring | null
apple_pay or google_pay when a wallet was used.created_attimestamp
updated_attimestamp
Create a payment
POST/v1/paymentsSecret key
Creates a payment in status created without a checkout. Attach a session to it with the session's payment field. Most integrations skip this and let the session create the payment.
Body
amountintegerrequired
1 to 2,000,000,000 in the smallest currency unit.
currencystringdefault: ISK
customerstring
Must belong to your merchant in this mode.
descriptionstring
external_referencestring
metadataobject
curl https://api.borga.is/v1/payments \
-H "Authorization: Bearer sk_test_…" \
-H "Content-Type: application/json" \
-d '{ "amount": 12900, "currency": "ISK", "external_reference": "order_5678" }'Retrieve a payment
GET/v1/payments/:idSecret key
Node.jsts
const payment = await borga.payments.retrieve("pay_7Hs2Kq9LmW4xZc1Vb8Ny3Rt6");
console.log(payment.status); // "succeeded"
console.log(payment.card_brand, payment.card_last4); // "visa" "4242"curlbash
curl https://api.borga.is/v1/payments/pay_7Hs2Kq9LmW4xZc1Vb8Ny3Rt6 \
-H "Authorization: Bearer sk_test_…"Response
{
"id": "pay_7Hs2Kq9LmW4xZc1Vb8Ny3Rt6",
"amount": 12900,
"currency": "ISK",
"status": "succeeded",
"customer": null,
"description": null,
"metadata": { "order_id": "5678" },
"collection_method": "card",
"refunded_amount": 0,
"external_reference": "order_5678",
"failure_reason": null,
"card_brand": "visa",
"card_last4": "4242",
"wallet_type": null,
"created_at": "2026-09-07T12:03:58.201Z",
"updated_at": "2026-09-07T12:04:31.498Z"
}List payments
GET/v1/paymentsSecret key
Query parameters
statusenum
Filter by payment status.
limitintegerdefault: 25
Up to 100.
starting_afterstring
Cursor; see Pagination.
curl "https://api.borga.is/v1/payments?status=succeeded&limit=50" \
-H "Authorization: Bearer sk_test_…"