One Time Pay
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,
- Supported Scopes:
- API Endpoint:
POST v1/token/payments- Supported Scopes:
merchant-pci - Allowed Session Modes:
PAYMENT_WITH_WALLET,PAYMENT
- Supported Scopes:
- 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-pciscope- For guest payments, the
customerobject is not passed.
- For guest payments, the
- For
userscope,- For customer payments,
customerobject is not required, insteadx-customer-idis passed in headers - For guest payments,
x-customer-idis passed asnullin headers
- For customer payments,
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