Documentation

Learn how to integrate VYPay into your applications

Integration Workflow

1

Generate Payment Key

The seller generates a payment key using key_generate.php

2

Payment Page

The buyer visits the payment page using the generated key

vypay.xyz/pay.php?key=YOUR_GENERATED_KEY
3

Process & Redirect

The payment is processed, and the buyer is redirected to the seller's site

4

Verify Payment

The seller verifies the payment using check_payment.php

check_payment.php?email=merchant@example.com

Payment Verification

After a payment completes, verify the transaction before granting access.

Verification Endpoint

GET check_payment.php

Parameters

ParameterTypeRequiredDescription
emailstringYes (if no key)merchant@example.com
keystringYes (if no email)YOUR_GENERATED_KEY

Responses

{ "success": true, "transaction_id": 123456, "amount": "50.00", "timestamp": "2023-05-19 15:30:45" }
{ "success": false }

v1 API Endpoints

Create Payment

POST /api/v1/payment/create.php

Create a payment transaction from sender to receiver.

Parameters

ParameterTypeRequiredDescription
emailstringYesSender email
passwordstringYesSender password
to_emailstringYesReceiver email
amountfloatYesAmount to send
reasonstringNoOptional reason

Response Example

{ "success": true, "transaction_id": 123456, "amount": 10.0 }

Verify Payment

GET /api/v1/payment/verify.php?transid=123456

Verify transaction by its ID.

Response Example

{ "success": true, "transaction_id": 123456, "amount": 10.0 }

User Info

POST /api/v1/info.php

Retrieve user info by email/password.

Parameters

ParameterTypeRequiredDescription
emailstringYesUser's email
passwordstringYesUser's password

Response Example (Success)

{ "success": true, "username": "ExampleUser", "balance": 42.5 }

Response Example (Failure)

{ "success": false }

Server Health

GET /api/v1/health.php

Shows server and database status.

Response Example

{ "server": "online", "database": true, "errors": [] }