InPlayer API (2.0.0)

Download OpenAPI specification:Download

INTRODUCTION

InPlayer equips you to run a detailed subscription business model, to build and grow your consumer base, and drive significant revenues. Our paywall supports recurring payments and billing cycles, consumer acquisition, subscriber lifecycle management, and provides you with consumer retention CRM tools.

Once you create an InPlayer Merchant Account, you are entitled to using our InPlayer dashboard for publishing, managing, and selling your premium content. Moreover, you can always integrate with our APIs for a full custom integration.

INPLAYER API

The InPlayer API follows the REST architectural style and uses standard HTTP response codes to indicate success requests (2xx) or API errors (4xx, 5xx). Each of the InPlayer Core Resources (Accounts & Authentication, Asset & Access, Payments & Subscriptions, Vouchers & Promotions, Branding, Restrictions & Rules, Reporting, Analytics, and Features) has their own URL and each of the operations involved (POST, PUT, PATCH, GET, and DELETE) carries a specific meaning like creating, updating, fetching, deleting data, and much more.

All API requests should contain Content-Type:application/x-www-form-urlencoded header. The responses are always returned in JSON object(s), both for the successful requests and the failed attempts (errors).

DOCS TERMINOLOGY

The following section defines the domain language used across our platform. Proceed reading to introduce yourself to the terms employed for each of our Core Resources before you start working on your custom integration.

Accounts and Account Types

Term Explanation
merchant The Merchants are those who have ownership of the premium content.
consumer The Consumers are those who can view or buy the premium content.
customer The Customers are those who have made at least one purchase.
uuid Stands for the Unique Identifier of the Merchant. You can find it on the InPlayer's dashboard at the Account Details section as Account ID.

Items/Assets and Item Types

Term Explanation
items The digital Assets that Merchants can protect and sell. Asset is an Item with applied pricing and access options.
item_type The type of the digital content that can be created in the InPlayer platform. According to the type of the premium content, we distinguish between a few item types. Currently, we support HTML/Text (where you can store HTML code or any IFRAME code), video, file, and RSS type of asset.
content The content of the Item is the premium content that you can store and protect. Once the Customer has access to the Item, they can view the content.
metadata An unlimited key-value store containing additional info of the Item concerned.

Access Types

Term Explanation
access_type The supported types of granting access in the system (pay-per-view and subscription).
period The period of the access entitlement that consumers get after purchasing the asset.

Access Fees

Term Explanation
access_fee The applied access_type and price to an Item.

Items Packages

Term Explanation
package The Packages are a collection of multiple Items (a group of Items). You can set up a Package Access Fee as an additional pricing option for Items that are part of a given Package. Once the Customer buys the Package Access Fee, they will have access to every Item that belongs to that Package.

API ENVIRONMENTS

To make the API as explorable as possible, we have two different environments for production related and testing purposes. There is no switch for changing between modes, so just refer to the URL you need.

ERRORS

InPlayer uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g. a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with InPlayer's servers.

Not all errors map cleanly onto HTTP response codes, however. For instance, when a request is valid but does not complete successfully (e.g. if the asset access is not found), we return a 402 error code.

List of status codes

Status code Explanation
200 OK Everything worked as expected.
201 Created The resource has been created.
202 Accepted The request has been accepted for processing but the processing has not been completed.
204 No Content The server has fulfilled the request but does not need to return an entity-body.
400 Bad Request The request was unacceptable, often due to omission of a required parameter.
401 Unauthorized No valid access token provided.
402 Request Failed The parameters were valid but the request failed.
404 Not Found The requested resource does not exist.
409 Conflict The request conflicts with another request.
429 Too Many Requests Too many requests have been sent to the API in a short amount of time. We recommend using exponential backoff for your requests.
500, 502, 503, 504 Server Errors Something went wrong on InPlayer's end.

V1

All operations related to payments & subscriptions

Generate PayPal parameters

This API call requires Authorization header with Access Token for the Customer auth - Authorization: Bearer

With this call you will be able to generate all parameters needed for PayPal payments. Primarely the external PayPal link where you need to redirect the end user to complete the payment on PayPal site. In the API call you will need to send the origin where you want the end-user to be redirected back after the payment result from paypal.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
access_fee
required
integer

Access fee id

payment_method
required
integer

Payment method id

origin
required
string

origin URL

voucher_code
string

Voucher code for discount

