Payment Integrations
PayU Payments-
Sinch India APIs provide pre-built integrations with PayU Payment Gateway. To support it, a separate Payload attributes need to be provided in the metadata object. The details for the same is mentioned below:
Online Method of Payment
S.No | Field | Required | Description |
---|---|---|---|
1 | subAmount | Yes | This parameter must contain the payment amount. The value must be greater than 1. |
2 | description | Yes | This parameter must contain the description or purpose of creating the payment link. |
3 | source | Yes | Default value- API. |
4 | customer.phone | No | This field contains the customer name for whom the payment link is created. |
5 | customer.email | No | This field contains the customer email to which the created payment link is sent. |
6 | udf | No | This parameter can contain upto five user-defined fields, which merchant can pass any value of his/her relevance. |
Payload
{
"messages": [
{
"sender": "9180XXXXXXXX",
"to": "9181XXXXXXX",
"messageId": "",
"transactionId": "",
"channel": "wa",
"type": "template",
"template": {
"body": [
{
"type": "text",
"text": "1"
}
],
"templateId": "abcd",
"langCode": "en",
"buttons": [
{
"index": "0",
"subType": "callToAction",
"parameters": {
"type": "text",
"text": "/"
}
}
]
},
"metadata": {
"type": "payuPay",
"task": "API",
"merchantId": "823XXXX",
"data": {
"subAmount": 1,
"description": "Purchase of Items",
"source": "API",
"customer": {
"phone": "918147XXXXXX",
"email": "abc@xxx.com"
},
"udf": {
"udf1": "918147XXXXXX"
}
}
},
"encryptedFields": []
}
],
"responseType": "json"
}
UPI Method of Payment
S.No | Field | Required | Description |
---|---|---|---|
1 | transactionId | Yes | This must contain the merchant transaction identifier. |
2 | transaction Amount | Yes | This must contain the amount for which QR needs to be generated. This must be greater than or equal to 1.00. |
Payload
{
"messages": [
{
"sender": "9180XXXXXXXX",
"to": "9181XXXXXXX",
"messageId": "",
"transactionId": "",
"channel": "wa",
"type": "template",
"template": {
"body": [
{
"type": "text",
"text": "1"
}
],
"templateId": "abcd",
"langCode": "en",
"buttons": [
{
"index": "0",
"subType": "callToAction",
"parameters": {
"type": "text",
"text": "/"
}
}
]
},
"metadata": {
"type": "payuPay",
"task": "API",
"merchantId": "823XXXX",
"data": {
"transactionId": "22Xx2xbQSSjh891d6ss710ss2102D",
"transactionAmount": "1",
"txnNote": "test payment",
"name": "Test"
},
"longUrl": "www.aclxxx.com/pid123"
}
}
],
"responseType": "json"
}