skip-pay/skippay-payments-php-sdk

API documentation for Skip Pay partners.

dev-main 2024-02-26 15:01 UTC

This package is auto-updated.

Last update: 2024-04-26 15:24:17 UTC


README

logo.webp

skippay-php-sdk composer php

  • PHP client for API documentation for Skip Pay partners.

  • API version: 1.0

For more information, please visit our developer portal

Installation

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/skip-pay/skippay-payments-php-sdk"
    }
  ],
  "require": {
    "skippay/skippay-payments-php-sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/skippay-payments-php-sdk/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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

$config = SkipPay\Configuration::getDefaultConfiguration();

$authApi = new SkipPay\Api\SecurityApi(
  new GuzzleHttp\Client(),
  $config,
);

// Example, store this securely
$username = 'USER_NAME';
$password = 'PASSWORD';

// Obtain access token
$authResponse = $authApi->loginpartner([
  'username' => $username, 
  'password' => $password
]);

// Configure access token
$config->setAccessToken($authResponse['accessToken']);

$sdk = new SkipPay\Sdk(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$applicationId = 11b00a1ef1; // string | applicationId
$applicationCancelRequest = new \SkipPay\Model\ApplicationCancelRequest(); // \SkipPay\Model\ApplicationCancelRequest

try {
    $result = $sdk->ApplicationOperationsApi()->cancelapplication($applicationId, $applicationCancelRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationOperationsApi()->cancelapplication(): ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.partner.skippay.cz

Class Method HTTP request Description
ApplicationOperationsApi cancelapplication PUT /financing/v1/applications/{applicationId}/cancel Cancel application
ApplicationOperationsApi changeapplicationorder PUT /financing/v1/applications/{applicationId}/order Change application order
ApplicationOperationsApi createapplication POST /financing/v1/applications Create application
ApplicationOperationsApi createapplicationfromrecurrence POST /financing/v1/recurrences/{recurrenceId}/applications Create application from recurrence
ApplicationOperationsApi getapplicationdetail GET /financing/v1/applications/{applicationId} Get application detail
ApplicationOperationsApi getorder GET /financing/v1/orders Get order
ApplicationOperationsApi getpaymentsonspecificapplication GET /financing/v1/applications/{applicationId}/payments Get payments on specific application
ApplicationOperationsApi getrecurrence GET /financing/v1/recurrences/{recurrenceId} Get recurrence
ApplicationOperationsApi markorderitemsascancelled PUT /financing/v1/applications/{applicationId}/order/cancel Mark order items as cancelled
ApplicationOperationsApi markorderitemsasdelivered PUT /financing/v1/applications/{applicationId}/order/deliver Mark order items as delivered
ApplicationOperationsApi markorderitemsasreturned PUT /financing/v1/applications/{applicationId}/order/return Mark order items as returned
ApplicationOperationsApi markorderitemsassent PUT /financing/v1/applications/{applicationId}/order/send Mark order items as sent
ApplicationOperationsApi updaterecurrence PATCH /financing/v1/recurrences/{recurrenceId} Update recurrence
HealthCheckApi aPIhealthcheck GET /v1/health API health check
PrecheckOperationsApi precheck POST /financing/v1/precheck Precheck
SecurityApi loginpartner POST /authentication/v1/partner Login partner

Models

Authorization

httpBearer

  • Type: Bearer authentication

Author

info@skippay.cz