Is it possible to create a feeless ERC20 token?
Or paying fees through another address?
I have a solution in mind, to refund the transaction fee amount to receiver’s adress from a central address.
Any ideas?
You can't have another address pay for transaction fees. You have two options:
Create a centralized server that your app makes calls to which will then delegate all of the activity to your contract. However, this approach is centralizing your app when one of the goals of the blockchain is decentralization. It's up to you to decide if you're ok with this (For example, MetaMask is a popular tool, but that centralizes your provider...is that wrong?).
As you said, you can refund the transaction fee back to the user. Have your contract track individual balances and periodically issue refunds. Your contract can hold funds (which you can replenish through an ownersOnly payable fallback function) and process refunds when appropriate. Be sure to follow appropriate withdrawal patterns.
Related
I have a service (iOS app) that works by letting users use a real-world service many times, but each time it's impossible to know the cost of each 'session' up front.
I'm aware that Apple Pay allows for a single checkout with an unknown amount (will be shown as 'pending'), but does Apple Pay also support a method where the user can 'authorize' an app once for (many) future update checkouts, without the user having to manually accept them each time?
No, this is impossible. Same as with credit card
Implementing subscriptions on an iOS app means we want to handle SSEs in case of subscription status change, as to manage the user's rights inside the service.
The Apple documentation doesn't show an explicit customer GUID.
They provide, in each SSE's payload, receipts, e.g. the latest one.
The question is: how can an API server uniquely identify customers?
Should the API server keep track of every receipt, in an inheritance way?
I.e. should the API persist every receipt, and a link to the previous receipt, up to the first
one that was emitted (which can be linked to a customer through the iOS app the user used to initiate its subscription), and re-trace this history on every SSE?
Per this thread, the applicationUsername service-side UUID (used by apple, for "irregular activity checking") isn't a solution, as it isn't provided in receipts or SSEs. The thread hints that using the transaction IDs is still the best way to identify a SSE, as it is ultimately tied to a user, and it is up to the service to keep track of transactions made by the user on the Apple platform for the given service.
Isn't there an easier, more direct, way, to establish the relationship between a SSE, its apple customer, and the service's user?
After digging for a while and asking around, I reached the following conclusion:
There is only one way to tie a transaction event to a user, and that is by the
restoration mechanism one has to implement on their application.
For this reason, you need to at least keep track of original transaction IDs,
so when the restoration mechanism is triggered on your app, you can check the
currently logged user on your app, and call your back-end with the logged user,
and a list of original transaction IDs.
Usually, when a user subscribes, it is mainly done from within your app, so you
can do this link in a trivial way.
But, because you can "re-subscribe" from the AppStore after a while, without
going through your app, Apple may send a SSE to your back-end which would contain
a new (hence unknown) original transaction ID, since this new subscription is
has a new transaction.
In short,
You need to keep at least a DB of original transaction IDs you receive as SSEs
You need to implement the restoration mechanism as to contact your server every
time the app starts, with the list of transaction IDs / original transaction IDs Apple gives you
You need to accept having transactions stored in your backend without a link
to a user (because the user may have re-subscribed without launching the app yet)
On the getting started page for Apple Pay, it says that Apple Pay supports "partial shipments." How is this implemented in practice? I know how to get a token from a successful PKPayment. Once I get that token, how do I use it to implement multiple sub-order payments through my payment gateway?
For example, say the user validates a total $100 purchase through Apple Pay of two separate suborder shipments ($40 and $60 each) and I now have an associated token for the $100 order. Because of restrictions on some networks, we can't capture each payment until the associated item has been shipped, and they ship at different times.
Do I have the ability to authorize and capture payments of any amounts using that token?
What is the best approach to authorizing and capturing those sub orders?
Do I auth for the total ($100) and then auth for each sub total ($40, $60) at shipment and then capture for each sub total? If so, then I will be potentially authorizing more than the necessary total ($200), and that doesn't seem right. Is it valid to just skip auth for the total, auth for each sub total, and then capture the sub totals as they ship?
You can't capture an authorization more than once. For stripe you would need to save the token to a customer, and charge the customer for each shipment separately. This isn't only the best way it is the only way to do it.
Once you have a token and attach it to the customer object in stripe, you have the ability to charge it at any time & any amount up until the expiration date or if they remove the card from their apple pay account, like you would any other card regardless of the initial authorization.
The rest of your questions will vary by opinion as there are different ways of doing it, but here is how I would charge this type of order. I think this method benefits both the business and the customer, in addition to keeping stripe/apple happy. This isn't apple pay specific, I would treat most orders with these requirements the same. Also keep in mind apple pay supports it, but it is not required. You can collect all up front regardless of shipment dates.
Generate token from PKPayment for $100
Create customer(if needed) & add token to customer
Create charge against customer using that card for $100 without
capture
Within 7 days assess expected shipping dates.
Once assessment is complete immediately capture only the amount
expected to ship within a week on the initial charge. In your
example this is where I would capture $40 for the first charge. If
nothing is expected to be captured issue a complete refund.
Any shipments beyond the 7 days, create individual charges for the
shipments using the customer object, not the token. Again in your example this is when the $60 shipment goes
out charge that here.
As long as the second shipment charge doesn't happen to go out earlier than the 7 days this would prevent any authorizations overlapping resulting in holds of more than the initial amount at any given moment. I would treat almost any transaction like this apple pay or not.
I have a scenario, I am working in the phone gap iOS application which able a user to buy and sell a commodity. Take three persons A(Owner of the app),B(Seller),C(Buyer).
B wants to sale a commodity and C want to buys it. C agreed upon a common point and proceed with the payment. Now when the C pays for the commodity i want to shift 2% of the amount to the A account and rest of the payment to the B.
I am aware this is done over the websites and there are plenty of examples. I want to know few things:
Is it possible in phone gap application, does paypal sdk allow to do so.
how could i do the two transaction in one single go, in case i need to do both the things manually.
Is this thing can be automated or this will be handled manually at the back end.
Here is the link for the phone gap plugin that i am using for app.
If anyone could guide me to any doc which explains this or any helping material that will be a great help. I have been reading and searching over net but could not get any help.
Thanks in advance
1) It's definitely possible as it's just a matter of making API calls. The SDK should handle it for you, but if not you could always build the requests yourself.
2) You could do either a parallel payment (where the payer would see both receivers during checkout) or a chained payment (where the payer would only see the primary receiver during checkout.)
Most people doing this sort of thing like to hide the split, so I'll assume you want to do a chained payment. You'll make a request to the Pay API with a primary receiver set to the seller and the secondary receiver set to you.
You'll set the primary receiver amount the full amount and the secondary receiver to their amount accordingly. For example, if $100 is paid the primary receiver amount would be $100 (not $98) and the secondary receiver would be $2.
I would definitely recommend reviewing the Adaptive Payments documentation which has a lot of detail about chained payments and how it all works.
3). Both transactions will automatically happen when the payer completes the checkout.
Here are our requirements:
Send money to our users' credit cards. This is a unique requirement that many payment systems don't support. We essentially need to be able to grant a bonus/reward (sort of like a refund but without a preceding purchase).
Avoid stringent PCI compliance requirements. We're fine with paying a 3rd party to store the credit card info; we'd rather not deal with quarterly audits.
Credit card form must be translatable into English, Chinese, Korean, and Russian.
Credit card form must appear within our site and look like the rest of our site.
Fees must be reasonable.
Apparently Moneris satisfies everything except #3. But that might be a deal breaker for us.
Know of any other gateways I should explore?
Generally, you cannot 'refund' a credit card that you have not charged a higher amount. Sounds like you probably have a very uphill battle.
Anytime you try to remit money to a credit card, you will be asked to reference the previous CHARGE transaction or you will not be able to process the credit transaction.
Any chance the people you need to pay could all become paypal members so they can be paid? Paypal has a very slick little interface to allow you to pay other paypal members in batches - real fast, real easy, real easy to code. Most folks will rush to join paypal if it means that what they have to do to get paid - all you need to know to pay them is their paypal login email address.
Instead of issuing charges back to a customer's card, have you considered placing credits on their account instead? It ends up being cheaper for you (no transaction fees!), and it encourages to keep the customer with you longer.
A change in this requirement would make it very simple to use something like Recurly.com, whee I work.