2017 © Pedro Peláez
 

library afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

image

trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  • Monday, May 28, 2018
  • by trollweb
  • Repository
  • 0 Watchers
  • 0 Stars
  • 171 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 61 % Grown

The README.md

SwaggerClient-php

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen), (*1)

This PHP package is automatically generated by the Swagger Codegen project:, (*2)

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

Requirements

PHP 5.4.0 and later, (*3)

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:, (*4)

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/afterpay-api/afterpay-api-lib.git"
    }
  ],
  "require": {
    "afterpay-api/afterpay-api-lib": "*@dev"
  }
}

Then run composer install, (*5)

Manual Installation

Download the files and include autoload.php:, (*6)

    require_once('/path/to/SwaggerClient-php/autoload.php');

Tests

To run the unit tests:, (*7)

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:, (*8)

checkoutAuthorizePayment($request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CheckoutApi->checkoutAuthorizePayment: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.afterpay.io, (*9)

Class Method HTTP request Description
CheckoutApi checkoutAuthorizePayment POST /api/v3/checkout/authorize Approves the payment for a specified customer and basket. Main use-cases are One-Step and Two-Step Authorization. Full fraud and credit scoring applied. If the online-shop customer enter the incorrect address data, the system delivers a suggestion for a corrected address.
CheckoutApi checkoutAvailablePaymentMethods POST /api/v3/checkout/payment-methods Returns the available payment methods for a specified basket value and offers available for client. Returns monthly installment amount, interest and fees. Sending in customer data and contents of the basket to enhance the result is optional. If the online-shop customer enters the incorrect address data, the system delivers suggestion for a corrected address. Main use-case is Two-Step Authorize.
CheckoutApi checkoutCreateContract POST /api/v3/checkout/{checkoutId}/contract Creates an installment and/or direct debit contract that can be displayed for the customer.
CommonApi commonCustomerLookup POST /api/v3/lookup/customer Returns the customers address based on social security number or mobile number.
CommonApi commonGetStatus GET /api/v3/status Gets the status of the service
CommonApi commonGetVersion GET /api/v3/version Gets the version of the service
CommonApi commonValidateAddress POST /api/v3/validate/address Check of the delivered customer addresses as well as a phonetic and associative identification of duplicates. Additionally, checks of client specific negative or positive lists can be processed. Usually, the AddressCheck is used for the pure verification of the address data e.g. for registration processes.
CommonApi commonValidateBankAccount POST /api/v3/validate/bank-account Validates and evaluates the account and bank details in the context of direct debit payment. It is possible to transfer either the combination of BankCode and AccountNumber or IBAN and BIC
CustomerAccountApi customerAccountAddEvent POST /api/v3/customer-account/{accountNumber}/event Add event to account
CustomerAccountApi customerAccountAddTransaction POST /api/v3/customer-account/{accountNumber}/transaction Add transaction to account
CustomerAccountApi customerAccountApplyForCredit POST /api/v3/customer-account Apply for customer account credit
CustomerAccountApi customerAccountCreateUser POST /api/v3/customer-account/{accountNumber}/user Add user to account
CustomerAccountApi customerAccountCreditLimit GET /api/v3/customer-account/{accountNumber}/credit-limit Get remaining account credit limit
CustomerAccountApi customerAccountDeleteTransaction DELETE /api/v3/customer-account/{accountNumber}/transaction/{transactionId} Cancels transaction made by account
CustomerAccountApi customerAccountLookupBySSN GET /api/v3/customer-account/{ssn} Find customer account by SSN (social security number)
OrderManagementApi orderManagementAddShippingDetails POST /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details Add new shipping details information to the capture.
OrderManagementApi orderManagementCapture POST /api/v3/orders/{orderNumber}/captures Completes the payment that has been authorized. Typically done when the order is shipped. Can be a full or partial capture of the order amount.
OrderManagementApi orderManagementDeleteShippingDetails DELETE /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber} Delete shipping details information from the specific capture.
OrderManagementApi orderManagementGetCapture GET /api/v3/orders/{orderNumber}/captures/{captureNumber} Returns all or specific captured payments of the order
OrderManagementApi orderManagementGetOrder GET /api/v3/orders/{orderNumber} Returns the contents of the specified order
OrderManagementApi orderManagementGetRefund GET /api/v3/orders/{orderNumber}/refunds/{refundNumber} Returns all or specific refunds of the order.
OrderManagementApi orderManagementGetShippingDetails GET /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber} Returns all or specific shipping details information of the capture.
OrderManagementApi orderManagementGetVoid GET /api/v3/orders/{orderNumber}/voids/{voidNumber} Returns all or specific voided (cancelled) authorizations of the order.
OrderManagementApi orderManagementRefund POST /api/v3/orders/{orderNumber}/refunds Refunds a partially or fully captured payment.
OrderManagementApi orderManagementUpdateShippingDetails PATCH /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber} Update shipping details information of the specific capture.
OrderManagementApi orderManagementVoid POST /api/v3/orders/{orderNumber}/voids Void (cancel) an authorization that has not been captured.
ProductApi productAvailableInstallmentPlans POST /api/v3/lookup/installment-plans Returns the available installment plans for the specific product/basket value. Returns monthly installment amount, interest and fees. Typically used on a product page.
SearchApi searchSearchInvoicesProcessed POST /api/v3/search/invoices/processed Returns invoices matching criteria

Documentation For Models

Documentation For Authorization

apiKey

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

Author

The Versions

28/05 2018

dev-develop

dev-develop https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache-2.0

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

16/05 2018

1.5.1

1.5.1.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache-2.0

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

16/05 2018

dev-master

9999999-dev https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache-2.0 Apache V2 proprietary

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

16/05 2018

1.5.0

1.5.0.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache-2.0

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

09/04 2018

1.4.0

1.4.0.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

proprietary

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

09/04 2018

1.3.0

1.3.0.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

proprietary

The Requires

 

The Development Requires

api php swagger sdk

07/02 2018

1.2.1

1.2.1.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache-2.0

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

07/02 2018

1.0.1

1.0.1.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache-2.0

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

27/04 2017

1.2.0

1.2.0.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache V2

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

20/04 2017

1.1.0

1.1.0.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache V2

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

18/04 2017

1.0.0

1.0.0.0 https://bitbucket.org/trollweb/afterpay-api

Swagger generated api library for https://developer.afterpay.io/api

  Sources   Download

Apache V2

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk