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 /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" } ] }
POST /clients/:client_id/payment_profiles
This endpoint is deprecated and may be removed from the supported endpoints list in the future.
{ "credit_card": { "first_name": "Bob", "last_name": "Smith", "number": "4111111111111111", "month": "12", "year": "2024" }, "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.
POST /api/v2/clients/:client_id/payment_profiles
Payment Profiles can also be created using existing Stripe IDs, which prevents from having to send credit card details to Ronin. This is the preferred payment profile creation endpoint.
{ "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 /clients/:client_id/payment_profiles/:id