Skip to content

Latest commit

 

History

History
388 lines (352 loc) · 29.2 KB

README.md

File metadata and controls

388 lines (352 loc) · 29.2 KB

reepay-php-api

REST API to manage Reepay resources

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

About Reepay (by reepay)

Reepay is a payment gateway as well as a subscription billing platform for multiple web shops and merchants online. Reepay also is an acquirer for VISA and Mastercard.

This is an unofficial repo done by enthusiasts, we highly appreciate the work and effort going in to this.

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "require": {
    "oscar-team/reepay-php-api": "dev-master"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/code/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apiKey
Reepay\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Reepay\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Auth-Token', 'Bearer');
// Configure HTTP basic authorization: basicAuth
Reepay\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Reepay\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$apiInstance = new Reepay\Api\AccountApi();

try {
    $result = $apiInstance->createPrivateKey();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->createPrivateKey: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.reepay.com/ except for Session, which is https://checkout-api.reepay.com/.

Class Method HTTP request Description
AccountApi createPrivateKey POST /v1/account/privkey Create private key
AccountApi createPublicKey POST /v1/account/pubkey Create public key
AccountApi expirePrivateKey POST /v1/account/privkey/{key}/expire Expire private key
AccountApi expirePublicKey POST /v1/account/pubkey/{key}/expire Expire public key
AccountApi generateWebhookSecret POST /v1/account/webhook_settings/secret Generate new webhook secret
AccountApi getCurrentAccount GET /v1/account Get account
AccountApi getDiscountSettings GET /v1/account/discount_settings Get discount settings
AccountApi getMailSettings GET /v1/account/mail_settings Get mail settings
AccountApi getPrivateKeys GET /v1/account/privkey Get list of private keys
AccountApi getPublicKeys GET /v1/account/pubkey Get list of public keys
AccountApi getWebhookSettings GET /v1/account/webhook_settings Get webhook settings
AccountApi updateAccountJson PUT /v1/account Update account
AccountApi updateDiscountSettings PUT /v1/account/discount_settings Update discount settings
AccountApi updateMailSettingsJson PUT /v1/account/mail_settings Update mail settings
AccountApi updateWebhookSettingsJson PUT /v1/account/webhook_settings Update webhook settings
AdditionalCostApi cancelAdditionalCost POST /v1/additional_cost/{handle}/cancel Cancel pending additional cost
AdditionalCostApi createAdditionalCostJson POST /v1/additional_cost Create additional cost
AdditionalCostApi getAdditionalCost GET /v1/additional_cost/{handle} Get additional cost
AdditionalCostApi getAdditionalCosts GET /v1/additional_cost/subscription/{handle} Get additional costs for subscription
AgreementApi createCardGatewayAgreement POST /v1/agreement/card_gateway Create card gateway agreement
AgreementApi deleteCardGatewayAgreement DELETE /v1/agreement/card_gateway/{id} Delete card gateway agreement
AgreementApi disableCardGatewayAgreement POST /v1/agreement/card_gateway/{id}/disable Disable card gateway agreement
AgreementApi enableCardGatewayAgreement POST /v1/agreement/card_gateway/{id}/enable Enable card gateway agreement
AgreementApi getCardGatewayAgreement GET /v1/agreement/card_gateway/{id} Get card gateway agreement
AgreementApi getCardGatewayAgreements GET /v1/agreement/card_gateway Get all card gateway agreements
AgreementApi updateCardGatewayAgreement PUT /v1/agreement/card_gateway/{id} Update card gateway agreement
AuthenticateApi login POST /v1/authenticate/login User login
AuthenticateApi renew POST /v1/authenticate/renew Renew user login
AuthenticateApi verifyAuthentication GET /v1/authenticate/verify Verify authentication
ChargeApi cancelCharge POST /v1/charge/{handle}/cancel Cancel charge
ChargeApi createCharge POST /v1/charge Create charge
ChargeApi getCharge GET /v1/charge/{handle} Get charge
ChargeApi getCharges GET /v1/charge Get charges
ChargeApi settleCharge POST /v1/charge/{handle}/settle Settle charge
CouponApi createCoupon POST /v1/coupon Create coupon
CouponApi deleteCoupon DELETE /v1/coupon/{handle} Delete coupon
CouponApi expireCoupon POST /v1/coupon/{handle}/expire Expire coupon
CouponApi getCoupon GET /v1/coupon/{handle} Get coupon
CouponApi getCoupons GET /v1/coupon Get list of coupons
CouponApi updateCoupon PUT /v1/coupon/{handle} Update coupon
CouponApi validateCode GET /v1/coupon/code/validate Validate coupon
CreditApi cancelCredit POST /v1/credit/{handle}/cancel Cancel credit
CreditApi createCreditJson POST /v1/credit Create credit
CreditApi getCredit GET /v1/credit/{handle} Get credit
CreditApi getCredits GET /v1/credit/subscription/{handle} Get credits for subscription
CustomerApi activatePaymentMethod POST /v1/customer/{handle}/payment_method/{method_id}/activate Activate payment method
CustomerApi addCardJson POST /v1/customer/{handle}/payment_method/card Add card payment method
CustomerApi createCustomerInvoice POST /v1/customer/{handle}/invoice Create invoice for customer
CustomerApi createCustomerJson POST /v1/customer Create customer
CustomerApi createCustomerNoteJson POST /v1/customer/{handle}/note Create customer note
CustomerApi deleteCustomer DELETE /v1/customer/{handle} Delete customer
CustomerApi getCard GET /v1/customer/{handle}/payment_method/card/{id} Get card
CustomerApi getCardDetails GET /v1/customer/{handle}/payment_method/card/{id}/details Get gateway card details
CustomerApi getCustomer GET /v1/customer/{handle} Get customer
CustomerApi getCustomerNotes GET /v1/customer/{handle}/note Get customer notes
CustomerApi getCustomerPaymentMethods GET /v1/customer/{handle}/payment_method Get payment methods
CustomerApi getCustomers GET /v1/customer Get list of customers
CustomerApi importCardJson POST /v1/customer/{handle}/payment_method/card_import Import card payment method
CustomerApi inactivatePaymentMethod POST /v1/customer/{handle}/payment_method/{method_id}/inactivate Inactivate payment method
CustomerApi reactivateCard POST /v1/customer/{handle}/payment_method/{card_id}/card_reactivate Reactivate failed card
CustomerApi updateCustomerJson PUT /v1/customer/{handle} Update customer
DiscountApi createDiscount POST /v1/discount Create discount
DiscountApi deleteDiscount DELETE /v1/discount/{handle} Delete discount
DiscountApi getDiscount GET /v1/discount/{handle} Get discount
DiscountApi getDiscounts GET /v1/discount Get list of discounts
DiscountApi undeleteDiscount POST /v1/discount/{handle}/undelete Undelete discount
DunningPlanApi createDunningPlanJson POST /v1/dunning_plan Create dunning plan
DunningPlanApi deleteDunningPlan DELETE /v1/dunning_plan/{handle} Delete dunning plan
DunningPlanApi getDunningPlan GET /v1/dunning_plan/{handle} Get dunning plan
DunningPlanApi getDunningPlans GET /v1/dunning_plan Get list of dunning plans
DunningPlanApi updateJson PUT /v1/dunning_plan/{handle} Update dunning plan
EventApi getEvent GET /v1/event/{id} Get event
EventApi getEvents GET /v1/event Get list of events
InvoiceApi cancelAllDunningPending POST /v1/invoice/cancel_all_dunning_pending/subscription/{handle} Cancel all dunning and pending
InvoiceApi cancelInvoice POST /v1/invoice/{id}/cancel Cancel invoice
InvoiceApi cancelSettleLater POST /v1/invoice/{id}/settle/cancel Cancel settle later
InvoiceApi cancelTransaction POST /v1/invoice/{id}/transaction/{transaction}/cancel Cancel transaction
InvoiceApi detachFromSubscription POST /v1/invoice/{id}/detach Detach from subscription
InvoiceApi getInvoice GET /v1/invoice/{id} Get invoice
InvoiceApi getInvoices GET /v1/invoice Get list of invoices
InvoiceApi manualSettle POST /v1/invoice/{id}/manual_settle Manual settle
InvoiceApi reactivateInvoice POST /v1/invoice/{id}/reactivate Reactivate invoice
InvoiceApi settle POST /v1/invoice/{id}/settle Settle
InvoiceApi transaction GET /v1/invoice/{id}/transaction/{transaction} Get transaction
InvoiceApi transactionDetails GET /v1/invoice/{id}/transaction/{transaction}/details Get transaction details
InvoiceApi transactionList GET /v1/invoice/{id}/transaction Get transaction list
MailTemplateApi getSample GET /v1/mail_template/sample Get sample data
OrganisationApi getOrganisation GET /v1/organisation Get organisation
OrganisationApi update PUT /v1/organisation Update organisation
PlanApi createPlanJson POST /v1/plan Create plan
PlanApi deletePlan DELETE /v1/plan/{handle} Delete plan
PlanApi getCurrentPlan GET /v1/plan/{handle}/current Get plan
PlanApi getPlan GET /v1/plan/{handle}/{version} Get plan version
PlanApi getPlans GET /v1/plan/{handle} Get list of plan versions
PlanApi getPlansList GET /v1/plan Get list of plans
PlanApi supersedePlanJson POST /v1/plan/{handle} Supersede plan
PlanApi updatePlanJson PUT /v1/plan/{handle} Update plan
RefundApi createRefund POST /v1/refund Create refund
RefundApi getRefund GET /v1/refund/{id} Get refund
SessionApi createSession POST /v1/session/charge Create charge session
SessionApi deleteSession DELETE /v1/session/{id} Delete session
SubscriptionApi cancelSubscription POST /v1/subscription/{handle}/cancel Cancel subscription
SubscriptionApi changeNextPeriodStartJson POST /v1/subscription/{handle}/change_next_period_start Change next renewal date
SubscriptionApi changeSubscription PUT /v1/subscription/{handle} Change subscription
SubscriptionApi createSubscriptionDiscount POST /v1/subscription/{handle}/discount Add subscription discount
SubscriptionApi createSubscriptionInvoice POST /v1/subscription/{handle}/invoice Create invoice ondemand for subscription
SubscriptionApi createSubscriptionJson POST /v1/subscription Create subscription
SubscriptionApi deleteSubscriptionDiscount DELETE /v1/subscription/{handle}/discount/{sdHandle} Delete subscription discount
SubscriptionApi expire POST /v1/subscription/{handle}/expire Expire subscription
SubscriptionApi getSubscription GET /v1/subscription/{handle} Get subscription
SubscriptionApi getSubscriptionDiscount GET /v1/subscription/{handle}/discount/{sdHandle} Get subscription discount
SubscriptionApi getSubscriptionDiscounts GET /v1/subscription/{handle}/discount Get subscription discounts
SubscriptionApi getSubscriptionPaymentMethods GET /v1/subscription/{handle}/payment_method Get payment methods
SubscriptionApi getSubscriptionPeriodBalance GET /v1/subscription/{handle}/period_balance Get the period balance for subscription
SubscriptionApi getSubscriptions GET /v1/subscription Get list of subscriptions
SubscriptionApi intervalAmount GET /v1/subscription/{handle}/interval_amount Calculate interval amount
SubscriptionApi onHold POST /v1/subscription/{handle}/on_hold Subscription on hold
SubscriptionApi reactivateSubscription POST /v1/subscription/{handle}/reactivate Reactivate subscription on hold
SubscriptionApi redeemCouponCode POST /v1/subscription/{handle}/coupon Redeem coupon code for subscription
SubscriptionApi removeAllPaymentMethods DELETE /v1/subscription/{handle}/payment_method Remove all payment methods
SubscriptionApi removePaymentMethod DELETE /v1/subscription/{handle}/payment_method/{method_id} Remove payment method
SubscriptionApi setPaymentMethod POST /v1/subscription/{handle}/payment_method Set payment method
SubscriptionApi uncancel POST /v1/subscription/{handle}/uncancel Uncancel subscription
UserApi deleteUser DELETE /v1/user/{id} Delete user
UserApi getUser GET /v1/user/{id} Get user
UserApi getUsers GET /v1/user Get users
UserApi inviteUser POST /v1/user/invite Invite user
UserApi inviteUserAccept POST /v1/user/invite/{token} Accept invite
UserApi inviteUserGet GET /v1/user/invite/{token} Get invite
UserApi resetPassword POST /v1/user/reset_password Reset password request
UserApi resetPasswordWithToken POST /v1/user/reset_password/{token} Reset password
UserApi updateAuth PUT /v1/user/{id}/groups Update user groups
UserApi updatePassword PUT /v1/user/{id}/password Change password
UserApi updateUser PUT /v1/user/{id} Update user
UserApi verifyEmail POST /v1/user/verify_email/{token} Verify email
UserApi verifyEmailRequest POST /v1/user/{id}/verify_email Send verification email
WebhookApi disableWebhooks POST /v1/webhook/disable Disable webhooks
WebhookApi getWebhook GET /v1/webhook/{id} Get webhooks
WebhookApi getWebhookRequests GET /v1/webhook/{id}/request Get webhook requests
WebhookApi getWebhooks GET /v1/webhook Get list of webhooks
WebhookApi resendJson POST /v1/webhook/resend Re-send webhooks
WebhookApi updateWebhooks POST /v1/webhook/update Update and resend webhooks

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header

basicAuth

  • Type: HTTP basic authentication