{"info":{"_postman_id":"86f1df53-cdee-4f88-8161-dc88bfd4ee6e","name":"Pesapal API 3.0 original","description":"<html><head></head><body><p>Welcome to Pesapal API 3.0. Getting started with Pesapal is quick and easy!</p>\n<p>In this release, you will learn how to use our API endpoints to access Pesapal services. Our APIs are built on REST(Representational State Transfer) thus our data entities are represented as HTTP resources and are accessed using HTTP verbs GET and POST. Requests and responses are JSON encoded.</p>\n<p>Find information about integrating your website with Pesapal. This documentation includes sample codes for each API we have.</p>\n<p><strong>Base URLs</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Environment</th>\n<th>URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Sandbox</td>\n<td><a href=\"https://cybqa.pesapal.com/pesapalv3\">https://cybqa.pesapal.com/pesapalv3</a></td>\n</tr>\n<tr>\n<td>Live</td>\n<td><a href=\"https://pay.pesapal.com/v3\">https://pay.pesapal.com/v3</a></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Error Object</strong></p>\n<p>In case an error occurs during any API call, Pesapal will respond with a json string in the following format;</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"error\":{\n        \"type\": \"error_type\",\n        \"code\": \"response_code\",\n        \"message\": \"Detailed error message goes here..\"\n    }\n}\n\n</code></pre></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6715320","collectionId":"86f1df53-cdee-4f88-8161-dc88bfd4ee6e","publishedId":"UyxepTv1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-10-24T08:04:22.000Z"},"item":[{"name":"Iframe3","item":[{"name":"Authentication","id":"db9b2776-c795-485c-a6cf-9ecb15fc8c71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"consumer_key\": \"{{consumer_key_ke}}\",\r\n  \"consumer_secret\": \"{{consumer_secret_ke}}\"\r\n}"},"url":"{{protocol}}{{api-host}}{{api-url}}Auth/RequestToken","description":"<p>Pesapal's API Authentication requests are done via a <strong>POST</strong> request.</p>\n<p>Your Pesapal merchant <strong>consumer_key</strong> and <strong>consumer_secret</strong> will be used to generate an <strong>access token</strong>. This access token is valid for a maximum period of <strong>5 minutes.</strong> Use this token (sent as a Bearer Token) to access all other Pesapal API 3.0 endpoints.</p>\n<p>The URL to the API service is either:</p>\n<ul>\n<li><strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/Auth/RequestToken\">https://cybqa.pesapal.com/pesapalv3/api/Auth/RequestToken</a></li>\n<li><strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/Auth/RequestToken\">https://pay.pesapal.com/v3/api/Auth/RequestToken</a></li>\n</ul>\n<h3 id=\"http-request-headers\">HTTP request headers</h3>\n<p><strong>Accept :</strong> The response format, which is required for operations with a response body.<br /><strong>Content-Type :</strong> The request format, which is required for operations with a request body.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td>Should be set to <code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td>Should be set to <code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-parameters\">Request Parameters</h3>\n<p>Your live/production <strong>consumer_key</strong> and <strong>consumer_secret</strong> will be sent to your merchant email on opening a business/merchant account.</p>\n<p>Please click <a href=\"https://www.pesapal.com/dashboard/account/register\">here</a> to open a live/production business account.</p>\n<blockquote>\n<p>Click <a href=\"https://developer.pesapal.com/api3-demo-keys.txt\">here</a> for some test credentials to use while connecting to our <strong>demo/sandbox</strong> API. </p>\n</blockquote>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>consumer_key</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>The consumer_key parameter must be set to <code>merchant consumer_key</code></td>\n</tr>\n<tr>\n<td>consumer_secret</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>The consumer_secret parameter must be set to <code>merchant consumer_secret</code></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\">Sample Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"consumer_key\":\"xxxxx\",\n    \"consumer_secret\":\"xxxxxx\"\n}\n\n</code></pre>\n<h3 id=\"response-parameters\">Response Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>token</td>\n<td>String</td>\n<td>The access token string as issued by the server. The access token issued will have permission to invoke all Pesapa API operations.</td>\n</tr>\n<tr>\n<td>expiryDate</td>\n<td>String</td>\n<td>Date and time the token will expire. The access token usually expires after 5mins - <code>UTC</code></td>\n</tr>\n<tr>\n<td>error</td>\n<td>Object</td>\n<td>Error object</td>\n</tr>\n<tr>\n<td>status</td>\n<td>String</td>\n<td>Response code</td>\n</tr>\n<tr>\n<td>message</td>\n<td>String</td>\n<td>A brief description about the response received.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiZWQ2MTkwMGYtZGNiMy00NjM2LWIxNGUtY2U1MGQwYzk2M2I1IiwidWlkIjoicWtpbzFCR0dZQVhUdTJKT2ZtN1hTWE5ydW9ac3JxRVciLCJuYmYiOjE2Mjk5NzczNzAsImV4cCI6MTYyOTk4MDk3MCwiaWF0IjoxNjI5OTc3MzcwLCJpc3MiOiJodHRwOi8vY3licWEucGVzYXBhbC5jb20vIiwiYXVkIjoiaHR0cDovL2N5YnFhLnBlc2FwYWwuY29tLyJ9.WGl2uJ68EhEdfrjM1iDveKmSDwO9du0CN9e0j8NtOq4\",\n    \"expiryDate\": \"2021-08-26T12:29:30.5177702Z\",\n    \"error\": null,\n    \"status\": \"200\",\n    \"message\": \"Request processed successfully\"\n}\n\n</code></pre>\n","urlObject":{"path":["RequestToken"],"host":["{{protocol}}{{api-host}}{{api-url}}Auth"],"query":[],"variable":[]}},"response":[],"_postman_id":"db9b2776-c795-485c-a6cf-9ecb15fc8c71"},{"name":"RegisterIPNURL","id":"cc6f853e-0802-4b0d-b8b8-17ed90308189","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"url\": \"\",\r\n    \"ipn_notification_type\": \"GET\" //OR POST\r\n}"},"url":"{{protocol}}{{api-host}}{{api-url}}URLSetup/RegisterIPN","description":"<p><strong>IPN</strong> stands for <strong>Instant Payment Notification</strong>. When a payment is made against a transaction, Pesapal will trigger an <strong>IPN</strong> call to the notification URL related to this transaction. This notification URL is usually located on your servers. These notifications allows you to be alerted in <strong>real time</strong> whenever there is a status change for any transaction.</p>\n<p>An <strong>IPN</strong> is particular important as it allows you to be notified incase the following happens:</p>\n<ul>\n<li><p>Your client gets disconnected after payment due to internet issues</p>\n</li>\n<li><p>Your client experiences server errors hence Pesapal and your application gets disconnected before callback URL is loaded.</p>\n</li>\n<li><p>Your client exits your application / closes the browser during payment.</p>\n</li>\n<li><p>The transaction is rejected.</p>\n</li>\n</ul>\n<p>As such, it's <strong>mandatory</strong> to have <strong>IPN</strong> configured to allow Pesapal to notify your servers when a status changes. It's also important to note that this IPN URL must be publicly available. In cases where you have strict server rules preventing external systems reaching your end, you must then whitelist all calls from our domain (pesapal.com). Please be informed that IP whitelisting<br />is not feasible as our IP may change without notice.</p>\n<p>Before sending <strong>Submit Order Requests</strong> to Pesapal API 3.0 you are expected to register your IPN URL. Upon registration, you receive an IPN ID which is a mandatory field (notification_id) when submitting an order request to Pesapal API 3.0. This <strong>notification_id</strong> uniquely identifies the endpoint Pesapal will send alerts to whenever a payment status changes for each transaction processed via API 3.0</p>\n<p>The URL to our IPN registration API is either:</p>\n<ul>\n<li><p><strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/URLSetup/RegisterIPN\">https://cybqa.pesapal.com/pesapalv3/api/URLSetup/RegisterIPN</a></p>\n</li>\n<li><p><strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/URLSetup/RegisterIPN\">https://pay.pesapal.com/v3/api/URLSetup/RegisterIPN</a></p>\n</li>\n</ul>\n<h3 id=\"http-request-headers\">HTTP request headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>url</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>The notification url Pesapal with send a status alert to.</td>\n</tr>\n<tr>\n<td>ipn_notification_type</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td><code>GET</code> or <code>POST</code> . This is the http request method Pesapal will use when triggering the IPN alert.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\">Sample Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"url\": \"https://www.myapplication.com/ipn\",\n    \"ipn_notification_type\": \"GET\"\n}\n\n</code></pre>\n<h3 id=\"response-parameters\">Response Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>url</td>\n<td>String</td>\n<td>The notification url Pesapal with send a status alert to.</td>\n</tr>\n<tr>\n<td>created_date</td>\n<td>String</td>\n<td>Date and time the IPN URL was registered <code>UTC</code></td>\n</tr>\n<tr>\n<td>ipn_id</td>\n<td>String</td>\n<td>A unique identifier that's liked to the IPN endpoint URL. <code>GUID</code></td>\n</tr>\n<tr>\n<td>notification_type</td>\n<td>Integer</td>\n<td></td>\n</tr>\n<tr>\n<td>ipn_notification_type_description</td>\n<td>String</td>\n<td><code>GET</code> or <code>POST</code> . This is the http request method Pesapal will use when triggering the IPN alert.</td>\n</tr>\n<tr>\n<td>ipn_status</td>\n<td>Integer</td>\n<td></td>\n</tr>\n<tr>\n<td>ipn_status_decription</td>\n<td>String</td>\n<td></td>\n</tr>\n<tr>\n<td>error</td>\n<td>Integer</td>\n<td></td>\n</tr>\n<tr>\n<td>status</td>\n<td>String</td>\n<td>Response code.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"url\": \"https://www.myapplication.com/ipn\",\n  \"created_date\": \"2022-03-03T17:29:03.7208266Z\",\n  \"ipn_id\": \"e32182ca-0983-4fa0-91bc-c3bb813ba750\",\n  \"notification_type\": 0,\n  \"ipn_notification_type_description\": \"GET\",\n  \"ipn_status\": 1,\n  \"ipn_status_decription\": \"Active\",\n  \"error\": null,\n  \"status\": \"200\"\n}\n\n</code></pre>\n<p>You can also use our online forms below to register your IPN URLs.</p>\n<ul>\n<li><p><a href=\"https://cybqa.pesapal.com/PesapalIframe/PesapalIframe3/IpnRegistration\">Sandbox/Demo IPN Registration Form</a></p>\n</li>\n<li><p><a href=\"https://pay.pesapal.com/iframe/PesapalIframe3/IpnRegistration\">Production/Live IPN Registration Form</a></p>\n</li>\n</ul>\n","urlObject":{"path":["RegisterIPN"],"host":["{{protocol}}{{api-host}}{{api-url}}URLSetup"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc6f853e-0802-4b0d-b8b8-17ed90308189"},{"name":"GetIPNList","id":"d5491782-3526-4c11-9777-93bb6b2e1616","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{protocol}}{{api-host}}{{api-url}}URLSetup/GetIpnList","description":"<p>This endpoint allows you to fetch all registered IPN URLs for a particular Pesapal merchant account.</p>\n<p>The URL to our GetIPNList API is either:</p>\n<ul>\n<li><strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/URLSetup/GetIpnList\">https://cybqa.pesapal.com/pesapalv3/api/URLSetup/GetIpnList</a></li>\n<li><strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/URLSetup/GetIpnList\">https://pay.pesapal.com/v3/api/URLSetup/GetIpnList</a></li>\n</ul>\n<h3 id=\"request\">Request</h3>\n<p>The API call is authenticated using the authorization token.</p>\n<p>No payload is required.</p>\n<h3 id=\"response-parameters\">Response Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>url</td>\n<td>String</td>\n<td>The notification url Pesapal with send a status alert to.</td>\n</tr>\n<tr>\n<td>created_date</td>\n<td>String</td>\n<td>Date and time the IPN URL was registered <code>UTC</code></td>\n</tr>\n<tr>\n<td>ipn_id</td>\n<td>String</td>\n<td>A unique identifier that's liked to the IPN endpoint URL. <code>GUID</code></td>\n</tr>\n<tr>\n<td>error</td>\n<td>Integer</td>\n<td></td>\n</tr>\n<tr>\n<td>status</td>\n<td>String</td>\n<td>Response code.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n        {\n            \"url\": \"https://www.myapplication.com/ipn\",\n            \"created_date\": \"2022-03-03T17:29:03.7208266Z\",\n            \"ipn_id\": \"e32182ca-0983-4fa0-91bc-c3bb813ba750\",\n            \"error\": null,\n            \"status\": \"200\"\n        },\n        {\n            \"url\": \"https://ipn.myapplication.com/application2\",\n            \"created_date\": \"2021-12-05T04:23:45.5509243Z\",\n            \"ipn_id\": \"c3bb813ba750-0983-4fa0-91bc-e32182ca\",\n            \"error\": null,\n            \"status\": \"200\"\n        }\n    ]\n\n</code></pre>\n","urlObject":{"path":["GetIpnList"],"host":["{{protocol}}{{api-host}}{{api-url}}URLSetup"],"query":[],"variable":[]}},"response":[],"_postman_id":"d5491782-3526-4c11-9777-93bb6b2e1616"},{"name":"SubmitOrderRequest","id":"90625f77-3a45-4baf-99d7-555a67b2c7f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"id\": \"TEST-XXX\",\r\n    \"currency\": \"KES\",\r\n    \"amount\": \"1\",\r\n    \"description\": \"Testing\",\r\n    \"callback_url\": \"https://www.google.com\",\r\n    \"notification_id\": \"2b31727d-4c75-44ed-a2be-e28906226d1c\",\r\n    \"billing_address\": {\r\n        \"email_address\": \"john@doe.com\",\r\n        \"phone_number\": \"07XXXXXXXX\",\r\n        \"country_code\": \"\",\r\n        \"first_name\": \"John\",\r\n        \"middle_name\": \"\",\r\n        \"last_name\": \"Doe\",\r\n        \"line_1\": \"\",\r\n        \"line_2\": \"\",\r\n        \"city\": \"\",\r\n        \"state\": \"\",\r\n        \"postal_code\": \"\",\r\n        \"zip_code\": \"\"\r\n    }\r\n}"},"url":"{{protocol}}{{api-host}}{{api-url}}Transactions/SubmitOrderRequest","description":"<p>Once you have received the bearer token, the next step will be the actual request to create a payment request.</p>\n<p>A good example would be a case where the customer has clicked pay now button on your website. At this point, you call the <strong>SubmitOrderRequest</strong> and in return you will get a response which contains a payment redirect URL which you then redirect the customer to or load the URL as an iframe within your site in case you don’t want to redirect the customer off your application.</p>\n<p>The payment URL will contain the payment methods presented to the customer by Pesapal. After the customer has made the payment, they will be redirected to your callback URL which you will have already provided to us as part of submit order request.</p>\n<p>The URL to our SubmitOrderRequest API is either:</p>\n<p>* <strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/Transactions/SubmitOrderRequest\">https://cybqa.pesapal.com/pesapalv3/api/Transactions/SubmitOrderRequest</a><br />* <strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/Transactions/SubmitOrderRequest\">https://pay.pesapal.com/v3/api/Transactions/SubmitOrderRequest</a></p>\n<h3 id=\"http-request-headers\">HTTP request headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>This refers to your unique merchant reference generated by your system. <code>Maximum - 50 characters</code></td>\n</tr>\n<tr>\n<td>currency</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>This represents the currency you want to charge your customers. <code>ISO Currency Codes</code></td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Float</td>\n<td><code>Required</code></td>\n<td>Amount to be processed.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>Represents the description of your order. <code>Maximum - 100 characters</code></td>\n</tr>\n<tr>\n<td>callback_url</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>A valid URL which Pesapal will redirect your clients to processing the payment.</td>\n</tr>\n<tr>\n<td>cancellation_url</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>A valid URL which Pesapal will redirect your clients to incase they click on cancel request while on the Payment link.  <br />  <br />If provided, a cancellation link will appear next to the PROCEED button.</td>\n</tr>\n<tr>\n<td>notification_id</td>\n<td>Guid</td>\n<td><code>Required</code></td>\n<td>This represents an IPN URL which Pesapal will send notifications to after payments have been processed.  <br />  <br />You are required to register all IPN URLs after which a corresponding notification_id will be generated. Please refer to the IPN URL registration endpoint.</td>\n</tr>\n<tr>\n<td>billing_address</td>\n<td>Object</td>\n<td><code>Required</code></td>\n<td>Customer Address Object</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customer-address-object\">Customer Address Object</h4>\n<p>Customer billing address details to be included as part of the SUBMIT ORDER REQUEST.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>phone_number</td>\n<td>String</td>\n<td><code>Optional if email address is provided.</code>  <br /><code>Mandatory if email address is NOT provided.</code></td>\n<td>Customer's phone number</td>\n</tr>\n<tr>\n<td>email_address</td>\n<td>String</td>\n<td><code>Optional if phone number is provided.</code>  <br /><code>Mandatory if phone number is NOT provided.</code></td>\n<td>Customer's email address</td>\n</tr>\n<tr>\n<td>country_code</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>2 characters long country code in [ISO 3166-1](<a href=\"https://en.wikipedia.org/wiki/ISO_3166-1\">https://en.wikipedia.org/wiki/ISO_3166-1</a>)</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's first name</td>\n</tr>\n<tr>\n<td>middle_name</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's middle name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's last name</td>\n</tr>\n<tr>\n<td>line_1</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's main address</td>\n</tr>\n<tr>\n<td>line_2</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's alternative address</td>\n</tr>\n<tr>\n<td>city</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's city</td>\n</tr>\n<tr>\n<td>state</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's state <code>Maximum - 3 characters</code></td>\n</tr>\n<tr>\n<td>postal_code</td>\n<td>Integer</td>\n<td><code>Optional</code></td>\n<td>Customer's postal code</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Integer</td>\n<td><code>Optional</code></td>\n<td>Customer's zip code</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\">Sample Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"AA1122-3344ZZ\",\n    \"currency\": \"KES\",\n    \"amount\": 100.00,\n    \"description\": \"Payment description goes here\",\n    \"callback_url\": \"https://www.myapplication.com/response-page\",\n    \"notification_id\": \"fe078e53-78da-4a83-aa89-e7ded5c456e6\",\n    \"billing_address\": {\n        \"email_address\": \"john.doe@example.com\",\n        \"phone_number\": \"\",\n        \"country_code\": \"KE\",\n        \"first_name\": \"John\",\n        \"middle_name\": \"\",\n        \"last_name\": \"Doe\",\n        \"line_1\": \"\",\n        \"line_2\": \"\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postal_code\": \"\",\n        \"zip_code\": \"\"\n    }\n}\n\n</code></pre>\n<p>After successfully creating the order, your response will contain a payment URL (redirect_url).</p>\n<p><strong>Status 200</strong> mean your request to process the payment has been received successfully meaning the order has been successfully created on our systems and you can now redirect your customer to make the payment.</p>\n<h3 id=\"response-parameters\">Response Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>order_tracking_id</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>merchant_reference</td>\n<td>String</td>\n<td>Your application's unique ID received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n<tr>\n<td>redirect_url</td>\n<td>String</td>\n<td>URL generated that contains the payment instructions. Redirect to this URL or load it within an iframe</td>\n</tr>\n<tr>\n<td>error</td>\n<td>Integer</td>\n<td></td>\n</tr>\n<tr>\n<td>message</td>\n<td>String</td>\n<td>Response message.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"order_tracking_id\": \"b945e4af-80a5-4ec1-8706-e03f8332fb04\",\n    \"merchant_reference\": \"TEST1515111119\",\n    \"redirect_url\": \"https://cybqa.pesapal.com/pesapaliframe/PesapalIframe3/Index/?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04\",\n    \"error\": null,\n    \"status\": \"200\"\n}\n\n</code></pre>\n<p>Redirecting your customer to this <strong>redirect_url</strong> will present them with a list of available payment methods which they can use to make the payment.</p>\n<p>You can either load this URL outside or within your website (using an Iframe). The advantage of using an iframe is that your customer will not be redirected off the site, hence a seamless payment process.</p>\n<p>Once your customer selects their preferred payment method and makes a payment, Pesapal will process the payment and redirect your customers to the callback URL which you had provided as part of the <strong>SubmitOrderRequest</strong> API call.</p>\n<h4 id=\"callback-details\">Callback Details</h4>\n<p>The following parameter will be appended to your callback URL.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OrderTrackingId</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>OrderNotificationType</td>\n<td>String</td>\n<td>Has value <strong>CALLBACKURL</strong> to represent a callback request</td>\n</tr>\n<tr>\n<td>OrderMerchantReference</td>\n<td>String</td>\n<td>Your application's unique ID received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Sample Callback URL:</strong> <a href=\"https://www.myapplication.com/response-page&amp;OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=CALLBACKURL\">https://www.myapplication.com/response-page?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=CALLBACKURL</a></p>\n<h4 id=\"ipn-details\">IPN Details</h4>\n<p>At the same time, Pesapal will send an alert to your IPN URL informing you of a status change.</p>\n<p>The IPN alert will either be a GET or POST request, depending on which HTTP method you selected when registering the IPN URL.</p>\n<p>The IPN call will have the following parameters;</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OrderTrackingId</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>OrderNotificationType</td>\n<td>String</td>\n<td>Has value <strong>IPNCHANGE</strong> to represent an IPN call.</td>\n</tr>\n<tr>\n<td>OrderMerchantReference</td>\n<td>String</td>\n<td>Your application's unique ID received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Sample IPN URL:</strong> <a href=\"https://www.myapplication.com/response-page&amp;OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=IPNCHANGE\">https://www.myapplication.com/response-page?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=IPNCHANGE</a></p>\n<p><strong>NB:</strong> The callback URL and the IPN calls will <strong>NOT</strong> have the status of the payment for security reasons. As such, you will be required to fetch the status of the payment using the <strong>GetTransactionStatus</strong> API once the callback page is loaded and when the IPN URL is triggered.</p>\n","urlObject":{"path":["SubmitOrderRequest"],"host":["{{protocol}}{{api-host}}{{api-url}}Transactions"],"query":[],"variable":[]}},"response":[],"_postman_id":"90625f77-3a45-4baf-99d7-555a67b2c7f4"},{"name":"DirectMobileMoneySTK","id":"0fcf838d-d27a-4744-8a16-4181bcc6d628","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"msisdn\": \"0723241024\",\r\n\t\"payment_method\":\"MpesaKE\",\r\n    \"id\": \"TEST-01\",\r\n    \"currency\": \"KES\",\r\n    \"amount\": \"1\",\r\n    \"description\": \"Testing\",\r\n    \"callback_url\": \"https://www.google.com\",\r\n    \"notification_id\": \"1812f9d2-36f1-4e0a-831b-dc2995b5af9e\",\r\n    \"billing_address\": {\r\n        \"email_address\": \"lazaro@pesapal.com\",\r\n        \"phone_number\": \"0738681691\",\r\n        \"country_code\": \"\",\r\n        \"first_name\": \"Otieno\",\r\n        \"middle_name\": \"\",\r\n        \"last_name\": \"Laz\",\r\n        \"line_1\": \"\",\r\n        \"line_2\": \"\",\r\n        \"city\": \"\",\r\n        \"state\": \"\",\r\n        \"postal_code\": \"\",\r\n        \"zip_code\": \"\"\r\n    }\r\n}"},"url":"{{protocol}}{{api-host}}{{api-url}}transactions/stk","description":"<p>Once you have received the bearer token, the next step will be the actual request to create a payment request.</p>\n<p>A good example would be a case where the customer has clicked pay now button on your website. At this point, you call the <strong>SubmitOrderRequest</strong> and in return you will get a response which contains a payment redirect URL which you then redirect the customer to or load the URL as an iframe within your site in case you don’t want to redirect the customer off your application.</p>\n<p>The payment URL will contain the payment methods presented to the customer by Pesapal. After the customer has made the payment, they will be redirected to your callback URL which you will have already provided to us as part of submit order request.</p>\n<p>The URL to our SubmitOrderRequest API is either:</p>\n<p>* <strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/Transactions/SubmitOrderRequest\">https://cybqa.pesapal.com/pesapalv3/api/Transactions/SubmitOrderRequest</a><br />* <strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/Transactions/SubmitOrderRequest\">https://pay.pesapal.com/v3/api/Transactions/SubmitOrderRequest</a></p>\n<h3 id=\"http-request-headers\">HTTP request headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>This refers to your unique merchant reference generated by your system. <code>Maximum - 50 characters</code></td>\n</tr>\n<tr>\n<td>currency</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>This represents the currency you want to charge your customers. <code>ISO Currency Codes</code></td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Float</td>\n<td><code>Required</code></td>\n<td>Amount to be processed.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>Represents the description of your order. <code>Maximum - 100 characters</code></td>\n</tr>\n<tr>\n<td>callback_url</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>A valid URL which Pesapal will redirect your clients to processing the payment.</td>\n</tr>\n<tr>\n<td>cancellation_url</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>A valid URL which Pesapal will redirect your clients to incase they click on cancel request while on the Payment link.  <br />  <br />If provided, a cancellation link will appear next to the PROCEED button.</td>\n</tr>\n<tr>\n<td>notification_id</td>\n<td>Guid</td>\n<td><code>Required</code></td>\n<td>This represents an IPN URL which Pesapal will send notifications to after payments have been processed.  <br />  <br />You are required to register all IPN URLs after which a corresponding notification_id will be generated. Please refer to the IPN URL registration endpoint.</td>\n</tr>\n<tr>\n<td>billing_address</td>\n<td>Object</td>\n<td><code>Required</code></td>\n<td>Customer Address Object</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"customer-address-object\">Customer Address Object</h4>\n<p>Customer billing address details to be included as part of the SUBMIT ORDER REQUEST.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>phone_number</td>\n<td>String</td>\n<td><code>Optional if email address is provided.</code>  <br /><code>Mandatory if email address is NOT provided.</code></td>\n<td>Customer's phone number</td>\n</tr>\n<tr>\n<td>email_address</td>\n<td>String</td>\n<td><code>Optional if phone number is provided.</code>  <br /><code>Mandatory if phone number is NOT provided.</code></td>\n<td>Customer's email address</td>\n</tr>\n<tr>\n<td>country_code</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>2 characters long country code in [ISO 3166-1](<a href=\"https://en.wikipedia.org/wiki/ISO_3166-1\">https://en.wikipedia.org/wiki/ISO_3166-1</a>)</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's first name</td>\n</tr>\n<tr>\n<td>middle_name</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's middle name</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's last name</td>\n</tr>\n<tr>\n<td>line_1</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's main address</td>\n</tr>\n<tr>\n<td>line_2</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's alternative address</td>\n</tr>\n<tr>\n<td>city</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's city</td>\n</tr>\n<tr>\n<td>state</td>\n<td>String</td>\n<td><code>Optional</code></td>\n<td>Customer's state <code>Maximum - 3 characters</code></td>\n</tr>\n<tr>\n<td>postal_code</td>\n<td>Integer</td>\n<td><code>Optional</code></td>\n<td>Customer's postal code</td>\n</tr>\n<tr>\n<td>zip_code</td>\n<td>Integer</td>\n<td><code>Optional</code></td>\n<td>Customer's zip code</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\">Sample Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"AA1122-3344ZZ\",\n    \"currency\": \"KES\",\n    \"amount\": 100.00,\n    \"description\": \"Payment description goes here\",\n    \"callback_url\": \"https://www.myapplication.com/response-page\",\n    \"notification_id\": \"fe078e53-78da-4a83-aa89-e7ded5c456e6\",\n    \"billing_address\": {\n        \"email_address\": \"john.doe@example.com\",\n        \"phone_number\": \"\",\n        \"country_code\": \"KE\",\n        \"first_name\": \"John\",\n        \"middle_name\": \"\",\n        \"last_name\": \"Doe\",\n        \"line_1\": \"\",\n        \"line_2\": \"\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postal_code\": \"\",\n        \"zip_code\": \"\"\n    }\n}\n\n</code></pre>\n<p>After successfully creating the order, your response will contain a payment URL (redirect_url).</p>\n<p><strong>Status 200</strong> mean your request to process the payment has been received successfully meaning the order has been successfully created on our systems and you can now redirect your customer to make the payment.</p>\n<h3 id=\"response-parameters\">Response Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>order_tracking_id</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>merchant_reference</td>\n<td>String</td>\n<td>Your application's unique ID received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n<tr>\n<td>redirect_url</td>\n<td>String</td>\n<td>URL generated that contains the payment instructions. Redirect to this URL or load it within an iframe</td>\n</tr>\n<tr>\n<td>error</td>\n<td>Integer</td>\n<td></td>\n</tr>\n<tr>\n<td>message</td>\n<td>String</td>\n<td>Response message.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"order_tracking_id\": \"b945e4af-80a5-4ec1-8706-e03f8332fb04\",\n    \"merchant_reference\": \"TEST1515111119\",\n    \"redirect_url\": \"https://cybqa.pesapal.com/pesapaliframe/PesapalIframe3/Index/?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04\",\n    \"error\": null,\n    \"status\": \"200\"\n}\n\n</code></pre>\n<p>Redirecting your customer to this <strong>redirect_url</strong> will present them with a list of available payment methods which they can use to make the payment.</p>\n<p>You can either load this URL outside or within your website (using an Iframe). The advantage of using an iframe is that your customer will not be redirected off the site, hence a seamless payment process.</p>\n<p>Once your customer selects their preferred payment method and makes a payment, Pesapal will process the payment and redirect your customers to the callback URL which you had provided as part of the <strong>SubmitOrderRequest</strong> API call.</p>\n<h4 id=\"callback-details\">Callback Details</h4>\n<p>The following parameter will be appended to your callback URL.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OrderTrackingId</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>OrderNotificationType</td>\n<td>String</td>\n<td>Has value <strong>CALLBACKURL</strong> to represent a callback request</td>\n</tr>\n<tr>\n<td>OrderMerchantReference</td>\n<td>String</td>\n<td>Your application's unique ID received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Sample Callback URL:</strong> <a href=\"https://www.myapplication.com/response-page&amp;OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=CALLBACKURL\">https://www.myapplication.com/response-page?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=CALLBACKURL</a></p>\n<h4 id=\"ipn-details\">IPN Details</h4>\n<p>At the same time, Pesapal will send an alert to your IPN URL informing you of a status change.</p>\n<p>The IPN alert will either be a GET or POST request, depending on which HTTP method you selected when registering the IPN URL.</p>\n<p>The IPN call will have the following parameters;</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OrderTrackingId</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>OrderNotificationType</td>\n<td>String</td>\n<td>Has value <strong>IPNCHANGE</strong> to represent an IPN call.</td>\n</tr>\n<tr>\n<td>OrderMerchantReference</td>\n<td>String</td>\n<td>Your application's unique ID received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Sample IPN URL:</strong> <a href=\"https://www.myapplication.com/response-page&amp;OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=IPNCHANGE\">https://www.myapplication.com/response-page?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=TEST1515111119&amp;OrderNotificationType=IPNCHANGE</a></p>\n<p><strong>NB:</strong> The callback URL and the IPN calls will <strong>NOT</strong> have the status of the payment for security reasons. As such, you will be required to fetch the status of the payment using the <strong>GetTransactionStatus</strong> API once the callback page is loaded and when the IPN URL is triggered.</p>\n","urlObject":{"path":["stk"],"host":["{{protocol}}{{api-host}}{{api-url}}transactions"],"query":[],"variable":[]}},"response":[],"_postman_id":"0fcf838d-d27a-4744-8a16-4181bcc6d628"},{"name":"GetTransactionStatus","id":"e196c778-3486-4e4c-9266-92925b96991f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{protocol}}{{api-host}}{{api-url}}GetTransactionStatus?orderTrackingId={{order-tracking-id}}","description":"<p>Once Pesapal redirect your customer to your callback URL and triggers your IPN URL, you need to check the status of the payment using the <strong>OrderTrackingId</strong>.</p>\n<p>The URL to the API service is either:</p>\n<p>* <strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapal/v3/api/Transactions/GetTransactionStatus?orderTrackingId=xxxxxxxxxxxx\">https://cybqa.pesapal.com/pesapal/v3/api/Transactions/GetTransactionStatus?orderTrackingId=xxxxxxxxxxxx</a></p>\n<p>* <strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/Transactions/GetTransactionStatus?orderTrackingId=xxxxxxxxxxxx\">https://pay.pesapal.com/v3/api/Transactions/GetTransactionStatus?orderTrackingId=xxxxxxxxxxxx</a></p>\n<p>Where <strong>xxxxxxxxxxxx</strong> represents the <strong>OrderTrackingId</strong> received as part of the callback [GET] or IPN [POST/GET] params.</p>\n<h3 id=\"http-request-headers\">HTTP request headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>type</strong></th>\n<th><strong>Required</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderTrackingId</td>\n<td>string</td>\n<td>Required</td>\n<td>Unique order id generated by Pesapal e.g 7e6b62d9-883e-440f-a63e-e1105bbfadc3. Attached as a query parameter to the getTransactionStatus endpoint to get status of your submitted order.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response-parameters\">Response Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Payment Method</td>\n<td>This refers to the payment method used by your customers to make payment. Can be through CARD, MPESA, MTN, TIGO etc.</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Amount paid by the customer.</td>\n</tr>\n<tr>\n<td>created_date</td>\n<td>Date the payment was made.</td>\n</tr>\n<tr>\n<td>confirmation_code</td>\n<td>Confirmation code received from the payment provider used.</td>\n</tr>\n<tr>\n<td>payment_status_description</td>\n<td>Contains the status of the transaction. This will include either INVALID,FAILED, COMPLETED or REVERSED.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>Description of the payment status.</td>\n</tr>\n<tr>\n<td>message</td>\n<td>The message shows if transaction request status was processed successfully or not.</td>\n</tr>\n<tr>\n<td>payment_account</td>\n<td>Masked card number or phone number used during payment.</td>\n</tr>\n<tr>\n<td>call_back_url</td>\n<td>A valid URL which Pesapal will redirect the client to after payment is made.</td>\n</tr>\n<tr>\n<td>status_code</td>\n<td>Pesapal status code representing the payment_status_description.  <br />0 - INVALID  <br />1 - COMPLETED  <br />2 - FAILED  <br />3 - REVERSED</td>\n</tr>\n<tr>\n<td>merchant_reference</td>\n<td>Your application's unique ID as received in the <strong>SubmitOrderRequest</strong> call.</td>\n</tr>\n<tr>\n<td>currency</td>\n<td>Currency the payment was made in. <strong>ISO Currency Codes</strong>.</td>\n</tr>\n<tr>\n<td>error</td>\n<td>An error object containing <strong>error_type</strong>, <strong>code</strong>, <strong>message</strong> and <strong>call_back_url</strong>.</td>\n</tr>\n<tr>\n<td>status</td>\n<td>HTTP status code as defined on RFC 2616. A status of 200 means the request was successful.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"payment_method\": \"Visa\",\n    \"amount\": 100,\n    \"created_date\": \"2022-04-30T07:41:09.763\",\n    \"confirmation_code\": \"6513008693186320103009\",\n    \"payment_status_description\": \"Failed\",\n    \"description\": \"Unable to Authorize Transaction.Kindly contact your bank for assistance\",\n    \"message\": \"Request processed successfully\",\n    \"payment_account\": \"476173**0010\",\n    \"call_back_url\": \"https://test.com/?OrderTrackingId=7e6b62d9-883e-440f-a63e-e1105bbfadc3&amp;OrderMerchantReference=1515111111\",\n    \"status_code\": 2,\n    \"merchant_reference\": \"1515111111\",\n    \"payment_status_code\": \"\",\n    \"currency\": \"KES\",\n    \"error\": {\n        \"error_type\": null,\n        \"code\": null,\n        \"message\": null,\n        \"call_back_url\": null\n    },\n    \"status\": \"200\"\n}\n\n</code></pre>\n<h4 id=\"what-next\">What Next?</h4>\n<p>Once you've received the payment details, you are then required to store the same in your system and provide services / services paid for.</p>\n<p>Your IPN endpoint should then respond to Pesapal with a json string confirming receipt of the IPN call. Part of the json string contains a <em><strong>status</strong></em> parameter that should be set as <strong>200</strong> (meaning request was received and processed) or <strong>500</strong> (meaning IPN request was received but there was an issue completing the process).</p>\n<p><strong>Sample IPN JSON Response String:</strong> {\"orderNotificationType\":\"IPNCHANGE\",\"orderTrackingId\":\"d0fa69d6-f3cd-433b-858e-df86555b86c8\",\"orderMerchantReference\":\"1515111111\",\"status\":200}</p>\n<p><strong>NB:</strong> Your callback page should not implement a json response. Instead, redirect the customer to a page on your system showing the payment details.</p>\n","urlObject":{"host":["{{protocol}}{{api-host}}{{api-url}}GetTransactionStatus"],"query":[{"key":"orderTrackingId","value":"{{order-tracking-id}}"}],"variable":[]}},"response":[],"_postman_id":"e196c778-3486-4e4c-9266-92925b96991f"},{"name":"RecurringPayments","id":"f500d792-87a5-4d60-8543-4b818a59c7c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"account_number\": \"{{account_number}}\",\r\n    \"id\": \"\",\r\n    \"currency\": \"\",\r\n    \"amount\": \"\",\r\n    \"description\": \"\",\r\n    \"callback_url\": \"\",\r\n    \"notification_id\": \"\",\r\n    \"billing_address\": {\r\n        \"email_address\": \"\",\r\n        \"phone_number\": \"\",\r\n        \"country_code\": \"\",\r\n        \"first_name\": \"\",\r\n        \"middle_name\": \"\",\r\n        \"last_name\": \"\",\r\n        \"line_1\": \"\",\r\n        \"line_2\": \"\",\r\n        \"city\": \"\",\r\n        \"state\": \"\",\r\n        \"postal_code\": \"\",\r\n        \"zip_code\": \"\"\r\n    }\r\n}"},"url":"{{protocol}}{{api-host}}{{api-url}}Transactions/SubmitOrderRequest","description":"<p>Recurring payment is a payment model where customers authorize the business to pull funds from their accounts automatically at regular intervals for the goods and services provided to them on an ongoing basis.</p>\n<p>With Pesapal's subscription based payments, customers can set automated card payments on their account where they can be debited automatically at a different set times. Examples of services one can enroll to include cable bills,cell phone bills, gym membership fees, utility bills and magazine subscriptions. These payments can be set to run an various intervals such as daily, weekly, monthly or yearly.</p>\n<h5 id=\"how-can-recurring-payments-benefit-your-business\">How can recurring payments benefit your business?</h5>\n<ul>\n<li><strong>Saves customers time:</strong> Customers no longer have to go through the payment process every time they need to make a payment.</li>\n<li><strong>Ensures prompt payment:</strong> Businesses no longer need to worry about getting paid on time. Since the payments are automated, they no longer need to send out overdue payment reminders.</li>\n<li><strong>Boosts customer loyalty:</strong> With a subscription model, businesses can form closer relationships with their customers.</li>\n<li><strong>Cash flow prediction:</strong> Businesses can easily predict their cash flow, which helps with business strategy.</li>\n<li><strong>Lowers billing and collection costs:</strong> Businesses no longer need to chase after missed payments, freeing up their time to concentrate on other elements of the business.</li>\n</ul>\n<h5 id=\"how-do-i-enable-recurring-payment-for-my-customers\">How do i enable recurring payment for my customers?</h5>\n<p>Enable our subscription based payments by passing an additional <strong>account_number</strong> field when sending data to our <strong>SubmitOrderRequest</strong> endpoint. This account_number should relate to an account number / invoice number that helps you identify the payment.</p>\n<p><strong>Note:</strong> It's critical that you get to understand all other Pesapal API 3.0 endpoints before implementing the recurring feature. Click <a href=\"https://developer.pesapal.com/how-to-integrate/api-30-json/api-reference\">here</a> to get started.</p>\n<p>In adition to the <em>SubmitOrderRequest</em> parameters, include one more param as show below.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_number</td>\n<td><code>Optional</code></td>\n<td>Customer's identification number know to your system. This can be an invoice number or an account number.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\">Sample Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"AA1122-3344ZZ\",\n    \"currency\": \"KES\",\n    \"amount\": 100.00,\n    \"description\": \"Payment description goes here\",\n    \"callback_url\": \"https://www.myapplication.com/response-page\",\n    \"notification_id\": \"fe078e53-78da-4a83-aa89-e7ded5c456e6\",\n    \"billing_address\": {\n        \"email_address\": \"john.doe@example.com\",\n        \"phone_number\": \"0723xxxxxx\",\n        \"country_code\": \"KE\",\n        \"first_name\": \"John\",\n        \"middle_name\": \"\",\n        \"last_name\": \"Doe\",\n        \"line_1\": \"Pesapal Limited\",\n        \"line_2\": \"\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postal_code\": \"\",\n        \"zip_code\": \"\"\n    },\n    \"account_number\": \"555-678\"\n}    \n\n</code></pre>\n<p>After successfully processing your request using the <em><strong>SubmitOrderRequest</strong></em> endpoint, the customer will be shown an option to opt into the recurring model on the Pesapal iframe during payment. The customer will then configure the frequency (Daily, weekly, monthly, quarterly or yearly), set a start and enddate, and finally enter an amount to be automatically deducted from their card on each payment cycle.</p>\n<img src=\"https://developer.pesapal.com/images/card_tokenization.png\" />\n\n<p>Once the customer has made a successful payment, Pesapal will automatically create a scheduled subscription on their behalf and an email alert will be sent to the provided card billing email that was used during the payment proccess, notifying them of the newly created subscription together with a link they can access a dashboard to manage their subscription.</p>\n<p>Pesapal will <strong>NOT</strong> store the customer's card details. Instead, Pesapal has implemented the card tokenization technology.</p>\n<p><strong>Credit card tokenization</strong> is the process of de-identifying sensitive cardholder data by converting it to a string of randomly generated numbers called a \"token.\" Similar to encryption, tokenization obfuscates the original data to render it unreadable to a user. Unlike encryption, however, credit card tokenization is irreversible.</p>\n<h5 id=\"is-it-possible-to-send-the-extra-subscription-parameters-frequency-amount-period-via-the-api\">Is it possible to send the extra subscription parameters (Frequency, amount, period) via the API?</h5>\n<p>Yes, in cases where your application already handles the process where the customer opts into a subscription based model from your application, Pesapal allows your to send these extra parameters via the API. This ensures that the user does not have to fill in the same details again (on your application and on the Pesapal Iframe).</p>\n<p>However, it's important to note that the customer <strong>MUST</strong> accept to enroll to your subscription on the iframe. They will however not be able to edit the subscription details on the iframe.</p>\n<p>In adition to the <strong>account_number</strong> parameter included in the <em>SubmitOrderRequest</em>, you are required to send the following parameter.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>subscription_details</td>\n<td><code>Optional</code></td>\n<td>Customer Subscription Object You can pass subscription data to Pesapal allowing a user to setup recurring payment..</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"subscription-object\">Subscription Object</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>start_date</td>\n<td>String</td>\n<td><code>Mandatory</code></td>\n<td>Your subscription's start date in the format dd-MM-yyyy e.g 24-01-2023 representing 24th Jan 2023</td>\n</tr>\n<tr>\n<td>end_date</td>\n<td>String</td>\n<td><code>Mandatory</code></td>\n<td>Your subscription's end date in the format dd-MM-yyyy e.g 31-12-2023 represeting 31st Dec 2023</td>\n</tr>\n<tr>\n<td>frequency</td>\n<td>String</td>\n<td><code>Mandatory</code></td>\n<td>The period billed to the account is set out in the user contract. For instance, if users subscribe to a monthly service. Accepted values include DAILY, WEEKLY, MONTHLY or YEARLY</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request-1\">Sample Request</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": \"AA1122-3344ZZ\",\n    \"currency\": \"KES\",\n    \"amount\": 100.00,\n    \"description\": \"Payment description goes here\",\n    \"callback_url\": \"https://www.myapplication.com/response-page\",\n    \"notification_id\": \"fe078e53-78da-4a83-aa89-e7ded5c456e6\",\n    \"billing_address\": {\n        \"email_address\": \"john.doe@example.com\",\n        \"phone_number\": \"0723xxxxxx\",\n        \"country_code\": \"KE\",\n        \"first_name\": \"John\",\n        \"middle_name\": \"\",\n        \"last_name\": \"Doe\",\n        \"line_1\": \"Pesapal Limited\",\n        \"line_2\": \"\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postal_code\": \"\",\n        \"zip_code\": \"\"\n    },\n    \"account_number\": \"555-678\",\n    \"subscription_details\": {\n        \"start_date\": \"24-01-2023\",\n        \"end_date\": \"31-12-2023\",\n        \"frequency\": \"DAILY\"\n    }\n}    \n\n</code></pre>\n<p>After successfully processing your request using the <em>SubmitOrderRequest</em> endpoint, the customer will be shown an option to opt into the recurring model on the Pesapal iframe during payment. The iframe will this time load without he options to re-select the Frequecy, period and dates.</p>\n<img src=\"https://developer.pesapal.com/images/subscriptions.png\" />\n\n<h5 id=\"can-a-customer-opt-out-of-recurring-payments-before-the-end-date\">Can a customer opt out of recurring payments before the end date?</h5>\n<p>Yes, customers have the right to cancel their subscription at anytime. Pesapal will send them email alerts a day or two prior to charging their cards. This ensures customers are always aware of all upcoming charges giving them the freedom to opt out or pausing their subscriptions.</p>\n<h5 id=\"which-cards-are-currently-supported\">Which cards are currently supported?</h5>\n<p>We currently support <strong>Visa</strong> and <strong>MasterCard</strong> for recurring payments. More card options will be enabled in the near future.</p>\n<h5 id=\"how-will-pesapal-alert-my-business-about-successful-recurring-payments\">How will Pesapal alert my business about successful recurring payments?</h5>\n<p>Once a schedule is created and executed successfully, Pesapal will trigger an IPN (Instant Payment Notification) to the IPN endpoint you provided when calling the <em>SubmitOrderRequest</em> endpoint. This IPN call will have the _OrderNotificationType_i&gt; set as <strong>RECURRING</strong>.</p>\n<p><strong>Sample Callback URL:</strong> <a href=\"https://www.myapplication.com/response-page?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=555-678&amp;OrderNotificationType=RECURRING\">https://www.myapplication.com/response-page?OrderTrackingId=b945e4af-80a5-4ec1-8706-e03f8332fb04&amp;OrderMerchantReference=555-678&amp;OrderNotificationType=RECURRING</a></p>\n<h5 id=\"recurring-ipn-details\">Recurring IPN Details</h5>\n<p>The IPN alert will either be a GET or POST request, depending on which HTTP method you selected when registering the IPN URL. Click <a href=\"https://developer.pesapal.com/how-to-integrate/api-30-json/registeripnurl\">here</a> for more details on how to register your IPN endpoint.</p>\n<p>The <strong>IPN</strong> call will have the following parameters;</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OrderTrackingId</td>\n<td>String</td>\n<td>Unique order id generated by Pesapal.</td>\n</tr>\n<tr>\n<td>OrderNotificationType</td>\n<td>String</td>\n<td>Value set as <strong>RECURRING</strong> to represent a Recurring IPN call.</td>\n</tr>\n<tr>\n<td>OrderMerchantReference</td>\n<td>String</td>\n<td>Your account number received as part of the SUBMIT ORDER REQUEST.</td>\n</tr>\n</tbody>\n</table>\n</div><blockquote>\n<p><em>The IPN call will</em> <em><strong>NOT</strong></em> <em>have all details of the payment for security reasons. As such, you will be required to fetch the payment using the</em> <em><strong>GetTransactionStatus</strong></em> <em>API once the IPN URL is triggered.</em> </p>\n</blockquote>\n<p>In addition to the normal payment status details received from the <em>GetTransactionStatus</em> endpoint, Pesapal will append an object <em>subscription_transaction_info</em> containing some additional recurring payment data</p>\n<h5 id=\"recurring-payments-extra-data-subscription_transaction_info\">Recurring Payments Extra Data (subscription_transaction_info)</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>account_reference</td>\n<td>Customer's identification number know to your system. This can be an invoice number or an account number.</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Amount paid by the customer.</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>Customer's first name.</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>Customer's last name.</td>\n</tr>\n<tr>\n<td>correlation_id</td>\n<td>Pesapal's unique recurring payment identifier / id.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"request-response\">Request Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"payment_method\": \"Visa\",\n    \"amount\": 100,\n    \"created_date\": \"2022-04-30T07:41:09.763\",\n    \"confirmation_code\": \"6513008693186320103009\",\n    \"payment_status_description\": \"Failed\",\n    \"description\": \"Unable to Authorize Transaction.Kindly contact your bank for assistance\",\n    \"message\": \"Request processed successfully\",\n    \"payment_account\": \"476173**0010\",\n    \"call_back_url\": \"https://test.com/?OrderTrackingId=7e6b62d9-883e-440f-a63e-e1105bbfadc3&amp;OrderMerchantReference=555-678\",\n    \"status_code\": 2,\n    \"merchant_reference\": \"1515111111\",\n    \"payment_status_code\": \"\",\n    \"currency\": \"KES\",\n    \"subscription_transaction_info\": {\n        \"account_reference\": \"555-678\",\n        \"amount\": 100,\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"correlation_id\": 111222\n    },\n    \"error\": {\n        \"error_type\": null,\n        \"code\": null,\n        \"message\": null,\n        \"call_back_url\": null\n    },\n    \"status\": \"200\"\n}    \n\n</code></pre>\n<h5 id=\"what-next\">What Next?</h5>\n<p>Once you've fetched the recurring data, you are then required to store the same in your system and provide services / goods as subscribed.</p>\n<p>Your IPN endpoint should then respond to Pesapal with a json string confirming service delivery. Part of the json string contains a <em><strong>status</strong></em> parameter that should be set as <strong>200</strong> (meaning request was received and processed) or <strong>500</strong> (meaning request was received but there was an issue providing the services).</p>\n<p><strong>Sample JSON Response String:</strong> {\"orderNotificationType\":\"RECURRING\",\"orderTrackingId\":\"d0fa69d6-f3cd-433b-858e-df86555b86c8\",\"orderMerchantReference\":\"555-678\",\"status\":200}</p>\n<blockquote>\n<p><strong>NB:</strong> Constant complains from your customers about service / goods not delivered which were paid using recurring / subscription based payment mode will lead to the subscriptions being terminated and your profile banned from using the feature.</p>\n</blockquote>\n","urlObject":{"path":["SubmitOrderRequest"],"host":["{{protocol}}{{api-host}}{{api-url}}Transactions"],"query":[],"variable":[]}},"response":[],"_postman_id":"f500d792-87a5-4d60-8543-4b818a59c7c9"},{"name":"RefundRequest","id":"90380f34-2729-46f3-a613-e1ce0766c781","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"confirmation_code\": \"\",\r\n    \"amount\": \"\",\r\n    \"username\": \"\",\r\n    \"remarks\": \"\"\r\n} "},"url":"{{protocol}}{{api-host}}{{api-url}}Transactions/RefundRequest","description":"<p>The refund request endpoint allow you to refund a charge that has previously been processed but not yet refunded. Funds will be refunded to the credit / debit card or mobile money wallet that was originally charged.</p>\n<p>The ability to process a refund has the following limitations:</p>\n<ol>\n<li>A refund has to be approved by the merchant.</li>\n<li>You can't refund more than what was originally collected.</li>\n<li>You can only refund payments with the status of COMPLETED.</li>\n<li>You can partially or fully refund a payment card payment.</li>\n<li>You can only fully refund a payment mobile payment.</li>\n<li>Refunds are performed in the currency of the original payment.</li>\n<li>Multiple refunds are not allowed. You can only request one refund against a payment.</li>\n</ol>\n<p>The URL to our RequestRefund API is either:</p>\n<ul>\n<li><strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/Transactions/RefundRequest\">https://cybqa.pesapal.com/pesapalv3/api/Transactions/RefundRequestt</a></li>\n<li><strong>Production/Live URL:</strong> <a href=\"https://pay.pesapal.com/v3/api/Transactions/RefundRequest\">https://pay.pesapal.com/v3/api/Transactions/RefundRequest</a></li>\n</ul>\n<h4 id=\"authentication\">Authentication</h4>\n<p><strong>Bearer Token :</strong> Use token generated during authentication.</p>\n<h4 id=\"http-request-headers\">HTTP request headers</h4>\n<p><strong>Accept:</strong> The response format, which is required for operations with a response body.<br /><strong>Content-Type:</strong> The request format, which is required for operations with a request body.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td>Should be set to <code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td>Should be set to <code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"request-parameters\">Request parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>confirmation_code</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>This refers to payment confirmation code that was returned by the processor</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Float</td>\n<td><code>Required</code></td>\n<td>Amount to be refunded.</td>\n</tr>\n<tr>\n<td>username</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>Identity of the user who has initiated the refund.</td>\n</tr>\n<tr>\n<td>remarks</td>\n<td>String</td>\n<td><code>Required</code></td>\n<td>A brief description on the reason for the refund.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\"><strong>Sample Request</strong></h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"confirmation_code\": \"AA11BB22\",\n    \"amount\": \"100.00\",\n    \"username\": \"John Doe\",\n    \"remarks\": \"Service not offered\"\n}    \n\n</code></pre>\n<p>After successfully placing a refund request, a request will be sent to our finance team to start processing the refund.</p>\n<h4 id=\"response-parameters\">Response parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>error</td>\n<td>Integer</td>\n<td>200 - Refund received successfully and is being processed. 500 - Refund rejected.</td>\n</tr>\n<tr>\n<td>message</td>\n<td>String</td>\n<td>A brief summary of the response received.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Status 200 mean your request to process the refund has been received successfully. However, please note that this does not mean the refund has been effected. Pesapal has to get the go ahead from the merchant before finalising the refund.</p>\n<p>Status 500 mean your request to process the refund was rejected for one reason or another. Refer to the error message for more details.</p>\n<h4 id=\"sample-response\"><strong>Sample Response</strong></h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"200\",\n    \"message\": \"Refund request successfully\"\n}  \n\n</code></pre>\n<blockquote>\n<p>The refund API uses the confirm code for identification. It's important that you store all payment confirmation codes as returned in the Get Transaction Status Endpoint</p>\n</blockquote>\n","urlObject":{"path":["RefundRequest"],"host":["{{protocol}}{{api-host}}{{api-url}}Transactions"],"query":[],"variable":[]}},"response":[],"_postman_id":"90380f34-2729-46f3-a613-e1ce0766c781"},{"name":"OrderCancellation","id":"2ea439b0-6674-4669-9885-54cc10fbf836","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt-token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"order_tracking_id\": \"{{order-tracking-id}}\"\r\n} "},"url":"{{protocol}}{{api-host}}{{api-url}}Transactions/CancelOrder","description":"<p>The Order Cancellation API enables you to revoke a previously placed order request that remains incomplete on our end. This API facilitates the cancellation of orders that have encountered failures or are pending transactions.</p>\n<p>However, there are certain constraints associated with cancelling a prior request:</p>\n<ol>\n<li>Cancellation is exclusively supported for failed or pending payments.</li>\n<li>A cancellation request can only be submitted once.</li>\n<li>Cancellation is not allowed for payments that have already been processed.</li>\n</ol>\n<p>You can access our Cancel Order API via the endpoints provided below:</p>\n<ul>\n<li><strong>Sandbox/Demo URL:</strong> <a href=\"https://cybqa.pesapal.com/pesapalv3/api/Transactions/CancelOrder\">https://cybqa.pesapal.com/pesapalv3/api/Transactions/CancelOrder</a></li>\n<li><strong>Production/Live URL:</strong><a href=\"https://pay.pesapal.com/v3/api/Transactions/CancelOrder\">https://pay.pesapal.com/v3/api/Transactions/CancelOrder</a></li>\n</ul>\n<h4 id=\"authentication\">Authentication</h4>\n<p>**Bearer Token :**Use token generated during authentication.</p>\n<h4 id=\"http-request-headers\">HTTP request headers</h4>\n<p><strong>Accept:</strong> The response format, which is required for operations with a response body.<br /><strong>Content-Type:</strong> The request format, which is required for operations with a request body.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Accept</td>\n<td><code>Required</code></td>\n<td>Should be set to <code>application/json</code></td>\n</tr>\n<tr>\n<td>Content-Type</td>\n<td><code>Required</code></td>\n<td>Should be set to <code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"request-parameters\">Request Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>order_tracking_id</td>\n<td>Guid</td>\n<td><code>Required</code></td>\n<td>This refers to the original Pesapal Order tracking ID that was returned after submitting your order request earlier during the initial submit order request api call.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-request\"><strong>Sample Request</strong></h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"order_tracking_id\": \"xxxxxxxxxxxxxxxxxxxxxxx\"\n}    \n\n</code></pre>\n<p>After successfully cancelling the request, the order shall be cancelled on our systems preventing a customer from making further payments to an already cancelled order.</p>\n<h4 id=\"response-parameters\">Response Parameters</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>Integer</td>\n<td>200 – Order Successfully cancelled. 500 – Order could not be cancelled.</td>\n</tr>\n<tr>\n<td>message</td>\n<td>String</td>\n<td>A summary of the response received.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"sample-response\">Sample Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"200\",\n    \"message\": \"Order successfully cancelled.\"\n}  \n\n</code></pre>\n<blockquote>\n<p>The Order Cancellation API uses the Pesapal Order Tracking ID to cancel the order. It's important that you store the Pesapal Order Tracking ID that is sent back to your system during your initial order placement stage i.e. on the submit order request endpoint.</p>\n</blockquote>\n","urlObject":{"path":["CancelOrder"],"host":["{{protocol}}{{api-host}}{{api-url}}Transactions"],"query":[],"variable":[]}},"response":[],"_postman_id":"2ea439b0-6674-4669-9885-54cc10fbf836"}],"id":"010cc44d-c7ac-4f5b-a684-2fa49bf686ab","_postman_id":"010cc44d-c7ac-4f5b-a684-2fa49bf686ab","description":""}]}