Step 5: Tokenize a Card
POST {{sandboxAPI}}/payment_instruments
Now that we have an Identity resource representing our buyer, we’ll need to create a Payment Instrument which represents the credit card you’ll be debiting (i.e. charging).
Request Body
{"name"=>"Ayisha Kline", "expiration_year"=>2029, "tags"=>{"card_name"=>"Business Card"}, "number"=>"4895142232120006", "expiration_month"=>3, "address"=>{"city"=>"San Francisco", "region"=>"CA", "postal_code"=>"94404", "line1"=>"900 Metro Center Blv", "country"=>"USA"}, "security_code"=>"022", "type"=>"PAYMENT_CARD", "identity"=>"{{buyerId}}"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |