Payment Profiles

Clients can have one or more payment profiles. Creating a payment profile for a client requires that your account has Payment Integration set up with Stripe. Clientary will use the payment gateway backend to store your clients' credit card information securely.

Get Payment Profiles for Client

GET /api/v2/clients/:client_id/payment_profiles
{
  "page_count": 1,
  "page_size": 1,
  "total_count": 1,
  "payment_profiles": [
    {
      "address": null,
      "city": null,
      "name": "Bob Smith",
      "created_at": "2012-02-08T21:38:01-08:00",
      "expiration_date": "2013-12-31",
      "zip": null,
      "country": null,
      "updated_at": "2012-02-08T21:38:01-08:00",
      "id": 2,
      "client_id": 4,
      "gateway": "stripe",
      "state": null,
      "gateway_token": "cus_3IZ2SzDl5AkAB4"
    }
  ]
}

Create A Payment Profile (From Existing Stripe Data)

POST /api/v2/clients/:client_id/payment_profiles

Payment Profiles can be created using existing Stripe IDs, which prevents from having to send credit card details to Clientary.

{
  "stripe_payment_profile": {
    "stripe_customer_id": "123",
    "stripe_source_id": "567",
    "last_four_digits": "1234",
    "name": "Bob Smith",
    "expiration_date": "2020-01-30",
    "card_type": "Visa",
    "address": "123 Main St",
    "city": "Mainville",
    "zip": "10001",
    "state": "New York",
    "country": "USA"
  }
}

Required Fields: stripe_payment_profile[stripe_customer_id], stripe_payment_profile[stripe_source_id], stripe_payment_profile[last_four_digits], stripe_payment_profile[name], stripe_payment_profile[expiration_date] (HTTP 422 on failure)
Other Requirements: have payment integration enabled with Stripe (HTTP 422 on failure)

Delete A Payment Profile

DELETE /api/v2/clients/:client_id/payment_profiles/:id