veritrans / veritrans.github.io

Veritrans documentation
http://veritrans.github.io
7 stars 15 forks source link

Custom expiry date based on payment method #71

Closed yafithekid closed 7 years ago

yafithekid commented 7 years ago

Hi, I read the docs for vtweb here https://docs.midtrans.com/en/api/methods.html#vtwebcharge and here https://docs.midtrans.com/en/api/methods.html#Set-Custom-Expiry AFAIK I can set the expiry date based on custom_expiry.

I have a use case that different enabled_payments use different expiry days. For example, using ATM Permata, the expiry days is 3 days and Mandiri, the expiry days is 1 day. Can you give explanation how to do it?

rizdaprasetya commented 7 years ago

Hi @yafithekid ,

Yes you can set the expiry date based on custom_expiry.

To better suit your usecase, you should do API call (request payment url) after your customer select which payment method they want in your web/app, then you know what expiry duration you should send as custom_expiry parameter, along with that you can send the enabled_payments parameter according to the payment method chosen by customer.

For example:

Sorry for late reply, for faster response you better send your questions to: support@midtrans.com

yafithekid commented 7 years ago

Hi @rizdaprasetya. Thanks for the response.

It would be nice if custom_expiry in vtweb can be set based on the payment method. For next feature maybe?

rizdaprasetya commented 7 years ago

Thanks for your feedback and concern. Our team will consider this feature. But for near future this feature won't be available yet.