Checking access…

Skip to main content
Version: v1
Audience: Consumers, CCG Platform Engineers

Pay and Store

When to use this page

If you need to implement Pay and Store through the CCG API, use this page.

The Pay and Save API allows authenticated users to process a payment and save the payment method in a single request. Guest payments are not supported; only authenticated users can use this API.

Quick Reference
  • API Endpoint: POST v1/payments
    • Supported Scopes: user
    • Allowed Session Modes: PAYMENT_WITH_WALLET, PAYMENT
  • API Endpoint: POST v1/token/payments
    • Supported Scopes: merchant-pci
  • Key Fields: amount, customer, paymentMethod, authorizeCard, partialAuthorization, merchantTransactionId, agent, consent
  • Behavior:
    • Processes a payment and saves the payment method for future use
    • Only available for authenticated users (not guests)
    • Supports healthcare and vision payment details
  • Error Codes: Refer to Payment Error Codes

Handling Pay and Save​

  • Process a payment and save the payment method for future transactions
  • Only available for authenticated users (guests not supported)
  • If customer not found, creates a new profile and links the payment method
  • If customer found, associates payment method with existing profile
  • Supports additional healthcare and vision payment details
Key Points
  • For merchant-pci scope, the customer object must be provided.
  • For customer payments, customer object is not required, instead x-customer-id is passed in headers

Sample Request​

Card​

Sample Request – Pay and Save (Card)
{
"amount": 1,
"customer": {
// customer details
},
"paymentDetails": {
// payement details
},
"paymentMethod": {
"type": "CARD",
"vendorPaymentMethodId": "string",
"vendor": "STRIPE",
"savePaymentMethod": true,
"default": true,
"nickname": "string",
"nameOnCard": "string",
"sourceProvider": {
"name": "CCG"
},
"paymentMethodDetails": {
"type": "CARD",
"nameOnCard": "string"
}
},
"metadata": {
"property1": "string",
"property2": "string"
},
"authorizeCard": false,
"partialAuthorization": false,
"paymentDescription": "string",
"merchantTransactionId": "string",
"statementDescriptorSuffix": "string",
"agent": {
// agent details
}
}

Bank Account​

Sample Request – Pay and Save (Bank Account)
{
"amount": 1,
"customer": {
// customer details
},
"paymentDetails": {
// payment details
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"vendor": "STRIPE",
"savePaymentMethod": true,
"default": true,
"nickname": "string",
"sourceProvider": {
"name": "CCG"
},
"paymentMethodDetails": {
"type": "BANK_ACCOUNT",
"nameOnAccount": "string",
"accountType": "checking",
"routingNumber": "string",
"accountNumber": "string"
}
},
"metadata": {
"property1": "string",
"property2": "string"
},
"paymentDescription": "string",
"merchantTransactionId": "string",
"statementDescriptorSuffix": "string",
"agent": {
// agent details
},
"consent": {
"merchantConsentId": "string",
"merchantConsentText": "string",
"collectionTimestamp": "string",
"collectionDetails": {
"type": "WEB",
"web": {
"ipAddress": "string",
"userAgent": "string"
},
"tel": {
"inboundPhoneNumber": {
"countryCode": "string",
"number": "string"
}
}
}
}
}

Error Handling​

Refer to Payment Error Codes