2. Initialise the Payment

Please read the instructions carefully.

Important Information

When initialising the payment the following is important:

  • The Client Id is provided by Paycorp and identifies a payment channel. A single merchant may have multiple payment channels each setup or a different purpose, so the client ID is a required field used to identify a specific payment channel.

  • The Client Reference must be unique and is used to identify each payment within the merchant's system. If a payment fails or there is a network issue the status of any payment can be determined using the client reference. It is also a required field.

  • The return URL specifies the endpoint hosted on the merchants server that will receive the HTTP redirect initiated by Paycorp after the payment has been successfully initialised. It is also a required field. Paycorp will submit an HTTP GET request to this endpoint.

Payment එක ආරම්භ කිරීම කරුණාකර පහත දී ඇති උපදෙස් හොදින් කියවන්න වැදගත් තොරතුරු - Payment එකක් ආර්ම්භ කිරීමීදී පහත සදහන් දෑ වැදගත් වේ.

1.Paycorp මගින් සපයන ලද Client id එක මගින් Payment එක යොමු වන ආකාරය හදුනා ගත හැක.එක් පරිශිලකයෙකුට Payment එක එකම අවශ්‍යතාවයකට හෝ වෙන් වෙන් අවශ්‍යතාවයන්ට යොමු කරන මාර්ග කීපයක් තිබිය හැක.එම නිසා එක් එක් Payment එක යොමුවන මාර්ගය හදුනා ගැනීමට client id එක අත්‍යවශ්‍යය.

2.පරිශීලකයකුට එක් එක් Payment එක වෙන්ව හදුනාගැනිමට Client Reference එක භාවිතා කල හැක.Payment එකක් අසමත් වූවොත් හෝ ජාලයේ ප්‍රශ්නයක් වූවොත් Payment එකේ තත්වය Client Reference එක මගින් තීරණය කල හැක.එම නිසා එයද අත්‍යවශ්‍යය.

3.පරිශීලකයාගේ Server එකේ තිබෙන Payment එකේ response එක ලබාගන්නා ගොනුව. Return Url එකට දැමිය යුතුය.එම නිසා එයද අත්‍යවශ්‍යය.Paycorp එක HTTP GET Request මෙම Return Url එකට එව්නු ඇත.

The HTTP GET request to the merchants return URL will contain the following parameters

  • Request ID: also know as a CSRF token, this is a unique value generated by Paycorp for each new payment that has been successfully initialised. It is used to confirm the payment.

  • Client reference: this value can be used by the merchant to identify the payment.

  • REQUEST ID: CSRF TOKEN ලෙසද හැඳින්වේ, මෙය සාර්ථකව ආරම්භ කර ඇති සෑම නව ගෙවීමක් සඳහා Payocorp විසින් නිපදවන සුවිශේෂී වටිනාකමකි. ගෙවීම් තහවුරු කිරීමට එය යොදා ගනී.

  • Client Refererence: ගෙවීම් හඳුනා ගැනීමට වෙළෙන්දා විසින් මෙම අගය භාවිතා කළ හැක.

Examples

<script>
  function buildPayment() {
    // Build the payment object
    return {
          clientId: 14002582,// Provided by Paycorp
          paymentAmount: 1010, // in CENTS
          currency: 'LKR',
          returnUrl: 'http://yourdomain/payment-response',
          clientRef: 'CREF-12345',
          comment: 'This is a demo payment'
    };
  }
</script>

Payment Init fields

Last updated