Skip to main content
POST
/
customers
/
{customer_id}
/
payment-methods
Setup a payment method
curl --request POST \
  --url https://api.salesbricks.com/api/v2/customers/{customer_id}/payment-methods \
  --header 'X-SALESBRICKS-KEY: <api-key>'
{
  "stripe_account_id": "acct_1ABC123def456789",
  "client_secret": "seti_1ABC123def456789_secret_xyz789",
  "publishable_key": "pk_test_ABC123def456789xyz",
  "customer_session_client_secret": "cuss_1ABC123def456789_secret_xyz789"
}

Documentation Index

Fetch the complete documentation index at: https://docs.salesbricks.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

customer_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$

Response

200 - application/json

Serializer for the payment method setup response containing Stripe credentials needed to initialize payment forms.

stripe_account_id
string
required

The tenant's connected Stripe account ID

client_secret
string
required

Client secret for creating a payment intent within Stripe Elements

publishable_key
string
required

Salesbricks' platform public key for Stripe

customer_session_client_secret
string
required

Client secret for the customer session to enable payment element features