Payment Method Webhook Events
This reference describes how to receive and process server-to-server webhook notifications from Codapay. These notifications keep your backend synchronized with the transaction status as a user progresses through the payment flow.
Overview
Codapay uses webhooks to notify your "Complete Notification URL" whenever a transaction reaches a final state or a critical milestone.
Event Types
For Codapay integrations, your endpoint should be prepared to handle the following eventType values:
Notification Payload Structure
Notifications are sent as a POST request with a JSON body. Each type of notification has a specific structure and content.
Payment Method Notifications
eventType
string
The specific event type being reported (e.g., PAYMENT_METHOD_ADDED)
timestamp
string
The timestamp of when the event occurred
shopper
object
An object containing shopper details such as ID, email, or partner-specific identifiers.
paymentMethod
object
Information regarding the payment instrument used (e.g., token, card type, last four digits).
PAYMENT_METHOD_ADDED
This notification is sent when a new card is successfully saved and linked to the shopper profile.
Notification Payload
Responding to Notifications
To acknowledge receipt of the notification, your server must respond with a 200 OK and the following JSON body:
Retry Policy If no valid response is received, Codapay will re-send the notification 3 times at 5-minute intervals. If all attempts fail, an email alert will be triggered to your technical contact.
Last updated
Was this helpful?