First API Call

Step-by-step instructions for setting up your sandbox account and sending a request to the Rapyd API

1. Create Account

To generate and access your API keys, you must first create your Client Portal account and access the sandbox.

Create Account

2. Test Endpoint

Using your preferred REST API testing tool make sure you are hitting the Rapyd endpoint.

GET https://sandboxapi.rapyd.net/v1/data/countries

You should have the following error response returned.

{
    "status": {
        "error_code": "MISSING_AUTHENTICATION_HEADERS",
        "status": "ERROR",
        "message": "The request did not contain the required headers
        for authentication. The request was rejected. Corrective action: 
        Add authentication headers.",
        "response_code": "MISSING_AUTHENTICATION_HEADERS",
        "operation_id": "cb1d06f6-7f8d-480e-9df2-5f210a1dc86e"
    }
}

3. Get API Keys

From your sandbox account in the Rapyd Client Portal, locate your Secret key and Access key. You can find these by selecting 'Developers' from the left navigation.

📘

In the Rapyd Client Portal, toggle the button switch to 'Sandbox' on the bottom of the left navigation.

4. Build Auth Headers

Rapyd request headers are: access_key, content-Type, salt, signature, and timestamp

Read about message security and Request Signature in the reference guide.

📘

Some API calls have their own set of headers, you can find more details in the API reference for each API endpoint.

For more Header details visit the List Countries page in our API reference.

5. Calculate Signature

You must BASE64 encode (with URL safe encoding) a HASH output using HMAC-SHA256.

The formula for calculating the signature is:

signature = BASE64 ( HASH ( http_method + url_path + salt + timestamp + access_key + secret_key + body_string ) )

📘

For more details, including code samples in a variety of programming languages visit the Request Signatures page in our API reference to read how to construct your Request Signature.

6. Send Request

Now that you have your API keys, built your auth headers with signature, you are ready to send an HTTP GET Request to Rapyd - let's use the request “list countries” GET method.

GET https://sandboxapi.rapyd.net/v1/data/countries

Your response should look something like this:

{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "eda93fb4-fc97-4907-a282-c9676b37436a"
    },
    "data": [
        {
            "id": 379,
            "name": "Albania",
            "iso_alpha2": "AL",
            "iso_alpha3": "ALB",
            "currency_code": "ALL",
            "currency_name": "Albanian lek",
            "currency_sign": "L",
            "phone_code": "355"
        },
        {
            "id": 132,
            "name": "Andorra",
            "iso_alpha2": "AD",
            "iso_alpha3": "AND",
            "currency_code": "EUR",
            "currency_name": "Euro",
            "currency_sign": "€",
            "phone_code": "376"
        },
        {
            "id": 133,
            "name": "Angola",
            "iso_alpha2": "AO",
            "iso_alpha3": "AGO",
            "currency_code": "AOA",
            "currency_name": "Angolan kwanza",
            "currency_sign": "Kz",
            "phone_code": "244"
        },
        
        //...etc...

🚧

Still not able to successfully send a request to the Rapyd API?

Reach out to the Rapyd support team

Updated 13 days ago


First API Call


Step-by-step instructions for setting up your sandbox account and sending a request to the Rapyd API

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.