Add Sign

In this tutorial, we assume you have complete the Key configuration part.

We use a sample from card bin query API to show how to do the add sign step. Let's say we have following unhandled data:

{
    "card_no": "403392******1234",
    "oid_partner": "201408071000001543",  
    "sign_type": "RSA"
}

We will do 2 steps:

1. Generate signature source

Put all needed the parameters with format {key}={value} and connect them with & character together, note:

  • The signature source need to be ascended in order of the first letter.

  • Parameters whose value is null should be removed.

card_no=403392******1234&oid_partner=201408071000001543&sign_type=RSA

2. Encrypt and merge

Use your private key to encrypt the generated signature source, here we use Java as an example:

Once we have the generated Sign, merged it together with the original data to create a new json:

That's it, we now have a request body for card bin query API.

Last updated