Download OpenAPI specification:Download
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.
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).
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. |
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.
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. |
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.
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 |
curl -X POST https://services.inplayer.com/external-payments \ -H 'Authorization:Bearer <token>'
{- "business": "string",
- "item_name": "Foo bar",
- "currency_code": "USD",
}
⚠️ 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.
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 |
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
{- "message": "Submitted for payment"
}
Returns the number of payments per asset and per country.
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 |
curl https://services.inplayer.com/payments/asset-country \ -H 'Authorization:Bearer <token>'
{- "collection": [
- {
- "item_id": 40383,
- "countries": [
- {
- "name": "United Kingdom",
- "value": 15
}
], - "total": 15
}
]
}
Returns the number of payments per asset.
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 |
{- "collection": [
- {
- "item_id": 40383,
- "values": [
- {
- "timestamp": 1552953600000,
- "value": 10
}
], - "total": 10
}
]
}
Returns the current active payment method for the merchant.
merchantUUID required | string <uuid> Example: 528b1b80-5868-4abc-a9b6-4d3455d719c8 The merchant's UUID |
curl https://services.inplayer.com/payments/providers/{merchant_uuid}
{- "id": 1,
- "method_name": "Card",
- "is_external": false,
- "active": true,
- "account_id": 2,
- "provider_name": "Stripe"
}
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.
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 |
curl https://services.inplayer.com/payments/methods \ -H 'Authorization:Bearer <token>'
[- {
- "id": 1,
- "method_name": "Card",
- "is_external": false
}, - {
- "id": 2,
- "method_name": "PayPal",
- "is_external": true
}
]
This will return all of the Merchant's available and enabled payment providers.
curl https://services.inplayer.com/payments/providers \ -H 'Authorization:Bearer <token>'
{- "payment_methods": {
- "id": 1,
- "name": "Card",
- "metadata": [ ],
- "providers": {
- "id": 1,
- "name": "Stripe",
- "payment_method": {
- "id": 1,
- "name": "Card"
}, - "external": false,
- "current": false,
- "active": false
}
}, - "bank_statement": "Your Bank Statement",
- "stripe_connect": false
}
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
bank_statement required | string Bank Statement |
curl -X POST https://services.inplayer.com/payments/providers/bank-statement \ -H 'Authorization:Bearer <token>' -d bank_statement='Bank Statement'
{- "code": 200,
- "message": "The bank statement was successfully set."
}
Delete the merchant's custom payment bank descriptor (reverts to using the default InPlayer descriptor)
curl -X DELETE https://services.inplayer.com/payments/providers/bank-statement \ -H 'Authorization:Bearer <token>'
{- "code": 200,
- "message": "The bank statement was successfully removed. Reverted to using the default InPlayer bank statement for further payments."
}
Returns revenue per asset and per country
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 |
curl https://services.inplayer.com/payments/revenue/asset-country \ -H 'Authorization:Bearer <token>'
{- "collection": [
- {
- "CountryName": "United Kingdom",
- "Currency": "string"
}
]
}
Returns revenue per asset.
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 |
curl https://services.inplayer.com/payments/revenue/asset \ -H 'Authorization:Bearer <token>'
{- "collection": [
- {
- "item_id": 40383,
- "values": [
- {
- "timestamp": 1552953600000,
- "values": [
- {
- "amount": 15.498237,
- "currency_iso": "USD",
- "formatted_amount": "$15.5"
}
]
}
]
}
]
}
Returns revenue per country.
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 |
curl https://services.inplayer.com/payments/revenue/country \ -H 'Authorization:Bearer <token>'
{- "collection": {
- "United Kingdom": {
- "EUR": 12.32,
- "USD": 123.44
}
}
}
With this call a merchant can make a request to have the Stripe Connect option enabled for his account
curl -X POST https://services.inplayer.com/stripe-connect-request \ -H 'Authorization:Bearer <token>'
{- "code": 201,
- "message": "Your request has been accepted and will be processed soon"
}
With this the merchant's Stripe account is connected to the InPlayer Stripe connect application
curl -X POST https://services.inplayer.com/stripe-connect \ -H 'Authorization:Bearer <token>' -d authorization_code=1234
{- "code": 200
}
Returns list of transactions and number of unique paying customers
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 |
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' \
{- "total": 539,
- "collection": [
- {
- "payment_history_id": 24,
- "merchant_id": 34,
- "consumer_id": 24534,
- "transaction_token": "S-myxIkH8s70x5hGn43i5w-ST",
- "payment_tool_info": "US****1111",
- "payment_tool_token": "ch_1G98ZDH4sM2j3OdTv4WMVWsf",
- "payment_method_name": "Card",
- "gateway_name": "Stripe (Sandbox)",
- "action_type": "recurrent",
- "item_access_id": 224330,
- "item_id": 1048,
- "item_type": "html_asset",
- "item_title": "title",
- "charged_amount": 24,
- "currency_iso": "EUR",
- "issued_by": 0,
- "created_at": "2020-02-06 11:30:45",
- "note": "note",
- "consumer_email": "example@mail.com",
- "timestamp": 1580988645000,
- "ip_address": "192.168.0.1",
- "continent": "Europa",
- "country": "Macedonia",
- "country_iso": "MK",
- "voucher_code": "code23",
- "voucher_discount": "30%",
- "expires_at": "2020-02-07 11:30:45",
- "access_fee_description": "Subscription",
- "exchange_rate": 0.829663,
- "settlement_currency": "gbp",
- "client_id": "528b1b80-5868-4abc-a9b6-4d34q5d719c7",
- "trx_token": "TRX-2q1YzDOzmToqzJaoc85XjJHM532s32s",
- "donation_description": "Add on a $5 donation for The New Group",
}
], - "unique_paying_customers": 768
}
Get all the Customer/Merchant subscription records.
curl https://services.inplayer.com/subscriptions \ -H 'Authorization:Bearer <token>'
{- "total": 1,
- "page": 1,
- "offset": 0,
- "limit": 5,
- "collection": [
- {
- "cancel_token": "S-nvpjWSd5dZKt9mZZFC0iIu1s2-ST",
- "action_type": "recurrent",
- "description": "Subscription description",
- "asset_title": "Asset Title",
- "asset_id": 2,
- "formatted_amount": "$5.00",
- "amount": 5,
- "currency": "USD",
- "merchant_id": 2,
- "created_at": 1543238500,
- "updated_at": 1543238500,
- "next_billing_date": 1543325138,
- "unsubscribe_url": "https://services.inplayer.com/subscriptions/cancel/S-nvpjWSd5dZKt9mZZFC0iIu1s2-ST"
}
]
}
⚠️ Warning - This method typically requires PCI SAQ D compliance
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 |
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
{- "message": "Submitted for payment"
}
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.
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 |
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
{- "code": 200,
- "message": "Submitted"
}
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.
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 |
curl https://services.inplayer.com/v2/external-payments/apple/validate \ -H 'Authorization: <token>' \ -d receipt="MIIjFAYJKoZIhvcNAQcCoIIj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sGIpmK4HgO9Rbr2kbZapctDc=" \ -d item_id=256 \ -d access_fee_id=128
{- "code": 200,
- "message": "Submitted"
}
Cancels the customer's Google Play subscription
curl https://services.inplayer.com/external-payments/google-play/cancel/{subscription_id} \ -H 'Authorization:Bearer <token>'
{- "code": 200,
- "message": "Submited"
}
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.
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 |
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
{- "code": 200,
- "message": "Submitted"
}
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.
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 |
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
{- "code": 200,
- "message": "Submitted"
}
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
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 |
referrer required | string URL where the payment was initiated |
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
{- "code": 200,
- "message": "Submitted for payment"
}
Returns the default credit card per currency used for subscription rebills.
curl -X GET https://services.inplayer.com/v2/payments/cards/default \ -H 'authorization: Bearer <token>' \
{- "cards": {
- "eur": {
- "number": 1111,
- "card_name": "John Doe",
- "exp_month": 1,
- "exp_year": 2020
}, - "usd": {
- "number": 1111,
- "card_name": "John Doe",
- "exp_month": 1,
- "exp_year": 2020
}
}
}
Sets card per currency as default card that is to be used for further subscription rebills.
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 |
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"
{- "account": {
- "number": 1111,
- "card_name": "John Doe",
- "exp_month": 1,
- "exp_year": 2020
}
}
curl -X GET https://services.inplayer.com/v2/payments/direct-debit/mandate \ -H 'authorization: Bearer <token>' \
{- "is_approved": true,
- "statement_descriptor": "InPlayer",
- "mandate": {
- "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",
}
}
}
Creates Mandate for Customer
name required | string The name of the mandate holder |
iban required | string The IBAN bank number |
curl -X GET https://services.inplayer.com/v2/payments/direct-debit/mandate \ -H 'authorization: Bearer <token>' \ -d name=John \ -d iban=DE89370400440532013000
{- "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",
}
}
Endpoint for payments donation confirm
payment_method required | string Only supported method for successfull response is 'card' otherwise it's |
curl -X POST https://services.inplayer.com/v2/payments/donation:confirm \ -H 'authorization: Bearer <token>' \ -d payment_method='card'
{- "code": 200,
- "message": "Submitted"
}
Endpoint for payments donation
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 |
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' \
{- "code": 200,
- "message": "Submitted"
}
Sets a metadata for the specific payment provider.
payment_provider_id required | integer Payment provider ID |
curl -X PUT https://services.inplayer.com/v2/payments/providers/metadata \ -H 'Authorization:Bearer <token>' \ -d payment_provider_id=1 \ -d metadata[foo]=bar
{- "code": 200,
- "message": "Success",
- "metadata": [
- {
- "name": "foo",
- "value": "bar"
}
]
}
Returns metadata for the specific payment provider.
payment_provider_id required | integer Payment provider ID |
curl -X GET https://services.inplayer.com/v2/payments/providers/metadata/{payment_provider_id} \ -H 'Authorization:Bearer <token>'
{- "code": 200,
- "message": "Success",
- "metadata": {
- "id": 123,
- "name": "foo",
- "value": "bar"
}
}
⚠️ Warning - This method typically requires PCI SAQ D compliance
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 |
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
{- "message": "Submitted for payment"
}