Show:

Contains all Requests connected with payments

Methods

confirmPayment
(
  • paymentIntent
)
Object
async

As part of new bank regulations, we need to provide options for additional authentication during the payment flow for customers

Parameters:

  • paymentIntent String

Returns:

Object:

Contains the data - { message: "Submitted for payment", }

Example:

InPlayer.Payment
.confirmPayment('332242')
.then(data => console.log(data));
create
(
  • data
)
Object
async

Makes a Payment for a given Authorization token + asset/payment details. Use this method ONLY if the assetFee.type is not 'subscription' or 'freemium'. Otherwise please use InPlayer.Subscription.create()

Parameters:

  • data Object
    • Payment data - { number: number || string, cardName: string, expMonth: number, expYear: number, cvv: number, accessFee: number, paymentMethod: string, referrer: string voucherCode?: string brandingId?: number returnUrl?: string }

Returns:

Object:

Contains the data - { message: "Submitted for payment", }

Example:

InPlayer.Payment
.create({
  number: 4111111111111111,
  cardName: 'PayPal',
  expMonth: 10,
  expYear: 2030,
  cvv: 656,
  accessFee: 2341,
  paymentMethod: 1,
  referrer: 'http://google.com',
  voucherCode: 'fgh1982gff-0f2grfds',
  brandingId: 1234,
  returnUrl: 'https://event.inplayer.com/staging'
 })
.then(data => console.log(data));
createDirectDebitMandate
(
  • data
)
Object
async

Create direct debit mandate for customer

Parameters:

  • data Object
    • Contains the data - { name: {string}, iban: {string}, }

Returns:

Object:

Contains the data - { "id": "src_1F2GzxJqmvwo8uTaJnRVkgYS", "currency": "eur", "created": 1564576421, "client_secret": "src_client_secret_FXLhLpWGLiupZtUlPStd3jLo", "owner": "John", "full_name": "Bret Johannes", "statement_descriptor": "InPlayer", "status": "chargeable", type_data: { "bank_code": 37040044, "branch_code": 111000000, "country": "DE", "fingerprint": "wGjUgpjH1Rj4NtBf", "last4": 3000, "mandate_reference": "8OC5CIAXSF2UKON4", "mandate_url": "https://hooks.stripe.com/adapter/sepa_debit/file/src_1F2Jqmvwo8DwAwwqraJnRVkgYS" } }

Example:

InPlayer.Payment
.createDirectDebitMandate({name, iban})
.then(data => console.log(data));
directDebitCharge
(
  • data
)
Object
async

Process a request for direct debit SEPA charge

Parameters:

  • data Object
    • Contains the data - { assetId: {string}, accessFeeId: {string}, voucherCode: {string}, brandingId?: number }

Returns:

Object:

Contains the data - { code: '200', message: "Submitted for payment", }

Example:

InPlayer.Payment
.directDebitCharge({ assetId, accessFeeId, voucherCode, brandingId })
.then(data => console.log(data));
directDebitSubscribe
(
  • data
)
Object
async

Process a request for direct debit subscribe

Parameters:

  • data Object
    • Contains the data - { assetId: {string}, accessFeeId: {string}, voucherCode: {string}, brandingId?: number }

Returns:

Object:

Contains the data - { code: '200', message: "Submitted for payment", } }

Example:

InPlayer.Payment
.directDebitSubscribe({ assetId, accessFeeId, voucherCode, brandingId })
.then(data => console.log(data));
getDefaultCreditCard () Object
async

Gets the default credit card per currency used for subscription rebills

Returns:

Object

Example:

InPlayer.Payment
.getDefaultCreditCard()
.then(data => console.log(data));
getDirectDebitMandate () Object
async

Checks for existing user direct debit mandate

Returns:

Object:

Contains the data - { is_approved: {boolean}, statement_descriptor: {string}, mandate: { "bank_code": 37040044, "branch_code": 111000000, "country": "DE", "fingerprint": "wGjUgpjH1Rj4NtBf", "last4": 3000, "mandate_reference": "8OC5CIAXSF2UKON4", "mandate_url": "https://hooks.stripe.com/adapter/sepa_debit/file/src_1F2Jqmvwo8DwAwwqraJnRVkgYS" } }

Example:

InPlayer.Payment
.getDirectDebitMandate()
.then(data => console.log(data));
getPaymentMethods () Object
async

Get all payment methods for a User

Returns:

Object

Example:

InPlayer.Payment
.getPaymentMethods()
.then(data => console.log(data));
getPaymentTools
(
  • paymentMethodId
)
Object
async

Get the payment tools for an aothorization token and payment method ID

Parameters:

  • paymentMethodId Number
    • The Payment Method ID

Returns:

Object

Example:

InPlayer.Payment
.getPaymentTools(2)
.then(data => console.log(data));
getPayPalParams
(
  • data
)
Object
async

Gets parameters for PayPal

Parameters:

  • data Object
    • Contains details - { origin: {string}, accessFeeId: {number}, paymentMethod: {number} }

Returns:

Object

Example:

InPlayer.Payment
.getPayPalParams({
 origin: location.href,
 accessFeeId: 34,
 paymentMethod: 2
 voucherCode: '1231231'
 brandingId: 1221
})
.then(data => console.log(data));
getPurchaseHistory
(
  • status
  • page
  • limit
)
Object
async

Gets the purchase history

Parameters:

  • status String
    • The status of the purchase - active/inactive
  • page Number
    • The current page
  • limit Number
    • The number of items per page

Returns:

Object

Example:

InPlayer.Payment
.getPurchaseHistory('active', 0, 5)
.then(data => console.log(data));
setDefaultCreditCard
(
  • data
)
Object
async

Sets card per currency as default card that is to be used for further subscription rebills

Parameters:

  • data Object
    • Contains the data - { cardNumber: {string}, cardName: {string}, cvc: {number}, expMonth: {number}, expYear: {number}, currency: {string} }

Returns:

Object

Example:

InPlayer.Payment
.setDefaultCreditCard({
     cardNumber: '4242424242424242',
     cardName: 'John Doe',
     cvc: 123,
     expMonth: 1,
     expYear: 2020,
     currency: 'EUR'
 })
.then(data => console.log(data));