Welcome to

The best way to monetize

your private server

API Docs

To get started using the API, ensure that you have created your store and received your API key via the dashboard. You'll need to send this key with every request in the headers as Authorization: Bearer your_code_here. This lets us know who is using the api and thus getting you the correct information.

Api URL: https://api.runepay.app

GET /stripe/tokens

Returns an array with your paypal keys and options.

Expected output:
                    
                        {
                            "store_id": 1,
                            "live_public": "live_public_key",
                            "live_private": "live_private_key",
                            "test_public": "test_public_key",
                            "test_private": "test_private_key",
                            "test_mode": false,
                            "enabled": true
                        }
                    
                
Error output:
            
                { "error": "error message" }
            
        

GET /stripe/session

Returns a Stripe Session object. Will return an error if the cart is empty. Stores the payment as "pending".

Post Params
Field Type Description Default
username array the name of the user
ip_address array The ip address of the user
discount string A discount code, if one is applied
Error output:
            
                { "error": "error message" }
            
        

POST /stripe/complete

Updates a stripe payment from "pending" status to "completed" if the payment was completed.

Post Params
Field Type Description Default
session_id string The Stripe session id
Successful output:
                    
                        {
                            "total_paid": 9,
                            "ip_address": "127.0.0.1",
                            "date_paid": 1615491060,
                            "processor": "stripe",
                            "username": "OGKingFox",
                            "items": [
                                {
                                    "id": 32,
                                    "store_id": "1",
                                    "product_id": 2,
                                    "status": "completed",
                                    "quantity": 1,
                                    "paid": 9,
                                    "processor": "stripe",
                                    "paid_by": "OGKingFox",
                                    "ip_address": "127.0.0.1",
                                    "manual": false,
                                    "email": null,
                                    "trans_id": null,
                                    "claimed": false,
                                    "stripe_sess": "cs_test_..........",
                                    "date_paid": 1615491060,
                                    "stores_product": {
                                        "id": 2,
                                        "item_name": "Test Product",
                                        "price": 10,
                                        "image_url": null
                                    }
                                }
                            ]
                        }
                    
                
Error output:
            
                { "error": "error message" }
            
        

DELETE /stripe/cancel

Updates a stripe payment from "pending" status to "cancelled", if the payment was never completed.

Post Params
Field Type Description Default
session_id string The Stripe session id
Successful output:
                    
                        {
                            "success": true,
                            "message": "Your payment has been cancelled",
                            "items": [
                                {
                                    "id": 24,
                                    "store_id": "1",
                                    "product_id": 2,
                                    "status": "cancelled",
                                    "quantity": 1,
                                    "paid": 9,
                                    "processor": "stripe",
                                    "paid_by": "OGKingFox",
                                    "ip_address": "::1",
                                    "manual": false,
                                    "email": null,
                                    "trans_id": null,
                                    "claimed": false,
                                    "stripe_sess": "cs_test_xxxxxxxxxxxxxxxxxxxx",
                                    "date_paid": 1615477946
                                }
                            ]
                        }
                    
                
Error output:
            
                { "error": "error message" }