CREATE TRANSACTION

To make test transactions you need to make a POST call to the following url :

Request url : https://admin.payomatix.com/payment/merchant/transaction

REQUEST PARAMETERS

Parameters Required Data Type Description
email Yes String Valid Email address of User
amount Yes Decimal Amount Value
currency Yes String 3 Digit format, eg USD
return_url Yes String Response URL where we redirect after the transaction process is completed.
notify_url No String POST URL where we send webhook notification.
merchant_ref No String Customer order id generated from the user side.
search_key No String If you want transaction in multi category.
select_type_id No String 1 for Credit Card, 2 for Debit Card, 3 for UPI(provide customer_vpa), 4 for Wallet, 5 for Net banking, 8 BNPL, 9 emi, 10 e-challan.
other_data {
first_name No String First Name from (Credit/Debit) Card
last_name No String Last Name from (Credit/Debit) Card
address No String Full Address of User
state No String State Name
city No String Valid City name
zip No String Valid Zip Code
country No String 2 letter Country, eg IN
phone_no No String Valid Phone Number of User
card_no No String Enter Card number
customer_vpa No String Enter your VPA address
products [
{
product_id No String Enter Product ID
name No String Enter Product Name
quantity No Integer Enter Quantity
price No String Enter Price
description No String Enter Description
product_code No String Enter Product Code
image_url No String Enter Image URL
category No String Enter Category
tax_rate No String Enter Tax Rate
discount No String Enter Discount
weight No String Enter Weight
} ]
}
Card Number Response Description
4242 4242 4242 4242 Success To test successful transaction
4000 0000 0000 3220 3ds Redirection To test 3ds redirection transaction
4000 0000 0000 9995 Declined To test insufficient funds transaction
4000 0000 0000 9987 Declined To test stolen cards transaction
Note: Following cards can be used for different scenarios of the test transactions.

API ENDPOINT

Request url: https://admin.payomatix.com/payment/merchant/transaction

EXAMPLE

{   
	"Accept": "application/json",
	"Authorization": Secret_key,
}
{ 
    "email"       : "test@jondoe.com",                                                  
    "amount"      : "30.00",                                                            
    "currency"    : "USD",                                                              
    "return_url"  : "https://mysite.com/redirect/dce35d90-fc2e-4a43-a900-1872d9c00890", 
    "notify_url"  : "https://mysite.com/notify/ce35d90-fc2e-4a43-a900-1872d9c00890",    
    "merchant_ref": "ce35d90-fc2e-4a43-a900-1872d9c00890",                              
}
// Not required in request. This data will be prefilled into checkout page.

"search_key": "Rent",			// If you want transaction in multi category
"select_type_id"   : "1",   			1 = Credit Card, 2 = Debit Card, 3 = UPI, 4 = Wallet, 5 = Net banking, 8 = BNPL, 9 = emi, 10 = e-challan
"other_data": {
    "first_name"  : "your-name",    
    "last_name"   : "your-name",    
    "address"     : "address",      
    "state"       : "state",        
    "city"        : "city",         
    "zip"         : "zip",          
    "country"     : "IN",             // Two alphabet country code
    "phone_no"    : "phone number", 
    "card_no"     : "card number",  
    "customer_vpa": "upi id",       
	"products": [
            {
                "product_id"  :  "prod_001",                               
                "name"        :  "Product Name 1",                         
                "quantity"    :  "2",                                      
                "price"       :  "50.00",                                  
                "description" :  "This is a great product.",               
                "product_code":  "SKU12345",                               
                "image_url"   :  "https://mysite.com/images/prod_001.jpg", 
                "category"    :  "Electronics",                            
                "tax_rate"    :  "0.07",                                   
                "discount"    :  "5.00",                                   
                "weight"      :  "1.5kg",                                  
               
            },
            {
                "product_id"  :  "prod_002",                               
                "name"        :  "Product Name 2",                         
                "quantity"    :  "1",                                      
                "price"       :  "40.00",                                  
                "description" :  "This product is amazing.",               
                "product_code":  "SKU8765",                               
                "image_url"   :  "https://mysite.com/images/prod_002.jpg", 
                "category"    :  "Electronics",                            
                "tax_rate"    :  "0.04",                                   
                "discount"    :  "8.00",                                   
                "weight"      :  "2.5kg",                                  
            }
        ]
}

RESPONSE

{
    "responseCode": 300,                                
    "response"    : "Please redirect to redirect_url.", 
    "status"      : "redirect",                         
    "redirect_url": "https://admin.payomatix.com/test/connectors/CSAE1653196475"
}
{
    "responseCode": 400,                                   
    "response"    : "Validation failed, please try again", 
    "status"      : "validation_error",                    
    "errors"      : {
        "validation": [
            "The email field is required.",
            "The amount field is required.",
            "The currency field is required.",
            "The return url field is required."
        ]
    }
}

RESPONSE PARAMETERS

Our server will validate the request and then send the response in JSON format. The response will contain the parameters listed below. In the successful response, as shown, you will receive a redirection URL to create a test transaction. The client will be redirected to the "redirect_3ds_url".

