Checking access…

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

One Time Pay

When to use this page

If you need to implement One Time Pay through the CCG API, use this page.

The One Time Payment API allows merchants to process a single payment for a customer using a card. This API supports both saving the payment method and processing the payment in a single request.

Quick Reference
  • API Endpoint: POST v1/payments
    • Supported Scopes: user,
  • API Endpoint: POST v1/token/payments
    • Supported Scopes: merchant-pci
    • Allowed Session Modes: PAYMENT_WITH_WALLET, PAYMENT
  • Key Fields: amount, customer, paymentMethod, paymentType, authorizeCard, partialAuthorization, merchantTransactionId, agent, consent
  • Behavior:
    • Processes a one-time payment for a customer and guest
    • Supports healthcare and vision payment details
  • Error Codes: Refer to Payment Error Codes

Handling One Time Payment​

  • Process a single payment for a customer and guest user
  • 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
    • For guest payments, the customer object is not passed.
  • For user scope,
    • For customer payments, customer object is not required, instead x-customer-id is passed in headers
    • For guest payments, x-customer-id is passed as null in headers

Sample Request​

Card​

Sample Request – One Time Payment (Card)
{
"amount": 1,
"customer": {
// customer details
},
"paymentDetails": {
// payement details
},
"paymentMethod": {
"type": "CARD",
"vendorPaymentMethodId": "string",
"vendor": "STRIPE",
"savePaymentMethod": false,
"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 – One Time Payment (Bank Account)
{
"amount": 1,
"customer": {
// customer details
},
"paymentDetails": {
// payement details
},
"paymentMethod": {
"type": "BANK_ACCOUNT",
"vendor": "STRIPE",
"savePaymentMethod": false,
"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