Skip to content

Latest commit

 

History

History
337 lines (289 loc) · 17.2 KB

API.md

File metadata and controls

337 lines (289 loc) · 17.2 KB

EveryPay Gateway ES6 Bindings API

  • Cards

  • Customers

  • Payments

  • Refunds

  • Tokens

    Cards

    createCard (NamedParams: Object) : Promise<CardObject>
    Parameters (object with named properties)

    • endPointURL
      optional (default EVERYPAY_APIENDPOINT)
    • endPointKey
      optional (default EVERYPAY_PRIVATE_KEY)
    • card_number Card number without any separators.
      optional (only used if creating with card arguments)
    • customerId The unique Customer ID.
    • default_card Whether to set provided card as default.
      optional (default: 0)
    • expiration_month Card expiration month (2 digits).
      optional (only used if creating with card arguments)
    • expiration_year Card expiration year (4 digits).
      optional (only used if creating with card arguments)
    • holder_name Cardholder’s name.
      optional (only used if creating with card arguments)
    • token An unused and non expired Card Token ID.
      optional

    retrieveCard (NamedParams: Object) : Promise<CardObject>
    Parameters (object with named properties)

    • endPointURL
      optional (default EVERYPAY_APIENDPOINT)
    • endPointKey
      optional (default EVERYPAY_PRIVATE_KEY)
    • cardId The unique Card ID.
    • customerId The unique Customer ID.

    deleteCard (NamedParams: Object) : Promise<DeletedCardObject>
    Parameters (object with named properties)

    • endPointURL
      optional (default EVERYPAY_APIENDPOINT)
    • endPointKey
      optional (default EVERYPAY_PRIVATE_KEY)
    • cardId The unique Card ID.
    • customerId The unique Customer ID.

    listCards (NamedParams: Object) : Promise<CardsCollectionObject>
    Parameters (object with named properties)

    • endPointURL
      optional (default EVERYPAY_APIENDPOINT)
    • endPointKey
      optional (default EVERYPAY_PRIVATE_KEY)
    • count The number of records to return back in response. Limit can range between 1 and 20.
      optional (default: 10)
    • date_from Provide a date from in YYYY-MM-DD format.
      optional
    • date_to Provide a date to in YYYY-MM-DD format.
      optional
    • offset The number of records to skip before adding results to the response.
      optional (default: 0)

Customers

createCustomer (NamedParams: Object) : Promise<CustomerObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • card_number Card number without any separators.
    optional (only used if creating with card arguments)
  • description A description of your customer object.
    optional
  • email Customer’s email address. This address is used in order to send the payment receipt.
    optional
  • expiration_month Card expiration month (2 digits).
    optional (only used if creating with card arguments)
  • expiration_year Card expiration year (4 digits).
    optional (only used if creating with card arguments)
  • full_name Customer’s full name.
    optional
  • holder_name Cardholder’s name.
    optional (only used if creating with card arguments)
  • token An unused and non expired Card Token ID.
    optional

retrieveCustomer (NamedParams: Object) : Promise<CustomerObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • customerId The unique Customer ID.

updateCustomer (NamedParams: Object) : Promise<CustomerObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • card The Card ID.
    optional
  • customerId The unique Customer ID.
  • default_card Whether to set provided card as default.
    optional (default: 0)
  • description A description of your customer object.
    optional
  • email Customer’s email address. This address is used in order to send the payment receipt.
    optional
  • full_name Customer’s full name.
    optional

deleteCustomer (NamedParams: Object) : Promise<DeletedCustomerObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • customerId The unique Customer ID.

listCustomers (NamedParams: Object) : Promise<CutomersCollectionObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • count The number of records to return back in response. Limit can range between 1 and 20.
    optional (default: 10)
  • date_from Provide a date from in YYYY-MM-DD format.
    optional
  • date_to Provide a date to in YYYY-MM-DD format.
    optional
  • offset The number of records to skip before adding results to the response.
    optional (default: 0)

Payments

