Build a sample app
Cards
10 min
get to know how to work with cross river apis this page shows you how to cards /#create a card a card cards /#activate the card a card create a card manage your customer's cards by working with cross river to decide what you want to offer, such as physical or virtual cards this is the card configuration cross river creates a card configuration profile for you for each {{financial instrument}} type you choose for your customers before you begin m ake sure you do and have onboard a customer open an account cardholder's account number customer id (you get this when you create a customer) configuration id (cross river provides id to you when you configure your type/card) we also recommend that you banking and payments for the relevant webhook events endpoints and webhooks banking and payments for webhooks the following api endpoints are used api description create new card requests creation of a new debit card the following webhooks are used webhook description cards card created debit card created order a card y ou will learn how to order/create a new debit card by creating a card for john smith call post /cardmanagement/v1/cards in the following example you can see which attributes are required see details of the complete add card api sample create a card curl x post /cardmanagement/v1/cards header 'content type application/json' header 'accept application/json' header 'authorization bearer xxxx' d '{ \ "accountnumber" "2608927303", \ "customerid" "2b15a695 13dc 4b10 b4e5 af5b0138873c", \ "configurationid" "a6b5a94c f8f9 462b 8ce8 afa400f5b640", \ "firstname" "john", \ "lastname" "smith", \ "phone" { \ "phonetype" "home", \ "phonenumber" "9133413131" \ }, \ "emailaddress" "john smith\@xxxxx com", \ "shippingaddress" { \ "street1" "lane ave", \ "street2" "string", \ "city" "big town", \ "state" "il", \ "postalcode" "72410", \ "countrycode" "us" \ }, \ "billingaddress" { \ "street1" "lane ave", \ "street2" "string", \ "city" "big town", \ "state" "il", \ "postalcode" "72410", \ "countrycode" "us" \ }, \ "nameoncard" "john smith", \ "shippingtype" "normal", \ "clientidentifier" "string" \ }' 'https //sandbox crbcos com/cardmanagement/v1/cards' a successful api call returns a json response with the details of the new card the card status will be unactivated until you activate the card the id is the card id, in this example 8709163d 140c 4d95 a111 afa8009e9cd1 , which you will need to cards /#activate the card sample order a card response { "id" "8709163d 140c 4d95 a111 afa8009e9cd1", "partnerid" "cd9c12f4 7691 424a b38b af5b0134c611", "productid" "83bed086 8182 4151 a1e3 af5b01362783", "accountnumber" "2608927303", "status" "unactivated", "statusreasoncode" "notset", "firstname" "john", "lastname" "smith", "shippingaddress" { "street1" "lane ave", "street2" "string", "city" "big town", "state" "il", "postalcode" "72410", "countrycode" "us" }, "billingaddress" { "street1" "lane ave", "street2" "string", "city" "big town", "state" "il", "postalcode" "72410", "countrycode" "us" }, "phone" { "phonetype" "home", "phonenumber" "9133413131" }, "emailaddress" "john\@anygoogle com", "nameoncard" "john smith", "ispinset" false, "adminblocked" false, "fraudsuspect" false, "configurationid" "a6b5a94c f8f9 462b 8ce8 afa400f5b640", "category" "credit", "paymentinstrument" "virtualpan", "processor" "processor name", "shippingtype" "normal", "orderstatus" "orderpending", "replacementstatus" "notapplicable", "customerid" "2b15a695 13dc 4b10 b4e5 af5b0138873c", "clientidentifier" "string", "createdat" "2023 02 13t04 37 29 4869172 05 00", "lastmodifiedat" "2023 02 13t04 37 29 4869172 05 00" } the cards card created webhook event is triggered when the card is generated at the processor sample cards card created event { "id" "cea6c5b5 13e7 4c2f ba75 afce01110fe5", "eventname" "cards card created", "status" "pending", "partnerid" "cd9c12f4 7691 424a b38b af5b0134c611", "createdat" "2023 02 13t04 42 29 4869172 05 00", "resources" \[ "cardmanagement/v1/cards/8709163d 140c 4d95 a111 afa8009e9cd1" ], "details" \[ { "cardid" "8709163d 140c 4d95 a111 afa8009e9cd1", "status" "unactivated", "statusreasoncode" "notset" } ] } activate the card before you begin make sure you have get api credentials card id from when you cards /#order a card endpoints and webhooks true false 382false unhandled content type false unhandled content type false unhandled content type false unhandled content type the tutorial uses these webhooks true falsefalse unhandled content type false unhandled content type false unhandled content type false unhandled content type activate the card activate the card you created in the cards /#create a card stage call post /cardmanagement/v1/cards/{id}/activate the id attribute must be set to the card id in the sample below the id is 8709163d 140c 4d95 a111 afa8009e9cd1 sample activate card request curl x post \ header 'accept application/json' \ header 'authorization bearer '\<token>' https //sandbox crbcos com/cardmanagement/v1/cards/8709163d 140c 4d95 a111 afa8009e9cd1/activate' a successful api call returns a json response with the details of the card the card status is now activated the orderstatus is completed sample activate card response { "id" "8709163d 140c 4d95 a111 afa8009e9cd1", "partnerid" "cd9c12f4 7691 424a b38b af5b0134c611", "productid" "83bed086 8182 4151 a1e3 af5b01362783", "processorcardid" "804951250206718", "accountnumber" "2608927303", "status" "active", "statusreasoncode" "notset", "firstname" "john", "lastname" "smith", "shippingaddress" { "street1" "lane ave", "street2" "string", "city" "big town", "state" "il", "postalcode" "72410", "countrycode" "us" }, "billingaddress" { "street1" "lane ave", "street2" "string", "city" "big town", "state" "il", "postalcode" "72410", "countrycode" "us" }, "phone" { "phonetype" "home", "phonenumber" "9133413131" }, "emailaddress" "john\@anygoogle com", "nameoncard" "john smith", "panlastfour" "3629", "ispinset" false, "expirationdate" "2026 02 13", "adminblocked" false, "fraudsuspect" false, "configurationid" "a6b5a94c f8f9 462b 8ce8 afa400f5b640", "category" "credit", "paymentinstrument" "virtualpan", "processor" "processor name", "shippingtype" "normal", "orderstatus" "completed", "replacementstatus" "notapplicable", "customerid" "2b15a695 13dc 4b10 b4e5 af5b0138873c", "clientidentifier" "string", "processorcustomerid" "t83e9d675a3n3n9o8rz1", "createdat" "2023 02 13t04 37 29 487 05 00", "initialactivation" "2023 02 13t00 00 00 05 00", "activatedat" "2023 02 13t04 43 19 282287 05 00", "lastmodifiedat" "2023 02 13t04 43 19 2962845 05 00" } when the card status changes to active , the cards card activated webhook event fires cards card activated webhook event { "id" "95ac33ca 3d7f 49aa bfc2 afce01113310", "eventname" "cards card activated", "status" "pending", "partnerid" "cd9c12f4 7691 424a b38b af5b0134c611", "createdat" "2023 02 13t04 44 31 282287 05 00", "resources" \[ "cardmanagement/v1/cards/8709163d 140c 4d95 a111 afa8009e9cd1" ], "details" \[ { "cardid" "8709163d 140c 4d95 a111 afa8009e9cd1", "status" "active", "statusreasoncode" "notset" } ] }