Notification

Instructions for the notification process using POST

A REST service needs to be developed for consumption by Payvalida, as it serves as the communication channel for the notification process.

The notification URL is configured within our merchant module (Spanish), specifically in the account profile. You can find the detailed steps to follow here (Spanish).

When you register an order, the order its created with a PENDING (PENDIENTE) state. The order can change state depending on certain scenarios:

  1. Payment is received -> Changes from PENDING (PENDIENTE) to APPROVED (APROBADA) and its notified with an approved status.

  2. The order expires because it wasn't paid before the expiration date -> Changes from PENDING (PENDIENTE) to EXPIRED (VENCIDA) and its notified with a cancelled status.

  3. The commerce eliminates the order (Using the API) -> Changes from PENDING (PENDIENTE) to CANCELLED (CANCELADA), doesn't notify.

  4. The customer asks for a refund of the payment -> Changes from APPROVED (APROBADA) to NULLIFIED (ANULADA) and its notified with a cancelled status.

  5. The commerce asks for a refund of the payment -> Changes from APPROVED (APROBADA) to NULLIFIED (ANULADA), doesn't notify.

Name

Parameter

pv_po_id

Order ID in Payvalida

po_id

Order ID in the commerce

status

Order status

pv_checksum

Checksum encoded in SHA256(po_id + status + NOTIFICATION_HASH)

amount

Order amount

iso_currency

Currency of the order

pv_payment

Payment method of the order

The system automatically notifies when the order changes its status, but its posible to send multiple notifications of the same order. It is responsibility of the commerce to avoid delivering the acquired product more than once in case of multiple notifications.

The system registers the response that got on the notification process, it is advised to send an adequate response according to the process, for example, OK in a successful case and ERROR on an unsuccessful one, it is also recommended to attach a brief description with the response, for example: "OK. Payment registered", "ERROR. Order not recognized"

Example

curl --location --request POST 'https://url-comercio.com/notificacion/payvalida' \
--header 'Content-Type: application/json' \
--data-raw '{
    "pv_po_id":1934480,
    "po_id":"999999991",
    "status":"approved",
    "pv_checksum":"0C08309AE28D15E8D337344E88668E2047947F653B126B7F62B0EACC4B1A30FD680DBE25BD8B38413032A219B86BDAE52D9554D45A892CA4B5C5103597876EAD",
    "amount":"10500.0",
    "iso_currency":"COP",
    "pv_payment":"PSE"
}'

Last updated