To show the customer his payment details use
/customers/:customerId/payment_details endpoint. It will return the list of customer payment details.
The Fetch customer's payment details endpoint will return
boundbound property and
activeproperty for each payment method.
- If bound: true -> such payment details CANNOT be changed.
- If active: true -> such payment details are used for recurring payments triggered by Cleeng.
To enable the customer to add OR edit his/her payment details, you should implement appropriate flows:
1. Display current payment details. Both
bound payment details should be displayed.
Payment details have important properties:
active: truemeans that Cleeng triggers recurring payments for this payment method.
bound: truemeans that recurring payments are processed outside of Cleeng and such payment details cannot be changed.
2. Add an "edit" option (e.g. a button).
The Fetch customer's payment details endpoint will return bound property for each payment method.
bound: true-> payment details CANNOT be changed.
bound: false-> payment details can be changed.
"Update payment details" feature actually involves adding new payment details and deleting the old ones.
It is recommended that you remove the old details in the background once new payment details are successfully added.
You can enable adding payment details using the methods below :
- Adyen (sample cases: a customer updates a card / a customer wants to switch payment method to a card)
- PayPal (sample cases: a customer changes payment method from a card to PayPal, a customer wants to use a different account in PayPal)
Please note that no other payment methods are supported. If you want to use a different payment gateway and MediaStore SDK solution, please contact our BSS Team.
You can enable deleting payment details using the
Delete payment detailsendpoint.
Good to know
It depends on a broadcaster's payment settings whether a customer can change payment details (e.g. if a broadcaster has only PayPal payment method configured, a customer can only update PayPal payment method, he/she cannot change to e.g. Adyen).
It is recommended to use hardcoded
paymentMethodIdto decrease the number of requests and to have full control of possible new payment details.
If there is no payment method with the property
active: true, the "Add a payment method" option should be displayed like in the MediaStore SDK example below.
If a customer selects it, he/she should be redirected to "Update Payment Details" screen.
Example user flows are presented in sample screens from MediaStore SDK.
1. Add/update a card
2. Add/update PayPal account
3. Remove Payment Method
Payment methods with the
bound: true property can be viewed (they are displayed in the list of customer payment details) but they cannot be edited. Examples of such payment methods include In-App payment methods (e.g. Apple, Android, Amazon, Roku).
If a customer selects the "Edit" button for a payment method with
bound: true property, the application should display a pop-up informing that these payment details cannot be updated. See below the example of a pop-up in MediaStore SDK.
If a payment method with the property
bound: true is the only one in the list, an option to add payment details should be displayed next to it.
All customer transactions will be returned from
/customers/:customerId/transactions. Transactions mean all captured payments.
Customers can access their receipts online, directly in their customer accounts.
To fetch an online receipt for a customer's transaction, i.e. successfully executed (captured) payment, use the following endpoint:
Online receipts are available to customers from My Account -> Your Payments -> Payment History section.
A customer can access a receipt by clicking on a transaction price. This will open a receipt in a separate browser window or tab where it can be printed with the browser built-in printing mechanism.
Updated 6 months ago