Responses

Request samples

curl -X POST https://services.inplayer.com/external-payments \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{}

Cancels a PayPal subscription

Cancels the customer's PayPal subscription.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": 201,
  • "subscription_id": "S-nvpjWSd5dZKt9mZZFC0iIu1s2-PP",
  • "message": "Submited for cancel"
}

Creates payment

⚠️ Warning - This method typically requires PCI SAQ D compliance

This API call requires Authorization header with Access Token for the Customer auth - Authorization: Bearer

Creates payment for the customer by entering all the relevant payment details. There is a different approach to payment execution when dealing with PayPal payments (since the process is external). For that purpose, please refer to our Generate PayPal parameters API call.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
number
required
string

The card number

card_name
required
string

The cardholder's name

cvv
required
integer

The card’s CVV number

exp_month
required
integer [ 1 .. 12 ]

The month that the customer’s card expires

exp_year
required
integer

The year that the customer’s card expires

access_fee
required
integer

Access fee ID

payment_method
required
integer

Payment method ID

return_url
required
string

Return URL to your website in case of SCA

voucher_code
string

Voucher code for discount

referrer
required
string

URL where the payment was initiated

Responses

Request samples

curl -X POST  https://services.inplayer.com/payments \
    -H 'Authorization:Bearer <token>' \
    -d access_fee=3 \
    -d payment_method=1
    -d number=4556667461842391 \
    -d cvv=123 \
    -d exp_month=11 \
    -d exp_year=18 \
    -d card_name='John Doe' \
    -d voucher_code=F00B4R!@ \
    -d referrer=https://example.com

Response samples

Content type
application/json
{
  • "message": "Submitted for payment"
}

Get number of payments per asset per country

Returns the number of payments per asset and per country.

Authorizations:
bearerAuth
query Parameters
startDate
string
Example: startDate=2019-02-03T00:00:00.000Z

The time and date set as the starting point of calculation

endDate
string
Example: endDate=2019-02-03T23:59:59.000Z

The time and date set as the ending point of calculation

itemId
integer
Example: itemId=40383

The ID of the asset

countryIso
string
Example: countryIso=UK

Two-letter alphabetic geocode that represents the user's country

Responses

Request samples

curl https://services.inplayer.com/payments/asset-country \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "collection": [
    ]
}

Get Number of Payments per Asset

Returns the number of payments per asset.

Authorizations:
bearerAuth
query Parameters
startDate
string
Example: startDate=2019-02-03T00:00:00.000Z

The time and date set as the starting point of calculation

endDate
string
Example: endDate=2019-02-03T23:59:59.000Z

The time and date set as the ending point of calculation

itemId
integer
Example: itemId=40383

The ID of the asset

countryIso
string
Example: countryIso=UK

Two-letter alphabetic geocode that represents the user's country

Responses

Response samples

Content type
application/json
{
  • "collection": [
    ]
}

Get merchant active payment method

Returns the current active payment method for the merchant.

path Parameters
merchantUUID
required
string <uuid>
Example: 528b1b80-5868-4abc-a9b6-4d3455d719c8

The merchant's UUID

Responses

Request samples

curl https://services.inplayer.com/payments/providers/{merchant_uuid}

Response samples

Content type
application/json
{
  • "id": 1,
  • "method_name": "Card",
  • "is_external": false,
  • "active": true,
  • "account_id": 2,
  • "provider_name": "Stripe"
}

Get merchant payment methods

The first thing that is needed before executing payments is the preferred payment method that should be the end-user choice. You can fetch all possible payment methods for one Merchant with the following call. You can use the Payment Method ID from the response in the future payment or subscription action.

Authorizations:
bearerAuth
query Parameters
merchantID
integer

The ID of the follower account if the operation is called by a master account

all
boolean

If set to true all methods active/inactive will be returnet, if not, just the active methods

Responses

Request samples

curl https://services.inplayer.com/payments/methods \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get merchant payment providers

This will return all of the Merchant's available and enabled payment providers.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/payments/providers \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "payment_methods": {
    },
  • "bank_statement": "Your Bank Statement",
  • "stripe_connect": false
}

Create a Bank Statement descriptor

Create a Bank Statement descritor, that will be displayed to the merchant's customers, when they receive their card payment notifications from their issuer bank

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
bank_statement
required
string

Bank Statement

Responses

Request samples

