Closed GJFox1972 closed 4 years ago
@rikless, I'm getting the same and have raised with our dev team. Apologies, I'll get back to you as soon as possible.
Hi @rikless, ok, so I'm in the process of updating the documentation but the quick answer is we have replaced the https://api.vivapayments.com/acquiring/v1/cards/chargetokens
call with https://api.vivapayments.com/nativecheckout/v2/chargetokens
(https://demo-api.vivapayments.com/nativecheckout/v2/chargetokens
on demo). Body parameters example (for demo):
{
"Amount": 1000,
"Cvc": "111",
"Number": "4111111111111111",
"Holdername": "John Doe",
"ExpirationYear": 2030,
"ExpirationMonth": 10,
"SessionRedirectUrl": "https://www.example.com"
}
@matthewrgourd we are not charging a card for this request. We want to save the credit card. Are you sure about the body parameters ? (the amount can't be there, and case on property has changed).
@rikless I see what you mean. I'll ask a developer.
eventId | 12005
It looks like you've restaured the /chargetokens
endpoint, but not the cards/chargetokens
@rikless Awaiting further developer input.
Hi @rikless I'm advised that EventId: 12005 is "ServicesCardTokenizationCardholderAuthenticationFailed". This means that cardholder authentication failed. It is not related to the 403 Forbidden error.
@rikless I'm afraid I gave you the Native Checkout v2 instead of card tokenization endpoints previously hence why the amount
parameter was mandatory. Sorry for that! Please see below explanation of card tokenization from our dev team:
Generate a one-time charge token. You do this by sending a POST request to https://demo-api.vivapayments.com/nativecheckout/v2/chargetokens
.
A one-time charge token will be generated (example: "ctok_Rc4c27orSU56SSMOLDijTMYA8X4")
Obtain a card token, make the following GET request including the charge token as a URL parameter: https://demo-api.vivapayments.com/acquiring/v1/cards/tokens?chargetoken=ctok_Rc4c27orSU56SSMOLDijTMYA8X4
.
A unique card token code will be returned in the response (example: "05FB1A1EBF41440FDF88A359C46645B6D1EE3EF5").
You can make a call to exchange the card token with another one-time charge token as many times as you want using the below call:
GET https://demo-api.vivapayments.com/acquiring/v1/cards/chargetokens?token=05FB1A1EBF41440FDF88A359C46645B6D1EE3EF5
You can pass the new charge token via the Create transaction endpoint without transmitting the real card details of the cardholder again:
POST https://demo-api.vivapayments.com/nativecheckout/v2/transactions
Hope this helps! Please let me know how you get on...
We still have: Invalid Amount
@rikless Are you attempting on live or demo?
@rikless Card details need to be valid if testing on live. If testing on demo, card expiration date needs to be in the future. Do not pass an amount until step 4, create transaction.
That's what I do.
Another issue there : I see in the mentioned issue that it's not possible to disable 3DS. We store credit card to do offline payment in the future. This doesn't make sens to have 3DS validation for offline payments.
Hi everyone, @matthewrgourd whats new, we wait for you and your team, we have no response, its really not acceptable from a service like this.
We wait for this activation for weeks, please give us some real things. we want to move forward
thanks
@matthewrgourd 6 days for an answer....its not possible
@Vincegypt, ah, do you still believe there to be a problem? There was a response from me 11 days ago and it was quite detailed. I then closed the issue as I assumed it had been solved. We had switched off card tokenization before Christmas but reinstated it at the beginning of January. This is now how you do the card tokenization in case you missed it the first time I posted!
Generate a one-time charge token. You do this by sending a POST request to https://demo-api.vivapayments.com/nativecheckout/v2/chargetokens
.
A one-time charge token will be generated (example: "ctok_Rc4c27orSU56SSMOLDijTMYA8X4")
Obtain a card token, make the following GET request including the charge token as a URL parameter: https://demo-api.vivapayments.com/acquiring/v1/cards/tokens?chargetoken=ctok_Rc4c27orSU56SSMOLDijTMYA8X4
.
A unique card token code will be returned in the response (example: "05FB1A1EBF41440FDF88A359C46645B6D1EE3EF5").
You can make a call to exchange the card token with another one-time charge token as many times as you want using the below call:
GET https://demo-api.vivapayments.com/acquiring/v1/cards/chargetokens?token=05FB1A1EBF41440FDF88A359C46645B6D1EE3EF5
You can pass the new charge token via the Create transaction endpoint without transmitting the real card details of the cardholder again:
POST https://demo-api.vivapayments.com/nativecheckout/v2/transactions
Hope this helps! Please let me know how you get on...
@matthewrgourd i think we still have the same problem @rikless send you a message with no answer and i have call him this afternoon he still have some issues from vivawallet please solve the problem with him thanks :-)
Hi @Vincegypt the original issue (card tokenization blocked) was fixed two weeks ago. If you or @rikless have something else you want to raise please do so by creating a new ticket. Alternatively, if you're having problems with the offered solution, please elaborate on what these are!
Hi @matthewrgourd thanks for your quick answer we really appreciate i contact @rikless asap .
@matthewrgourd That's what I do. And amount is still required when we just want to register credit card to make offline payment.
Another issue there : I see in the mentioned issue that it's not possible to disable 3DS. We store credit card to do offline payment in the future. This doesn't make sens to have 3DS validation for offline payments.
@rikless I'm sorry for the delay. Our lead developer is currently away on leave hence the time lag. There were a few things I needed to tidy up in relation to the card tokenization page on our developer portal. The main one is that when you optionally save the card details as a card token, you don't need an amount in the request body: https://developer.vivawallet.com/api-reference-guide/card-tokenization-api/#step-2-generate-card-token-using-the-charge-token-optional .
Regarding 3DS, when we're talking API level it is not on our side as an acquirer to decide on whether to perform 3DS or not. It depends on a number of things mainly the card, the issuer and the issuer's country. Generally, 3DS authentication will be invoked for all one-off payments. However, if the transaction is recurring, only the first payment is subject to a 3DS prompt.
Hope this helps!
@matthewrgourd i have talk to @rikless , they have test it in demo mode, all is ok and after you have modified the live version and the things go wrong, its possible to ask your team to go back to this fonctionnal version?
@matthewrgourd you said "when you optionally save the card details as a card token, you don't need an amount in the request body" BUT this is step 2 and in step 1 (charge token request), the amount is mandatory ...
Hi @Vincegypt , if the process flow is working in demo, you can launch to live. The 3DS bit obviously has to be done by a real customer so you won't be able to test this bit until online. As far as I'm aware, there's no offline option.
Hello, for some reason I'm getting a
{ "status": 404, "message": "Could not get 'token:charge:<charge_token>', key does not exist", "eventId": "2" }
when I am trying to use a charge token generated by a card token. Could I be missing some step?
@cstsortan Sounds like the charge token has already been used to take a payment. You need to generate a new one-time charge token for each transaction.
@matthewrgourd Hello, will you give any answer to @jahazzz post ? I'm concerned too.
@jahazzz @rikless I'm going to get clarity on this point.
@jahazzz @rikless steps 2 and 3 you don't need anything in the body. This was a mistake in the documentation which I've now rectified. In step 1 amount
(correctly) is a required parameter. I believe this is because we don't allow anyone to store a customer's card details without first taking a payment for something.
@matthewrgourd That's what @jahazzz pointed to you.
step 1 (charge token request), the amount is mandatory ...
Please, be careful, that's the issue since https://github.com/VivaPayments/API/issues/1256#issuecomment-573319930
We don't know the amount at this moment, we just want to register a credit card.
@rikless thanks for that. I'm confirming with our dev team why the payment
parameter is mandatory and if there's any issue there. I think everything else is covered.
Hi @rikless, @jahazzz, @Vincegypt, dev team states the following:
The amount field is mandatory but any figure greater than zero will result in 200 OK and then the card token can be provided without a charge. It's of very great importance that the cardholder knows his card is being saved in a merchant database and gives his permission for this.
If no further queries I'm going to close this issue.
@matthewrgourd :
It's of very great importance that the cardholder knows his card is being saved in a merchant database and gives his permission for this
ok but it's not on your end, it's our integration
The amount field is mandatory but any figure greater than zero will result in 200 OK and then the card token can be provided without a charge
So you are saying : add the mandatory parameter, it will not be used for the charge ?
Hi @rikless yes, I know it's on your end. Sorry if I didn't make that clear. No, the contents of the amount
parameter in this instance will not be used for the charge.
@matthewrgourd when card will ne saved, will we be able to use the card for off session payements, without 3ds ?
Because if it's always required, it's useless to save a credit card
Ticket ID CC-1226921
Message from my developer
Just completed my investigation and it’s 100% issue from the Viva Payment api they have blocked the the Tokenization request for V1 api so it is something they can help with.
I just did a test transaction and it’s working fine so 100% confirm Viva block the request for live account.
Please send them a mail :- “Live transactions are not working but test are working fine.”