After being redirected to the redirect_3ds_url, you will receive all subtypes of connectors as shown below.

You will be redirected to the page according to the used cards.

PAYMENT TYPE SELECTION

When the client selects any option, such as "Pay with UPI," they will be redirected to the gateway website after filling up all required details and proceed for 3D secure verification.

Using 4242 4242 4242 4242 card will give you a successful transaction

If the user enters any wrong details, they will be redirected to the declined page.

If the merchant's daily limit exceeds or if the user selects the blocked country, the transaction will be flagged as blocked.

Errors

If your API request fails due to validation, the response JSON format will be similar to what is shown.

REDIRECTION

Once the transaction is completed, the client will be redirected back to the "response_url" that was passed in the first API request. If you have passed a "webhook_url", our server will send a server notification to that URL.

Note :

Make sure that you retrieve the transaction API after a successful transaction using the Get Transaction API.

CREATE SEAMLESS TRANSACTION

To make transactions you need to make a POST call to the following url :

Request url : https://admin.payomatix.com/payment/merchant/seamless/transaction

REQUEST PARAMETERS

Parameters Required Data Type Description
first_name Yes String First Name from (Credit/Debit) Card
last_name Yes String Last Name from (Credit/Debit) Card
email Yes String Valid Email address of User
phone_no Yes String Valid Phone Number of User
address No String Full Address of User
country No String 2 letter Country, eg IN
state No String State Name
city No String Valid City name
zip Yes String Valid Zip Code
amount Yes Decimal Amount Value
currency Yes String 3 Digit format, eg USD
type_id Yes String 1 for Credit Card, 2 for Debit Card, 3 for UPI(provide customer_vpa), 4 for Wallet, 5 for Net banking, 8 for BNPL, 9 for emi, 10 for e-challan (For type 1 and 2 Card details parameters are required(card_no,ccexpiry_month,ccexpiry_year,cvv_number))
card_no No String Enter Card number
ccexpiry_month No String Enter card 2 digit expiry month, E.g. 04
ccexpiry_year No String Enter card 4 digit expiry Year, E.g. 2029
cvv_number No String Enter card CVV number
customer_vpa No String Enter your VPA address
return_url Yes String Response URL where we redirect after the transaction process is completed.
notify_url No String POST URL where we send webhook notification.
merchant_ref No String Customer order id generated from the user side.
search_key No String If you want transaction in multi category.
Card Number Response Description
4242 4242 4242 4242 Success To test successful transaction
4111 1111 1111 1111 Success To test successful transaction
4000 0000 0000 3220 3ds Redirection To test 3ds redirection transaction
4000 0000 0000 9995 Declined To test insufficient funds transaction
4000 0000 0000 9987 Declined To test stolen cards transaction
Note: Following cards can be used for different scenarios of the test transactions.

API ENDPOINT

Request url: https://admin.payomatix.com/payment/merchant/seamless/transaction

EXAMPLE

{   
	"Accept": "application/json",
	"Authorization": Secret_key,
	"User-Agent": $_SERVER['HTTP_USER_AGENT'],
}
{ 
	"first_name"     : "Naina",                                                                                     
	"last_name"      : "Manne",                                                                                     
	"address"        : "E-78 Ground Floor, Near Bengali Sweet Center, Har Gyan Singh Arya Marg, South Extension I", 
	"country"        : "IN",                                                                                        
	"state"          : "Delhi",                                                                                     
	"city"           : "Delhi",                                                                                     
	"zip"            : "110049",                                                                                    
	"phone_no"       : "9810117094",                                                                                
	"email"          : "naina@gmail.com",                                                                           
	"amount"         : "30.00",                                                                                     
	"currency"       : "INR",                                                                                       
	"return_url"     : "https://webhook.site/c06b84e5-1c75-43de-b00f-59895354b07d",                                 
	"notify_url"     : "https://webhook.site/c06b84e5-1c75-43de-b00f-59895354b07d",                                 
	"merchant_ref"   : "wer345t-fc2e-4a43-a900-1872d9c00890",                                                       
	"type_id"        : "1",                                                                                         
	"card_no"        : "4111111111111111",                                                                          
	"ccexpiry_month" : "01",                                                                                        
	"ccexpiry_year"  : "2029",                                                                                      
	"cvv_number"     : "123",                                                                                       
	"customer_vpa"   : "test@upi",      // In case of type_id = 3 which is for UPI                                  
	"search_key"   	 : "Rent",      	  // If you want transaction in multi category                                

}

