Sandbox: Create Payment Request with 3DS shows error, make sure your token is valid?

When making a payment request like Create Payment with 3DS it is important to include the complete_payment_url and ​​error_payment_url in your payload.

Without a complete_payment_url, the user may complete the payment, and is not redirected to a completed payment URL. The user may think the payment didn’t go through and immediately attempt to submit another payment.

This action would trigger 2 payment submissions and the second request will fail with an invalid token as shown below: Something Went Wrong. Make sure your payment token is valid and try again.


Include the Complete Payment URL

To avoid this error, you should always ensure that the complete_payment_url has been set. The payment page will redirect to url you included on completion.

	"amount": 1500,
	"currency": "SGD",
	"customer": "cus_5423810ce7f00e2108ad1672c22ede23",
	"payment_method": {
		"type": "sg_credit_cup_card",
		"fields": {
			"number": "4111111111111111",
			"expiration_month": "12",
			"expiration_year": "23",
			"name": "John Doe",
			"cvv": "345"
		"metadata": null
	"capture": true,
    "3DS_required": true,
     "complete_payment_url": "",
        "error_payment_url": ""