KEMBAR78
Reconcile Payments | PDF | Financial Technology | Finance & Money Management
0% found this document useful (0 votes)
69 views13 pages

Reconcile Payments

Uploaded by

bonty bubli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views13 pages

Reconcile Payments

Uploaded by

bonty bubli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Reconciliation Transaction Signal

Context
How would you reconcile payments collected on Whatsapp?

How to Reconcile

● BSP
○ Generates an unique “reference_id” and passes it down as a part of order
details payload.
● BSP ⇔ WhatsApp reconciliation
○ Two options:
■ Transaction status webhook: BSP can match “reference_id” in order
details payload with “reference_id” in transaction status webhook.
■ Payments endpoint response: BSP can match “reference_id” in order
details payload with “reference_id” in payments endpoint response.
● BSP ⇔ Payment Gateway reconciliation
○ BSP uses “reference_id” in order details payload to figure out “transaction=>id”
from transaction status webhook or from payments endpoint response for the
corresponding “reference_id”.
○ BSP can match “transaction=>id” with:
■ “Razorpay Order Id” on RazorPay dashboard.
■ “Merchant Ref ID” inside payment info on PayU dashboard.

Razor Pay

Order Details Payload

{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "918921784385", => Consumer phone number
"type": "interactive",
"interactive": {
"type": "order_details",
"body": {
"text": "optional body text"
},
"footer": {
"text": "optional footer text"
},
"header": {
"type": "image",
"image": {
"link":
"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mo
bile_phone.png/1600px-Image_created_with_a_mobile_phone.png"
}
},
"action": {
"name": "review_and_pay",
"parameters": {
"reference_id": "order-detail-09128934", ⇒ Represents unique order reference id
"type": "digital-goods",
"currency": "INR",
"total_amount": {
"value": 100,
"offset": 100
},
"payment_type": "payment_gateway:razorpay", => Payment gateway
"payment_configuration": "prod-razor-pay-config-05",
"order": {
"status": "pending",
"items": [
{
"retailer_id": "legendary",
"product_id": "product-id",
"name": "awesomeness",
"amount": {
"value": 150,
"offset": 100
},
"quantity": 1,
"sale_amount": {
"value": 100,
"offset": 100
}
}
],
"subtotal": {
"value": 100,
"offset": 100
},
"tax": {
"value": 0,
"offset": 100
},
"shipping": {
"value": 0,
"offset": 100,
"description": "description"
},
"discount": {
"value": 0,
"offset": 100,
"description": "description",
"discount_program_name": "discount_program_name"
}
}
}
}
}
}

Transaction Status Webhook

{
"object": "whatsapp_business_account",
"entry": [
{
"id": "1142190992915793",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "919321669962", => Merchant bot phone number
"phone_number_id": "112840064962250"
},
"statuses": [
{
"id": "wamid.HBgMOTE4OTIxNzg0Mzg1FQIAEhgKMjM1OTYyNzA5OQA=",
"status": "captured",
"timestamp": "1704860814",
"recipient_id": "918921784385", => Consumer phone number
"type": "payment",
"payment": {
"reference_id": "order-detail-09128934", => Unique order reference id,
matches reference_id in order details payload
"amount": {
"value": 100,
"offset": 100
},
"currency": "INR",
"transaction": {
"id": "order_NMmEX4cEdGhNH8", => Unique transaction id generated
by WhatsApp. Each order will only have one successful transaction id
"type": "razorpay", => Payment gateway
"status": "captured",
"created_timestamp": 1704860812,
"updated_timestamp": 1704860812,
"amount": {
"value": 1000,
"offset": 1000
},
"currency": "INR"
}
}
}
]
},
"field": "messages"
}
]
}
]
}

Payments Endpoint Response

