Skip to main content

Documentation

Set PIN Code

Set the PIN code for an issued card.

This method triggers the Issued Card PIN Set Webhook.

Note

  • In the sandbox, you can set any number other than 1111.

  • Clients with PCI certification can handle personal identifying information for cards, such as card number.

  • PINs are relevant to physical cards.

    • card

    • Card number or card ID.

    • new_pin

    • PIN code. Numeric string.

Code Samples
    • .NET

      • using System;
        using System.Text.Json;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        var requestObj = new
                        {
                            card = "card_f8dd3aa099444e1c80cc5a06de38b165",
                            new_pin = "7777",
        
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/issuing/cards/pin", request);
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • const makeRequest = require('../../../../Utilities/JS/utilities').makeRequest;
        
        async function main() {
          try {
            const body = {
              card: 'card_f8dd3aa099444e1c80cc5a06de38b165',
              new_pin: '7777'
            };
            const result = await makeRequest('POST', '/v1/issuing/cards/pin', body);
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/code_race_2020/Utilities/PHP/utilities.php";
        include($path);
        $body = [
            "card" => "card_f8dd3aa099444e1c80cc5a06de38b165",
            "new_pin" =>  "7777"
        ];
        try {
            $object = make_request('post', '/v1/issuing/cards/pin', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        body = {
            "card": "card_f8dd3aa099444e1c80cc5a06de38b165",
            "new_pin": "7777"
        }
        
        results = make_request(method='post', path=f'/v1/issuing/cards/pin', body=body)
        pprint(results)
  • /v1/issuing/cards/pin

  • Set PIN Code by Card ID

  • curl -X post
    https://sandboxapi.rapyd.net/v1/issuing/cards/pin
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '
    {
    	"card": "card_f8dd3aa099444e1c80cc5a06de38b165",
    	"new_pin": "7788"
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "2e5d7dc0-b15e-4681-9e5b-dc5897c2176a"
        },
        "data": {
            "id": "ci_e2730f4fdfbffbf9d8b8713773093d4e",
            "ewallet_contact": {
                "id": "cont_3625cb4fc18d005b12f9ccf0c466755e",
                "first_name": "John",
                "last_name": "Doe",
                "middle_name": "",
                "second_last_name": "",
                "gender": "not_applicable",
                "marital_status": "not_applicable",
                "house_type": "",
                "contact_type": "business",
                "phone_number": "+14155551234",
                "email": "johndoefourstar@rapyd.net",
                "identification_type": "PA",
                "identification_number": "1234567890",
                "date_of_birth": "2000-11-22",
                "country": "US",
                "nationality": "NL",
                "address": {
                    "id": "address_9706af91b503c70a819605222afabc96",
                    "name": "John Doe - Four Star Professional Services",
                    "line_1": "123 Main Street",
                    "line_2": "",
                    "line_3": "",
                    "city": "Anytown",
                    "state": "NY",
                    "country": "US",
                    "zip": "12345",
                    "phone_number": "+14155551234",
                    "metadata": {},
                    "canton": "",
                    "district": "",
                    "created_at": 1608023967
                },
                "ewallet": "ewallet_053d64c44834e1d3057ecb68a34c6b6c",
                "created_at": 1608023967,
                "metadata": {},
                "business_details": {
                    "id": "busi_9d2952408ec5dec780f5b88a8fc174aa",
                    "name": "Four Star Professional Services",
                    "registration_number": "R24032020000",
                    "entity_type": "company",
                    "industry_category": "company",
                    "industry_sub_category": "home services",
                    "address": {
                        "id": "address_977b39b4b725fadc9040e1ee1e5df795",
                        "name": "John Doe - Four Star Professional Services",
                        "line_1": "1234 Main Street",
                        "line_2": "Suite 1200",
                        "line_3": "",
                        "city": "Anytown",
                        "state": "NY",
                        "country": "US",
                        "zip": "10101",
                        "phone_number": "14155557779",
                        "metadata": {
                            "merchant_defined": true
                        },
                        "canton": "",
                        "district": "",
                        "created_at": 1608023967
                    },
                    "created_at": 1608023967,
                    "annual_revenue": 0,
                    "establishment_date": null,
                    "legal_entity_type": null,
                    "cnae_code": null
                },
                "compliance_profile": 0,
                "verification_status": "not verified",
                "send_notifications": false,
                "mothers_name": "Jane Smith"
            },
            "status": "ACT",
            "card_id": "card_f8dd3aa099444e1c80cc5a06de38b165",
            "assigned_at": 1608462707,
            "activated_at": 1608465913,
            "metadata": {},
            "country_iso_alpha_2": "US",
            "created_at": 1608462707,
            "blocked_reason": "cancelled",
            "card_program": null
        }
    }
  • Set PIN Code by Card Number

  • curl -X post
    https://sandboxapi.rapyd.net/v1/issuing/cards/pin
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    -d '
    {
    	"card": "card_f8dd3aa099444e1c80cc5a06de38b165",
    	"new_pin": "7788"
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "d3b151c0-d72f-480e-acaa-cf603cf4a24d"
        },
        "data": {
            "id": "ci_e2730f4fdfbffbf9d8b8713773093d4e",
            "ewallet_contact": {
                "id": "cont_3625cb4fc18d005b12f9ccf0c466755e",
                "first_name": "John",
                "last_name": "Doe",
                "middle_name": "",
                "second_last_name": "",
                "gender": "not_applicable",
                "marital_status": "not_applicable",
                "house_type": "",
                "contact_type": "business",
                "phone_number": "+14155551234",
                "email": "johndoefourstar@rapyd.net",
                "identification_type": "PA",
                "identification_number": "1234567890",
                "date_of_birth": "2000-11-22",
                "country": "US",
                "nationality": "NL",
                "address": {
                    "id": "address_9706af91b503c70a819605222afabc96",
                    "name": "John Doe - Four Star Professional Services",
                    "line_1": "123 Main Street",
                    "line_2": "",
                    "line_3": "",
                    "city": "Anytown",
                    "state": "NY",
                    "country": "US",
                    "zip": "12345",
                    "phone_number": "+14155551234",
                    "metadata": {},
                    "canton": "",
                    "district": "",
                    "created_at": 1608023967
                },
                "ewallet": "ewallet_053d64c44834e1d3057ecb68a34c6b6c",
                "created_at": 1608023967,
                "metadata": {},
                "business_details": {
                    "id": "busi_9d2952408ec5dec780f5b88a8fc174aa",
                    "name": "Four Star Professional Services",
                    "registration_number": "R24032020000",
                    "entity_type": "company",
                    "industry_category": "company",
                    "industry_sub_category": "home services",
                    "address": {
                        "id": "address_977b39b4b725fadc9040e1ee1e5df795",
                        "name": "John Doe - Four Star Professional Services",
                        "line_1": "1234 Main Street",
                        "line_2": "Suite 1200",
                        "line_3": "",
                        "city": "Anytown",
                        "state": "NY",
                        "country": "US",
                        "zip": "10101",
                        "phone_number": "14155557779",
                        "metadata": {
                            "merchant_defined": true
                        },
                        "canton": "",
                        "district": "",
                        "created_at": 1608023967
                    },
                    "created_at": 1608023967,
                    "annual_revenue": 0,
                    "establishment_date": null,
                    "legal_entity_type": null,
                    "cnae_code": null
                },
                "compliance_profile": 0,
                "verification_status": "not verified",
                "send_notifications": false,
                "mothers_name": "Jane Smith"
            },
            "status": "ACT",
            "card_id": "card_f8dd3aa099444e1c80cc5a06de38b165",
            "assigned_at": 1608462707,
            "activated_at": 1608465913,
            "metadata": {},
            "country_iso_alpha_2": "US",
            "created_at": 1608462707,
            "blocked_reason": "canceled",
            "card_program": null
        }
    }