Paymentwall website uses cookies to store your browsing preferences on your device. However, cookies do not collect personal information.

For more information about how we use cookies, check our cookie policy

Close

Documentation

New Documentation Getting Started API Libraries APIs Checklists Flows Integrations Mobile SDKs Reference Smart TV SDK SpiderPipe Testing Payments
Contacts
If you still have questions regarding integration, please email us at devsupport@paymentwall.com

Payment Status API

API Description

Payment Status API allows the merchants to check the status of a payment or payment attempt using the order reference ID or payment reference ID.

This API can be activated for your Paymentwall Merchant Account by request. To activate it please email us at devsupport@paymentwall.com. Currently supported for projects that are using Digital Goods API.

API Endpoint

https://api.paymentwall.com/api/rest/payment/

Request Method

GET

Request Parameters

parameter required description
ag_external_id no Merchant's product SKU ID
callback no JSONP callback function
key yes Project key
ref no Unique payment reference ID generated by Paymentwall
sign_version no Signature version
sign no Request signature
uid no ID of the end-user in merchant's system

Either uid + ag_external_id, or ref is required.

Request Sample 1

https://api.paymentwall.com/api/rest/payment?key=[PROJECT_KEY]&uid=user_200255&ag_external_id=product_100244&sign_version=2&sign=[SIGNATURE]

Response Sample 1

[{
  "object":"payment",
  "id":"b123456",
  "created":1419438832,
  "amount":"9.99",
  "currency":"USD",
  "refunded":false,
  "risk":"approved",
  "uid":"user_200255",
  "product_id":"product_100244",
  "payment_system":"cc",
  "subscription":{
    "object":"subscription",
    "id":"VCBZT392SW",
    "period":"day",
    "period_duration":3,
    "payments_limit":122,
    "is_trial":0,
    "started":1,
    "expired":0, // if user's access to premium features has expired after, e.g. if he cancelled it last month and the next payment is already due, or if subscription total duration limitation is 1 year and the subscription is past 1 year
    "active":1,
    "date_started":1419438832,
    "date_next":1419698032
  }
}]

Additionally, Paymentwall can include DRM information into the Payment Status API response:
Individual Payments

[{
  "object":"payment",
   ...
  "drm_key":"xxxx-xxxx-xxxx-xxxx"
}]

Cart Payments

[{
  "object":"payment",
   ...
  "cart":[{"drm_key":"xxxx-xxxx-xxxx-xxxx","product_id":"sku_id"}]
}]

Request Sample 2

https://api.paymentwall.com/api/rest/payment?key=[PROJECT_KEY]&uid=user_200255&ag_external_id=product_100244&callback=paymentStatusHandler

Response Sample 2

paymentStatusHandler([{
  "object":"payment",
  "id":"b123456",
  ... // all other fields similar to Response Sample 1
}]);

Request Sample 3

https://api.paymentwall.com/api/rest/payment?key=[PROJECT_KEY]&uid=user_200255&ag_external_id=product_100241&callback=paymentStatusHandler

Response Sample 3

paymentStatusHandler([]); // no payments found
This page needs JavaScript
Your browser is
not supported anymore.
Please update to the more recent one.
This page needs JavaScript
This page needs JavaScript.
Please enable it in your browser settings and try again.
We use cookies on this website to make your browsing experience better. By using the Paymentwall website you agree to our Cookies Policy.