A payment method represents a saved payment instrument attached to a customer. Payment methods are created when a customer completes checkout withDocumentation Index
Fetch the complete documentation index at: https://docs.borga.is/llms.txt
Use this file to discover all available pages before exploring further.
save_payment_method: true. Use these endpoints to list, retrieve, detach, or set a default method on the customer.
Supported types
| Type | Description |
|---|---|
card | Credit or debit card. |
apple_pay | Apple Pay wallet. |
google_pay | Google Pay wallet. |
bank_invoice | Bank invoice (gíróseðill). |
List payment methods
GET /v1/payment_methods
Returns a paginated list of payment methods for a customer.
Query parameters
Filter by customer ID. Recommended — without this filter the endpoint returns methods across all customers on your merchant account.
Cursor for pagination. Pass the
id of the last payment method from the previous page to retrieve the next page.Maximum number of payment methods to return per page.
Response fields
Array of payment method objects.
Whether more payment methods exist beyond this page.
Retrieve a payment method
GET /v1/payment_methods/{id}
Retrieves the details of a single payment method.
Path parameters
The ID of the payment method to retrieve.
Response fields
Unique payment method identifier.
ID of the customer this method belongs to.
Payment method type. One of
card, apple_pay, google_pay, bank_invoice.Card details. Present when
type is card, apple_pay, or google_pay.ISO 8601 timestamp of when the payment method was saved.
Detach a payment method
DELETE /v1/payment_methods/{id}
Detaches a payment method from its customer. Once detached, the method can no longer be used for future payments. This action is irreversible.
Path parameters
The ID of the payment method to detach.
Response fields
ID of the detached payment method.
Always
true on a successful detach response.Set default payment method
POST /v1/payment_methods/{id}/set_default
Sets a payment method as the default for the associated customer. The default method is used automatically for recurring charges and subscription renewals.
Path parameters
The ID of the payment method to set as default.
Response fields
Unique payment method identifier.
ID of the customer this method belongs to.
Payment method type. One of
card, apple_pay, google_pay, bank_invoice.Card details. Present when
type is card, apple_pay, or google_pay.ISO 8601 timestamp of when the payment method was saved.