curl -X POST https://services.inplayer.com/payments/providers/bank-statement \
    -H 'Authorization:Bearer <token>'
    -d bank_statement='Bank Statement'

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "The bank statement was successfully set."
}

Delete a Bank Statement descriptor

Delete the merchant's custom payment bank descriptor (reverts to using the default InPlayer descriptor)

Authorizations:
bearerAuth

Responses

Request samples

curl -X DELETE https://services.inplayer.com/payments/providers/bank-statement \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "The bank statement was successfully removed. Reverted to using the default InPlayer bank statement for further payments."
}

Get Revenue per Asset per Country

Returns revenue per asset and per country

Authorizations:
bearerAuth
query Parameters
startDate
string
Example: startDate=2019-02-03T00:00:00.000Z

The time and date set as the starting point of calculation

endDate
string
Example: endDate=2019-02-03T23:59:59.000Z

The time and date set as the ending point of calculation

itemId
integer
Example: itemId=40383

The ID of the asset

countryIso
string
Example: countryIso=UK

Two-letter alphabetic geocode that represents the user's country

Responses

Request samples

curl https://services.inplayer.com/payments/revenue/asset-country \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "collection": [
    ]
}

Get Revenue per Asset

Returns revenue per asset.

Authorizations:
bearerAuth
query Parameters
startDate
string
Example: startDate=2019-02-03T00:00:00.000Z

The time and date set as the starting point of calculation

endDate
string
Example: endDate=2019-02-03T23:59:59.000Z

The time and date set as the ending point of calculation

itemId
integer
Example: itemId=40383

The ID of the asset

countryIso
string
Example: countryIso=UK

Two-letter alphabetic geocode that represents the user's country

Responses

Request samples

curl https://services.inplayer.com/payments/revenue/asset \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "collection": [
    ]
}

Get Revenue per Country

Returns revenue per country.

Authorizations:
bearerAuth
query Parameters
startDate
string
Example: startDate=2019-02-03T00:00:00.000Z

The time and date set as the starting point of calculation

endDate
string
Example: endDate=2019-02-03T23:59:59.000Z

The time and date set as the ending point of calculation

Responses

Request samples

curl https://services.inplayer.com/payments/revenue/country \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "collection": {
    }
}

Stripe Connect request

With this call a merchant can make a request to have the Stripe Connect option enabled for his account

Authorizations:
bearerAuth

Responses

Request samples

curl -X POST https://services.inplayer.com/stripe-connect-request \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 201,
  • "message": "Your request has been accepted and will be processed soon"
}

Stripe Connect

With this the merchant's Stripe account is connected to the InPlayer Stripe connect application

Authorizations:
bearerAuth

Responses

Request samples

curl -X POST https://services.inplayer.com/stripe-connect \
    -H 'Authorization:Bearer <token>'
    -d authorization_code=1234

Response samples

Content type
application/json
{
  • "code": 200
}

Get Transactions

Returns list of transactions and number of unique paying customers

Authorizations:
bearerAuth
query Parameters
size
required
integer
Example: size=10
page
required
integer
Example: page=1
startDate
required
string
Example: startDate=2020-01-06+14:09:23
endDate
required
string
Example: endDate=2020-01-06+14:09:23
action
required
string
Example: action=recurrent
filter
Array of strings
Example: filter=asset title:title

key values to filter transactions

exclude
boolean
Example: exclude=true
unique
boolean
Example: unique=true
type
string
Example: type=recurrent,charge

Responses

Request samples

curl https://services.inplayer.com/payments/transactions \
    -H 'Authorization:Bearer <token>'
    -d size=10 \
    -d page=1 \
    -d startDate='2020-01-06+14:09:23' \
    -d endDate='2020-02-06+14:09:23' \
    -d action='recurrent' \
    -d filter[0]='asset title:title' \
    -d exclude=false \
    -d unique=true \
    -d type='recurrent,charge' \

Response samples

Content type
application/json
{
  • "total": 539,
  • "collection": [
    ],
  • "unique_paying_customers": 768
}

Get subscriptions

Get all the Customer/Merchant subscription records.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/subscriptions \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "total": 1,
  • "page": 1,
  • "offset": 0,
  • "limit": 5,
  • "collection": [
    ]
}

Creates subscription

⚠️ Warning - This method typically requires PCI SAQ D compliance

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
number
required
string

Card number

card_name
required
string