<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL            => 'https://admin.payomatix.com/payment/merchant/seamless/transaction',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode([
        'first_name'     => 'John',
        'last_name'      => 'Doe',
        'email'          => 'user@upi',
        'phone_no'       => '9898989898',
        'address'        => 'Delhi',
        'country'        => 'IN',
        'state'          => 'Delhi',
        'city'           => 'Delhi',
        'zip'            => '101010',
        'amount'         => '10',
        'currency'       => 'INR',
        'type_id'        => '3',
        'return_url'     => 'http://127.0.0.1/api/payomatix/response.php',
        'notify_url'     => 'http://127.0.0.1/api/payomatix/response.php',
        'merchant_ref'   => 'SSL_dfs43534d',
        'search_key'     => 'SSL_4545s43534d',
        'card_no'        => '4242424242424242',
        'ccexpiry_month' => '12',
        'ccexpiry_year'  => '2025',
        'cvv_number'     => '852',
        'customer_vpa'   => 'user@upi',  // Mandatory for UPI collect, but not required for UPI intent
		]),
    CURLOPT_HTTPHEADER     => [
		'Authorization: Secret_key', // Replace with actual secret key
		'Content-Type :application/json',
		'User-Agent   :'.$_SERVER['HTTP_USER_AGENT'], // Dynamic user agent
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
?>
    

RESPONSE

{
    "responseCode": 300,                                                                                
    "response"    : "Transaction in authorization process.",                                            
    "status"      : 2,                                                                                  
    "redirect_url": "https://stageadmin.payomatix.com/razorpay/seamless/2BHQ1701853227/PSEU1701853228", 
    "data"        : {
        "order_id"        : "UHpxRQq1-NVjV-sFF4-1701853227uE",     
        "merchant_ref"    : "wer345t-fc2e-4a43-a900-1872d9c00890", 
        "email"           : "naina@gmail.com",                     
        "amount"          : "30.00",                               
        "currency"        : "INR",                                 
        "test_mode"       : 0,                                     
        "transaction_type": "Credit Card",                         
        "integration_type": "Seamless",                            
        "return_url"      : "https://webhook.site/c06b84e5-1c75-43de-b00f-59895354b07d"
    }
}
{
    "responseCode": 400,                                   
    "response"    : "Validation failed, please try again", 
    "status"      : "validation_error",                    
    "errors"      : {
        "validation": [
            "The card no field is required.",
            "The ccexpiry month field is required.",
            "The ccexpiry year field is required.",
            "The cvv number field is required."
        ]
    }
}

RESPONSE PARAMETERS

Our server will validate the request and then send the response in JSON format. The response will contain the parameters listed below. In the successful response, as shown, you will receive a redirection URL to create a transaction. The client will be redirected to the "redirect_url".

Once the transaction is completed, the client will be redirected back to the "response_url" that was passed in the first API request.

If your API request fails due to validation, the response JSON format will be similar to what is shown.

Note :

Make sure that you retrieve the transaction API after a successful transaction using the Get Transaction API.

GET TRANSACTIONS

To make transactions you need to make a POST call to the following url :

Live url : https://admin.payomatix.com/payment/get/transaction

REQUEST PARAMETERS

Parameters Required Data Type Description
merchant_ref Yes (When order_id is not present) String Customer order id generated from the user side.
order_id Yes (When merchant_ref is not present) String Customer order id generated from the system side.

API ENDPOINT

Live url : https://admin.payomatix.com/payment/get/transaction

curl -X POST https://admin.payomatix.com/payment/get/transaction

EXAMPLE

{ 
    
	"Accept": "application/json",
	"Authorization": API_KEY,

}
{ 
    "merchant_ref": "ORDER78945",
    "order_id": "I7EHJ0m4-FpI0-Q9W3-16493264720K"
}

RESPONSE

{
    "responseCode": 200,            
    "response"    : "successfully", 
    "status"      : "success",      
    "data"        : {
        "order_id"                : "pgYeG5xA-24V6-X710-1653196475ZC",                                    
        "merchant_ref"            : "ORDER78945",                                                         
        "connector"               : null,                                                                 
        "email"                   : "johndoe@mailinator.com",                                             
        "amount"                  : "20.00",                                                              
        "currency"                : "INR",                                                                
        "descriptor"              : null,                                                                 
        "status"                  : 1,                                                                    
        "response"                : "Your transaction successfully processed.",                           
        "test_mode"               : 1,                                                                    
        "transaction_type"        : 1(1 - Credit Card, 2- Debit Card, 3- UPI, 4- Wallet, 5- Net Banking, 8 - BNPL, 9 - emi, 10 - echallan), 
        "payment_gateway_response": {...},                                                                
        "return_url"              : "https://google.com",                                                 
        "notify_url"              : "https://webhook.site/34a109fd-9373-4f60-83f3-c7a5f851886a",          
        "created_at"              : "2022-05-22T05:34:22.000000Z",                                        
        "updated_at"              : "2022-05-22T05:34:22.000000Z"
    }
}
{
    "responseCode": 400,                                   
    "response"    : "Validation failed, please try again", 
    "status"      : "validation_error",                    
    "errors"      : {
        "validation": [
            "The merchant ref field is required when order id is not present.", 
            "The order id field is required when merchant ref is not present."
        ]
    }
}

RESPONSE PARAMETERS

Our server will validate the request and then send the response in JSON format. The response will contain the below parameters. In the successful response as shown you will get all transactions.

Errors

If your API request failed due to validation, the response JSON format will be similar as shown: