For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhook Notifications

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.

Ensure your "Complete Notification URL" is configured in the Publisher Portal. Refer to the Set up payments guide for detailed instructions.

Event Types

For Codapay integrations, your endpoint should be prepared to handle the following eventType values:

Event Type
Type
Description

SHOPPER_CREATED

A new shopper profile is created.

PAYMENT_METHOD_ADDED

The shopper successfully saved a new payment method.

PAYMENT_METHOD_REMOVED

The shopper removed a saved payment method.

CHARGE_SUCCESSFUL

The payment transaction is successfully completed.

CHARGE_FAILED

The payment transaction failed

AUTHORIZATION_SUCCESSFUL

The user successfully authorized the transaction (e.g., 3DS).

AUTHORIZATION_FAILED

The user failed authorized or the bank denied the request.

CAPTURE_INITIATED

The system has started the process of capturing the authorized funds.

CAPTURE_SUCCESSFUL

The funds have been successfully captured. Transaction is complete.

CAPTURE_FAILED

The capture process failed after a successful authorization.

Notification Payload Structure

Notifications are sent as a POST request with a JSON body. Each type of notification has a specific structure and content.

Transaction Notifications

Field
Type
Description

eventType

string

The specific event type being reported (e.g., CAPTURE_SUCCESSFUL)

txnId

string

The unique transaction ID generated by Coda

orderId

string

The merchant-side unique identifier for the order

checksum

string

A security hash used to verify that the notification payload has not been tampered with

chargedAt

string

Timestamp indicating when the transaction was processed.

amountValue

decimal

The final amount charged to the user in the billing currency

amountCurrency

string

The ISO 4217 currency code for the charged amount (e.g., PHP)

originalValue

decimal

The original price of the item before any currency conversions

originalCurrency

string

The ISO 4217 currency code for the original price

resultCode

integer

Status code of the transaction. 0 indicates success; other values indicate errors.

resultDesc

string

A human-readable description of the transaction result.

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., card type, last four digits).

transactionData

object

A flexible object containing supplementary metadata specific to the transaction or payment channel.

Successful Notification Example

Failed Notification Example

When an event like AUTHORIZATION_FAILED or CAPTURE_FAILED occurs, the resultCode will contain a non-zero value.

You can find the full list of error codes and their meanings is available here.

Shopper Notifications

Field
Type
Description

eventType

string

The specific event type being reported (e.g., SHOPPER_CREATED)

shopperId

string

The unique shopper ID generated by Coda

checksum

string

A security hash used to verify that the notification payload has not been tampered with

partnerShopperId

string

The merchant-side unique identifier for the shopper

status

string

The status of the shopperId

shopperInformation

object

Additional information about the shopper

Notification Example

Payment Method Notifications

Field
Type
Description

eventType

string

The specific event type being reported (e.g., SHOPPER_CREATED)

timestamp

string

The timestamp of when the event occurred

checksum

string

A security hash used to verify that the notification payload has not been tampered with

status

string

The status of the link between the shopperId and the payment method

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).

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?