Cardholder's name

cvv
required
integer

CVV number

exp_month
required
integer [ 1 .. 12 ]

Card expiration month

exp_year
required
integer

Card expiration year

access_fee
required
integer

Access fee id

payment_method
required
integer

Payment method ID

voucher_code
string

Voucher code for discount

return_url
required
string

Return URL to your website in case of SCA

referrer
required
string

URL where the payment was initiated

Responses

Request samples

curl -X POST  https://services.inplayer.com/subscriptions \
    -H 'Authorization:Bearer <token>' \
    -d access_fee=3 \
    -d payment_method=1
    -d number=4556667461842391 \
    -d cvv=123 \
    -d exp_month=11 \
    -d exp_year=18 \
    -d card_name='John Doe' \
    -d voucher_code=F00B4R!@ \
    -d referrer=https://example.com

Response samples

Content type
application/json
{
  • "message": "Submitted for payment"
}

Cancels subscription

Cancels the customer's subscription

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/subscriptions/cancel/{subscription_id} \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
[ ]

V2

Validates Amazon receipt

Validates an In-App purchase from Amazon services.

ℹ️ The '200' JSON indicates that the data has been successfully received and the in-app validation process is initiated. The success notification will be sent to you via socket. Accordingly, any error notification will be sent to you via socket. For more details refer to our Amazon In-App purchases guide.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
receipt
required
string

The Purchase object returned in the response from Amazon RVS after a successful in-app purchase

amazon_user_id
required
string

Amazon's app-specific user ID

item_id
required
int64

The ID of the specified item

access_fee_id
required
int64

The ID of the access fee

Responses

Request samples

curl https://services.inplayer.com/v2/external-payments/amazon/validate \
  -H 'Authorization: <token>' \
  -d receipt="q9YuWrJSSs6Q2VuTMzaKz1QLGCowTstywEtkM6LJrShZiCnOcM-LL06tiTbW05FAKSo2DENwMjCqMDK8MTC0IAqAVsUsLd1c5l48jIdxfOTK_N1d7kqLLHLVc8oK87OLgtPNCut5AoJpjJ5dXG6BGqkUlAxlAQ" \
  -d amazon_user_id="<amazon_user_id>" \
  -d item_id=256 \
  -d access_fee_id=128

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted"
}

Validates Apple receipt

Validates an In-App purchase from Apple services.

ℹ️ The '200' JSON indicates that the data has been successfully received and the in-app validation process is initiated. The success notification will be sent to you via socket. Accordingly, any error notification will be sent to you via socket. For more details refer to our IOS In-App Purchases guide.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
receipt
required
string

The JSON object returned in the response from App Store after a successful in-app purchase

item_id
required
int64

The ID of the specified item

access_fee_id
required
int64

The ID of the access fee

Responses

Request samples

curl https://services.inplayer.com/v2/external-payments/apple/validate \
  -H 'Authorization: <token>' \
  -d receipt="MIIjFAYJKoZIhvcNAQcCoIIjBTCCIwECAQExCzAJBgUrDgMCGgUAMIIStQYJKoZIhvcNAQcBoIISpgSCEqIxghKeMAoCAQgCAQEEAhYAMAoCARQCAQEEAgwAMAsCAQECAQEEAwIBADALAgEDAgEBBAMMATEwCwIBCwIBAQQDAgEAMAsCAQ4CAQEEAwIBfjALAgEPAgEBBAMCAQAwCwIBEAIBAQQDAgEAMAsCARkCAQEEAwIBAzAMAgEKAgEBBAQWAjQrMA0CAQ0CAQEEBQIDAdUoMA0CARMCAQEEBQwDMS4wMA4CAQkCAQEEBgIEUDI1MDAYAgEEAgECBBC7P2SFmKbihir4EH+avdcNMBsCAQACAQEEEwwRUHJvZHVjdGlvblNhbmRib3gwHAIBBQIBAQQUzkFY8SuCpOM/fjEDM9XpDN38a+gwHgIBDAIBAQQWFhQyMDE5LTAzLTI2VDE0OjA2OjAwWjAeAgESAgEBBBYWFDIwMTMtMDgtMDFUMDc6MDA6MDBaMCcCAQICAQEEHwwdY29tLmlucGxheWVyLkluUGxheWVySW5BcHBEZXYwOAIBBwIBAQQwh9JuUn9XUsk/XDK9rHBBAwe8TCWI9v3Hy1/wWy8M04V7dQRhtXwOySmZGhV4yd+IMEMCAQYCAQEEO1b4vjsWSsvOf+/wPfFOHGwy2ysbEh37yLVMsTkUSjbCzn1Ba8DqH75Hc+pEs9BEUetMs24lt/CI5zmjMIIBZQIBEQIBAQSCAVsxggFXMAsCAgasAgEBBAIWADALAgIGrQIBAQQCDAAwCwICBrACAQEEAhYAMAsCAgayAgEBBAIMADALAgIGswIBAQQCDAAwCwICBrQCAQEEAgwAMAsCAga1AgEBBAIMADALAgIGtgIBAQQCDAAwDAICBqUCAQEEAwIBATAMAgIGqwIBAQQDAgEAMAwCAgauAgEBBAMCAQ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6B0Y7oZGBI5BEgjyLXnWYz9beDvQLt+JkMBfGKftuzyrka1GSYYoB53PSn7dbZ9Fbs1A9PVNtWuMldzju1PWc8YELQ/CmA931DFm14XX8MwDhT+dLeg7JD7zS3PEzxQVoycurpJQc8uph74sGIpmK4HgO9Rbr2kbZapctDc=" \
  -d item_id=256 \
  -d access_fee_id=128

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted"
}

