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 either Stripe or Authorize.Net with CIM. Ronin will use the payment gateway backend to store your clients' credit card information securely.

Get Payment Profiles for Client

GET /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

POST /clients/:client_id/payment_profiles
{
  "credit_card": {
    "first_name": "Bob",
    "last_name": "Smith",
    "number": "4111111111111111",
    "month": "12",
    "year": "2021"
  },
  "payment_profile": {
    "address": "123 Main St",
    "city": "Mainville",
    "zip": "10001",
    "state": "New York",
    "country": "USA"
  }
}

Required Fields: credit_card[number], credit_card[month], credit_card[year] (HTTP 422 on failure)
Other Requirements: have payment integration enabled with Stripe or Authorize.Net with CIM (HTTP 422 on failure) Stripe Note: If you are using Stripe, the following parameters must be provided:
credit_card[stripe_token] - the credit card token from Stripe.js or Stripe Elements representing the card information.
credit_card[stripe_card_last4] - the last 4 digits of the card from Stripe.js or Stripe Elements.
credit_card[stripe_card_brand] - the brand of the card from Stripe.js or Stripe Elements, for example "Visa", "MasterCard", etc.

Delete A Payment Profile

DELETE /clients/:client_id/payment_profiles/:id