Skip to main content
POST
/
v1
/
customer-portal
/
customers
/
me
/
payment-methods
Add Customer Payment Method
curl --request POST \
  --url https://api.spairehq.com/v1/customer-portal/customers/me/payment-methods \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "confirmation_token_id": "<string>",
  "set_default": true,
  "return_url": "<string>"
}
'
{
  "status": "<string>",
  "payment_method": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "modified_at": "2023-11-07T05:31:56Z",
    "customer_id": "<string>",
    "type": "<string>",
    "method_metadata": {
      "brand": "<string>",
      "last4": "<string>",
      "exp_month": 123,
      "exp_year": 123,
      "wallet": "<string>"
    }
  }
}

Documentation Index

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

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

Authorizations

Authorization
string
header
required

Customer session tokens are specific tokens that are used to authenticate customers on your organization. You can create those sessions programmatically using the Create Customer Session endpoint.

Body

application/json
confirmation_token_id
string
required
set_default
boolean
required
return_url
string
required

Response

Payment method created or setup initiated.

status
string
required
Allowed value: "succeeded"
payment_method
PaymentMethodCard · object
required