VerifyPGPaymentWithOrderId

Use the order id to verify if the payment is complete

Retrieve a order by orderId

GET https://sandbox.pgecom.com/api/order/{orderId}

Headers

NameTypeDescription

authorization*

String

Bearer token

{
    "quantity": 1,
    "receiver": "info@pgecom.com",
    "metadata": {
        "isChatEnabled": true,
        "pgPayMerchantName": "PGecom",
        "isProd": false,
        "customerEmail": "info@pgecom.com",
        "customerFirstName": "Esterling",
        "customerLastName": "Accime",
        "returnUrl": "https://sandbox.pgecom.com/payment/pgpay/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlcklkIjoiYjU5YTA5MzktYzgyNC00NzMyLThiMmYtMzZmNDE3NDM3ZTJhIiwiaWF0IjoxNzA0MTQyNDE3LCJleHAiOjE3MDQxNDYwMTd9.JB3oVi3nH0Yw_Q9F1x-1N8bBTkJkRAjoKYq_xIfH7x0?merchantName=PGecom&amount=25"
    },
    "orderId": "b59a0939-c824-4732-8b2f-36f417437e2a",
    "successUrl": "https://sandbox.pgecom.com/payment-success",
    "status": "pending",
    "createdAt": "2024-01-01T20:53:37.155Z",
    "transactionType": "pgpay",
    "sender": "info@pgecom.com",
    "errorUrl": "https://sandbox.pgecom.com/payment-error",
    "paymentStatus": "pending",
    "updatedAt": "2024-01-01T20:53:37.155Z",
    "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
    "amount": 25,
    "paymentMethod": "pgpay",
    "id": "b59a0939-c824-4732-8b2f-36f417437e2a",
    "deliveryMethod": "instant",
    "customerId": "87ee04dd-41e8-42e8-b5b9-16c0e4a04c17",
    "customer": {
        "lastName": "Accime",
        "userID": "5f56dfa3-a415-4818-8275-44fc63ece3fd",
        "updatedAt": "2023-09-29T07:01:11Z",
        "createdAt": "2023-09-29T07:01:11Z",
        "id": "87ee04dd-41e8-42e8-b5b9-16c0e4a04c17",
        "email": "info@pgecom.com",
        "phone": "+1 404 825 3444",
        "firstName": "Esterling"
    },
    "shop": {},
    "invoice": {},
    "products": []
}
const axios = require('axios');

let config = {
  method: 'get',
  url: 'https://sandbox.pgecom.com/api/order/b59a0939-c824-4732-8b2f-36f417437e2a',
  headers: { }
};

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

Last updated