VerifyPGPaymentWithToken

Verify a pg pay a checkout session

Verify pg pay payment with pgpay token

POST https://sandbox.pgecom.com/api/pgpay/order

Request Body

Name
Type
Description

pgPayToken*

String

The token

{
    "quantity": 1,
    "receiver": "wysavmuhjsuxpv@lifebeyondservice.com",
    "metadata": {
        "is_matched": false,
        "gender": "female",
        "isChatEnabled": false,
        "isProd": false,
        "webhookUrl": "https://webhook.site/40adf10b-9352-4d20-b23a-17d4f1a32a9f",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlcklkIjoiNDE0MTJiZTMtMDFmZC00ODhhLWEyNzktY2FkYmUxNzFiNWU1IiwiaWF0IjoxNzEzNDU5MjE2LCJleHAiOjE3MTM0NjI4MTZ9.-LqeTBDi1vOT1giyOLfnQ5hrpmrtrKbWxB_SqvZD5mU",
        "app_name": "Match.com",
        "pgPayMerchantName": "PGecom",
        "customerEmail": "info@pgecom.com",
        "paymentMethods": [
            "moncash",
            "pgpay"
        ],
        "customerFirstName": "",
        "customerLastName": "",
        "returnUrl": "https://sandbox.pgecom.com/payment/pgpay/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlcklkIjoiNDE0MTJiZTMtMDFmZC00ODhhLWEyNzktY2FkYmUxNzFiNWU1IiwiaWF0IjoxNzEzNDU5MjE2LCJleHAiOjE3MTM0NjI4MTZ9.-LqeTBDi1vOT1giyOLfnQ5hrpmrtrKbWxB_SqvZD5mU?merchantName=PGecom&amount=55"
    },
    "userFee": 0,
    "currency": "htg",
    "newBalance": 5440.35927,
    "orderId": "41412be3-01fd-488a-a279-cadbe171b5e5",
    "status": "completed",
    "successUrl": "https://pgecom.com",
    "createdAt": "2024-04-18T16:53:36.528Z",
    "transactionType": "pgpay_deposit",
    "sender": "info@pgecom.com",
    "paymentStatus": "completed",
    "platform": "pgrewards",
    "updatedAt": "2024-04-18T16:54:36.333Z",
    "userID": "f725076f-ade0-4912-bc86-db1681700d91",
    "amount": 0.3061999999999999,
    "paymentMethod": "pgpay",
    "description": "Esterling Accime paid  you 55 HTG via PG Pay. You've received 55 HTG to your account. Your updated balance is 5440.35927 HTG",
    "id": "41412be3-01fd-488a-a279-cadbe171b5e5",
    "deliveryMethod": "instant",
    "phone": "+50934748112",
    "customerId": "e66d2dac-e514-42b7-8490-de3972709d7e",
    "gourdes": 55
}
const axios = require('axios');
let data = {
    "pgPayToken": "jfhsfhsh"
}

let config = {
  method: 'post',
  url: 'https://sandbox.pgecom.com/api/pgpay/order',
  headers: { },
  data : data
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Last updated