Skip to main content

Update the payment confirmation method

Use this API to update how the customer confirms a bill payment before it is charged via the Direct Debit service.

If the customer uses this feature, Tingee sends a confirmation email or a confirmation message to the customer's phone number before debiting the money.

PUT
URLhttps://open-api.tingee.vn/v1/direct-debit/edit-confirm-payment-method

Create a request to change the payment confirmation method (Email/Zalo). Returns a URL where the customer completes the configuration.

Header Request​

HeaderRequiredDescription
Content-Type✓application/json
x-client-id✓Partner identifier issued by TINGEE.
x-signature✓HMAC SHA512 authentication signature. See How to generate the signature.
x-request-timestamp✓Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7)

Body Parameter​

FieldTypeRequiredDescription
requestIdstring✓ID of the request to Tingee (UUID).
subscriptionIdstring✓ID of the linked bank account (UUID).
returnUrlstring✓URL to redirect back to the partner after completion.

Code samples​

curl --location --request PUT 'https://open-api.tingee.vn/v1/direct-debit/edit-confirm-payment-method' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"requestId": "550760e0-1cc2-44b9-85ba-eb318e228b4f",
"subscriptionId": "89188e53-eba3-40fa-9323-04422ced3637",
"returnUrl": "https://example.com"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": "https://direct-debit.tingee.vn/edit-confirm-payment-method?requestId=..."
}
FieldTypeDescription
codestringResponse code (00 means success).
messagestringDetailed message.
datastringURL to redirect the user to for updating the confirmation method.

Common error codes​

CodeDescriptionHow to handle
1067No active subscription was foundCheck that subscriptionId belongs to the Merchant and that the subscription has not been cancelled.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.