Cancels a Google Play subscription

Cancels the customer's Google Play subscription

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/external-payments/google-play/cancel/{subscription_id} \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submited"
}

Validates Google Play Receipt

Validates an In-App purchase from Google Play store services.

ℹ️ The '200' JSON indicates that the data has been successfully received and the in-app validation process is initiated. The success notification will be sent to you via socket. Accordingly, any error notification will be sent to you via socket. For more details refer to our Android In-App Purchases guide.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
receipt
required
string

The Purchase object returned in the response from Google Play after a successful in-app purchase

item_id
required
int64

The ID of the specified item

access_fee_id
required
int64

The ID of the access fee

Responses

Request samples

curl https://services.inplayer.com/v2/external-payments/google-play/validate \
  -H 'Authorization: <token>' \
  -d receipt={"orderId":"GPA.3642-0865-1597-32737","packageName":"com.example","productId":"45871_89331","purchaseTime":1602028844716,"purchaseState":0,"purchaseToken":"hqkqxiacgecqkghbdpqdqekl.AO-J5Ox7mnNMxpR7URfaZRPoe5j6w-kfhhg0jp9NpH3pV7x7pSz9AFKIVPwjz8-WkSnu978y4ZNafzxpOhOwMQCE5WyTn2hLtEclV7E-Zge9HC2APVZsgMQ","autoRenewing":true,"acknowledged":false}, \
  -d item_id=2 \
  -d access_fee_id=23

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted"
}

Validates Roku receipt

Validates an In-App purchase from Roku services.

ℹ️ The '200' JSON indicates that the data has been successfully received and the in-app validation process is initiated. The success notification will be sent to you via socket. Accordingly, any error notification will be sent to you via socket. For more details refer to our ROKU In-App purchases guide.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
receipt
required
string

An alphanumeric string representing the transaction returned after a successful in-app purchase

item_id
required
int64

The ID of the specified item

access_fee_id
required
int64

The ID of the access fee

Responses

Request samples

curl https://services.inplayer.com/v2/external-payments/roku/validate \
  -H 'Authorization: <token>' \
  -d receipt="4cbb70cf-db6a-93dc-5486-afap08190ab5" \
  -d item_id=256 \
  -d access_fee_id=128

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted"
}

Creates charge

Enables the customer to be charged for their asset of choice once they enter the IDs and payment method concerned, along with the voucher code (in case there is any discount). ⚠️ Warning - This method typically requires PCI SAQ D compliance

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
access_fee_id
required
int

Access fee ID

item_id
required
int

Unique item ID

voucher_code
string

Voucher code for discount

payment_method
required
string

Direct Debit (making a purchase by transferring funds directly from the customer's bank account without using a credit card) as the customer's payment method of choice

is_gift
boolean

If the payment is for a gift

receiver_email
string

The email address of the gift receiver (required if is_giftable is true)

referrer
required
string

URL where the payment was initiated

Responses

Request samples

curl -X POST https://services.inplayer.com/v2/payments \
  -H 'authorization: Bearer <token>' \
      -d access_fee_id=16 \
      -d item_id=12 \
      -d voucher_code=CODE01 \
      -d payment_method=direct debit \
      -d is_gift=true \
      -d receiver_email=gift_receiver@inplayer.com \
      -d referrer=https://example.com

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted for payment"
}