{
"object": "whatsapp_business_account",
"entry": [
{
"payments": [
{
"reference_id": "order-detail-09128934", => Unique order reference id, matches
reference_id in order details payload
"status": "CAPTURED",
"amount": {
"offset": 100,
"value": 100
},
"currency": "INR",
"transactions": [
{
"id": "order_NMmEX4cEdGhNH8", => Unique transaction id generated by
WhatsApp. Each order will only have one successful transaction id
"type": "razorpay", => Payment gateway
"status": "success",
"created_timestamp": 1704860812,
"updated_timestamp": 1704860812,
"amount": {
"offset": 100,
"value": 100
},
"currency": "INR"
}
]
}
]
}

RazorPay Dashboard
Payment Id => Unique payment id generated by RazorPay.
Razorpay Order Id => Unique transaction id generated by WhatsApp. Each order will only
have one successful transaction id.
PayU

Order Details Payload

{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "918921784385", => Consumer phone number
"type": "interactive",
"interactive": {
"type": "order_details",
"body": {
"text": "optional body text"
},
"footer": {
"text": "optional footer text"
},
"header": {
"type": "image",
"image": {
"link":
"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mo
bile_phone.png/1600px-Image_created_with_a_mobile_phone.png"
}
},
"action": {
"name": "review_and_pay",
"parameters": {
"reference_id": "PAYU12453090", ⇒ Represents unique order reference id
"type": "digital-goods",
"currency": "INR",
"total_amount": {
"value": 300,
"offset": 100
},
"payment_type": "payment_gateway:payu", => Payment gateway
"payment_configuration": "preview-bot-payu-config-20",
"order": {
"status": "pending",
"items": [
{
"retailer_id": "legendary",
"product_id": "product-id",
"name": "awesomeness",
"amount": {
"value": 350,
"offset": 100
},
"quantity": 1,
"sale_amount": {
"value": 300,
"offset": 100
}
}
],
"subtotal": {
"value": 300,
"offset": 100
},
"tax": {
"value": 0,
"offset": 100
},
"shipping": {
"value": 0,
"offset": 100,
"description": "description"
},
"discount": {
"value": 0,
"offset": 100,
"description": "description",
"discount_program_name": "discount_program_name"
}
}
}
}
}
}

Transaction Status Webhook

{
"object": "whatsapp_business_account",
"entry": [
{
"id": "104900746026962",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "917356306663", => Merchant bot phone number
"phone_number_id": "114030835102536"
},
"statuses": [
{
"id": "wamid.HBgMOTE4OTIxNzg0Mzg1FQIAEhgKMjUzOTI5Mjc5OQA=",
"status": "captured",
"timestamp": "1704865877",
"recipient_id": "918921784385", => Consumer phone number
"type": "payment",
"payment": {
"reference_id": "PAYU12453090", => Unique order reference id, matches
reference_id in order details payload
"amount": {
"value": 300,
"offset": 100
},
"currency": "INR",
"transaction": {
"id": "6980123395436273", => Unique transaction id generated by
WhatsApp. Each order will only have one successful transaction id
"type": "payu", => Payment gateway
"status": "captured",
"created_timestamp": 1704865875,
"updated_timestamp": 1704865875,
"amount": {
"value": 3000,
"offset": 1000
},
"currency": "INR"
},
"udf1": "PAYU12453090",
"udf2": "ABC1234",
"udf3": "whatsapp-platform",
"udf4": "udf4"
}
}
]
},
"field": "messages"
}
]
}
]
}

Payments Endpoint Response

{
"payments": [
{
"reference_id": "PAYU12453090", => Unique order reference id, matches
reference_id in order details payload
"status": "CAPTURED",
"amount": {
"offset": 100,
"value": 300
},
"currency": "INR",
"transactions": [
{
"id": "6980123395436273", => Unique transaction id generated by WhatsApp.
Each order will only have one successful transaction id
"type": "payu", => Payment gateway
"status": "success",
"created_timestamp": 1704865875,
"updated_timestamp": 1704865875,
"amount": {
"offset": 100,
"value": 300
},
"currency": "INR"
}
],
"udf1": "PAYU12453090",
"udf2": "ABC1234",
"udf3": "whatsapp-platform",
"udf4": "udf4"
}
]
}

PayU Dashboard
Transaction ID => Unique payment id generated by PayU.
Merchant Ref ID => Unique transaction id generated by WhatsApp. Each order will only
have one successful transaction id.

You might also like