createPayment (NamedParams: Object) : Promise<PaymentObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • amount A positive integer in the smallest currency unit e.g in cents (e.g 10,99 EUR shall be converted to 1099).
  • capture Whether to immediately capture the payment.
    optional (default: 1)
  • card_number Card number without any separators.
    optional (only used if creating with card arguments)
  • card In case a payment is made with a Customer ID you can define which card of the customer will be charged by providing a valid Card ID. If this atrribute is skipped then the customer’s default card will be used.
    optional
  • create_customer 1 after a successfull payment a customer object is created and the payment card is assigned to it as default card.
    optional (default: 0)
  • customer By providing a Customer ID along with the payment details, the payment and the Card is assigned to the specified customer. This is useful if in case a customer is paying with a new card and you want to avoid multiple API calls.
    optional
  • cvv The 3 or 4 digits security code of the card.
    optional (only used if creating with card arguments)
  • default_card Shall be used in conjuction with the customer parameter.
    optional (default: 0)
  • description A description of the payment.
    optional
  • expiration_month Card expiration month (2 digits).
    optional (only used if creating with card arguments)
  • expiration_year Card expiration year (4 digits).
    optional (only used if creating with card arguments)
  • holder_name Cardholder’s name.
    optional (only used if creating with card arguments)
  • installments A positive integer indicating the number of installments which the payer has applied to. Max. installment count is 36 and depends on merchant’s configuration. If card or merchant account doesn’t support installments an error will be thrown.
    optional
  • max_installments A positive integer indicating the maximum count of allowed installments. This value is taken into account only if in the token parameter a Token ID is passed. This will ensure that the max. installment value of the token matches the provided value. If a mismatch is encountered then an error will be thrown.
    optional
  • merchant_ref A unique ID set by the merchant. The merchant reference ID remains the same throughout the lifetime of the payment. Maximum chars 120. If a payment with the same merchant reference ID is again submitted then an error will be thrown.
    optional
  • payee_email Provide the email address to which a payment receipt will be sent. This will override a customer’s email address in case payment is made with a customer token.
    optional
  • payee_phone Provide the customer’s phone.
    optional
  • token It can be either a Card Token ID or a Customer ID.
    optional

retrievePayment (NamedParams: Object) : Promise<PaymentObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • paymentId The unique Payment ID.

capturePayment (NamedParams: Object) : Promise<PaymentObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • paymentId The unique Payment ID.

listPayments (NamedParams: Object) : Promise<PaymentsCollectionObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • count The number of records to return back in response. Limit can range between 1 and 20.
    optional (default: 10)
  • date_from Provide a date from in YYYY-MM-DD format.
    optional
  • date_to Provide a date to in YYYY-MM-DD format.
    optional
  • merchant_ref Provide the unique merchant reference ID used in the payment creation call.
    optional
  • offset The number of records to skip before adding results to the response.
    optional (default: 0)

Refunds

createRefund (NamedParams: Object) : Promise<RefundObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • amount The amount (in cents) to refund. This must be less or equal to current amount of payment that is being refunded. If no amount is provided then the remaining amount of payment will be used.
    optional
  • description Useful to describe the refund reason.
    optional
  • payment The Payment ID of the payment to refund.

retrieveRefund (NamedParams: Object) : Promise<RefundObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)
  • refundId The unique Refund ID.

listRefunds (NamedParams: Object) : Promise<RefundsCollectionObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)

  • endPointKey
    optional (default EVERYPAY_PRIVATE_KEY)

  • count The number of records to return back in response. Limit can range between 1 and 20.
    optional (default: 10)

  • date_from Provide a date from in YYYY-MM-DD format.
    optional

  • date_to Provide a date to in YYYY-MM-DD format.
    optional

  • offset The number of records to skip before adding results to the response.
    optional (default: 0)

  • payment Provide the Payment ID to fetch refunds only for the specified payment.
    optional

Tokens

createToken (NamedParams: Object) : Promise<TokenObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PUBLIC_KEY)
  • card_number Card number without any separators.
  • cvv The 3 or 4 digits security code of the card.
  • expiration_month Card expiration month (2 digits).
  • expiration_year Card expiration year (4 digits).
  • holder_name Cardholder’s name.

retrieveToken (NamedParams: Object) : Promise<TokenObject>
Parameters (object with named properties)

  • endPointURL
    optional (default EVERYPAY_APIENDPOINT)
  • endPointKey
    optional (default EVERYPAY_PUBLIC_KEY)
  • tokenId The unique Token ID.