trollweb/afterpay-api

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

2.1.1 2020-09-23 10:30 UTC

This package is auto-updated.

Last update: 2025-05-11 03:21:51 UTC


README

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

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

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

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

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

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/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');

$api_instance = new Trollweb\AfterPayApi\Api\CheckoutApi();
$request = new \Trollweb\AfterPayApi\Model\AuthorizePaymentRequest(); // \Trollweb\AfterPayApi\Model\AuthorizePaymentRequest | 

try {
    $result = $api_instance->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

ClassMethodHTTP requestDescription
CheckoutApicheckoutAuthorizePaymentPOST /api/v3/checkout/authorizeApproves 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.
CheckoutApicheckoutAvailablePaymentMethodsPOST /api/v3/checkout/payment-methodsReturns 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.
CheckoutApicheckoutCreateContractPOST /api/v3/checkout/{checkoutId}/contractCreates an installment and/or direct debit contract that can be displayed for the customer.
CommonApicommonCustomerLookupPOST /api/v3/lookup/customerReturns the customers address based on social security number or mobile number.
CommonApicommonGetStatusGET /api/v3/statusGets the status of the service
CommonApicommonGetVersionGET /api/v3/versionGets the version of the service
CommonApicommonValidateAddressPOST /api/v3/validate/addressCheck 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.
CommonApicommonValidateBankAccountPOST /api/v3/validate/bank-accountValidates 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
CustomerAccountApicustomerAccountAddEventPOST /api/v3/customer-account/{accountNumber}/eventAdd event to account
CustomerAccountApicustomerAccountAddTransactionPOST /api/v3/customer-account/{accountNumber}/transactionAdd transaction to account
CustomerAccountApicustomerAccountApplyForCreditPOST /api/v3/customer-accountApply for customer account credit
CustomerAccountApicustomerAccountCreateUserPOST /api/v3/customer-account/{accountNumber}/userAdd user to account
CustomerAccountApicustomerAccountCreditLimitGET /api/v3/customer-account/{accountNumber}/credit-limitGet remaining account credit limit
CustomerAccountApicustomerAccountDeleteTransactionDELETE /api/v3/customer-account/{accountNumber}/transaction/{transactionId}Cancels transaction made by account
CustomerAccountApicustomerAccountLookupBySSNGET /api/v3/customer-account/{ssn}Find customer account by SSN (social security number)
OrderManagementApiorderManagementAddShippingDetailsPOST /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-detailsAdd new shipping details information to the capture.
OrderManagementApiorderManagementCapturePOST /api/v3/orders/{orderNumber}/capturesCompletes the payment that has been authorized. Typically done when the order is shipped. Can be a full or partial capture of the order amount.
OrderManagementApiorderManagementDeleteShippingDetailsDELETE /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber}Delete shipping details information from the specific capture.
OrderManagementApiorderManagementGetCaptureGET /api/v3/orders/{orderNumber}/captures/{captureNumber}Returns all or specific captured payments of the order
OrderManagementApiorderManagementGetOrderGET /api/v3/orders/{orderNumber}Returns the contents of the specified order
OrderManagementApiorderManagementGetRefundGET /api/v3/orders/{orderNumber}/refunds/{refundNumber}Returns all or specific refunds of the order.
OrderManagementApiorderManagementGetShippingDetailsGET /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber}Returns all or specific shipping details information of the capture.
OrderManagementApiorderManagementGetVoidGET /api/v3/orders/{orderNumber}/voids/{voidNumber}Returns all or specific voided (cancelled) authorizations of the order.
OrderManagementApiorderManagementRefundPOST /api/v3/orders/{orderNumber}/refundsRefunds a partially or fully captured payment.
OrderManagementApiorderManagementUpdateShippingDetailsPATCH /api/v3/orders/{orderNumber}/captures/{captureNumber}/shipping-details/{shippingNumber}Update shipping details information of the specific capture.
OrderManagementApiorderManagementVoidPOST /api/v3/orders/{orderNumber}/voidsVoid (cancel) an authorization that has not been captured.
ProductApiproductAvailableInstallmentPlansPOST /api/v3/lookup/installment-plansReturns the available installment plans for the specific product/basket value. Returns monthly installment amount, interest and fees. Typically used on a product page.
SearchApisearchSearchInvoicesProcessedPOST /api/v3/search/invoices/processedReturns invoices matching criteria

Documentation For Models

Documentation For Authorization

apiKey

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

Author