Skip to main content
Version: v1

Pay with Stored card

The Pay with Payment Method ID API allows merchants to process a payment using an existing saved payment method by referencing its paymentMethodId. This is useful for returning users who have already saved their payment methods.

Quick Reference
  • API Endpoint: POST v1/payments
    • Supported Scopes: user, merchant
  • Allowed Session Modes: PAYMENT_WITH_WALLET
  • Key Fields: amount, customer, paymentMethod, paymentMethodId, authorizeCard, partialAuthorization, merchantTransactionId, agent, consent
  • Behavior:
    • Processes a payment using a saved payment method by ID
    • Supports healthcare and vision payment details
  • Error Codes: Refer to Payment Error Codes

Handling Pay with Payment Method ID

  • Process a payment for a customer using a previously saved payment method
  • Applicable only for authenticated users with payment method in thier wallet
  • Supports additional healthcare and vision payment details
Key Points
  • For merchant scope, the customer object must be provided.
  • For customer payments, customer object is not required, instead x-customer-id is passed in headers
  • Guest payments are not supported for Pay with Wallet.

Sample Request

Card

Sample Request – Pay with Payment Method ID (Card)
{
"amount": 1,
"customer": {
// customer details
},
"paymentDetails": {
// payement details
},
"paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
"metadata": {
"property1": "string",
"property2": "string"
},
"authorizeCard": false,
"partialAuthorization": false,
"paymentDescription": "string",
"merchantTransactionId": "string",
"statementDescriptorSuffix": "string",
"agent": {
// agent details
}
}

Bank Account

Sample Request – Pay with Payment Method ID (Bank Account)
{
"amount": 1,
"customer": {
// customer details
},
"paymentDetails": {
// payement details
},
"paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
"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