Get default card

Returns the default credit card per currency used for subscription rebills.

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/payments/cards/default \
  -H 'authorization: Bearer <token>' \

Response samples

Content type
application/json
{
  • "cards": {
    }
}

Set default card per currency

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

Request Body schema: application/x-www-form-urlencoded
number
required
string

The card number

card_name
required
string

The cardholder's name

cvv
required
integer

The card’s CVV number

exp_month
required
integer [ 1 .. 12 ]

The month that the customer’s card expires

exp_year
required
integer

The year that the customer’s card expires

currency_iso
required
string

Three-letter ISO currency code (i.e. alphabetic country code), in uppercase

Responses

Request samples

curl -X PUT https://services.inplayer.com/v2/payments/cards/default \
    -H 'authorization: Bearer <token>' \
    -H 'content-type: application/x-www-form-urlencoded' \
    -d card_name="John Doe" \
    -d number=4111111111111111 \
    -d exp_month=08 \
    -d exp_year=2020 \
    -d cvv=111\
    -d currency_iso="EUR"

Response samples

Content type
application/json
{
  • "account": {
    }
}

Get Mandate

Checks for existing user mandate

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/payments/direct-debit/mandate \
  -H 'authorization: Bearer <token>' \

Response samples

Content type
application/json
{
  • "is_approved": true,
  • "statement_descriptor": "InPlayer",
  • "mandate": {}
}

Create Mandate

Creates Mandate for Customer

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
name
required
string

The name of the mandate holder

iban
required
string

The IBAN bank number

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/payments/direct-debit/mandate \
  -H 'authorization: Bearer <token>' \
      -d name=John \
      -d iban=DE89370400440532013000

Response samples

Content type
application/json
{}

Donation Confirm

Endpoint for payments donation confirm

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
payment_method
required
string

Only supported method for successfull response is 'card' otherwise it's code 400 bad request

Responses

Request samples

curl -X POST https://services.inplayer.com/v2/payments/donation:confirm \
  -H 'authorization: Bearer <token>' \
  -d payment_method='card'

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted"
}

Donation

Endpoint for payments donation

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
card_name
required
string

Card's name

number
required
int

Card's number

cvv
required
int

Card's cvv

exp_month
required
int

Card's expiration month

exp_year
required
int

Card's expiration year

Responses

Request samples

curl -X POST https://services.inplayer.com/v2/payments/donation \
  -H 'authorization: Bearer <token>' \
  -d card_name="John Doe" \
  -d number='1234 5678 9012 3456' \
  -d cvv='111' \
  -d exp_month='08' \
  -d exp_year='2020' \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Submitted"
}

Set payment provider metadata

Sets a metadata for the specific payment provider.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
payment_provider_id
required
integer

Payment provider ID

Responses

Request samples

curl -X PUT  https://services.inplayer.com/v2/payments/providers/metadata \
    -H 'Authorization:Bearer <token>' \
    -d payment_provider_id=1 \
    -d metadata[foo]=bar

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "metadata": [
    ]
}

Get payment provider metadata

Returns metadata for the specific payment provider.

Authorizations:
bearerAuth
path Parameters
payment_provider_id
required
integer

Payment provider ID

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/payments/providers/metadata/{payment_provider_id} \
    -H 'Authorization:Bearer <token>'

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Success",
  • "metadata": {
    }
}

Create subscription

⚠️ Warning - This method typically requires PCI SAQ D compliance

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
item_id
required
integer

Item id

access_fee_id
required
integer

Access fee id

voucher_code
string

Voucher code for discount

payment_method
required
string
Enum: "card" "direct debit" "ideal"

Payment Method

referrer
required
string

URL where the payment was initiated

Responses

Request samples

curl -X GET https://services.inplayer.com/v2/subscriptions \
  -H 'authorization: Bearer <token>' \
      -d access_fee_id=2 \
      -d item_id=12 \
      -d voucher_code=F00B4R!@ \
      -d payment_method=direct debit \
      -d referrer=https://example.com

Response samples

Content type
application/json
{
  • "message": "Submitted for payment"
}