Skip to content

Instantly share code, notes, and snippets.

@markotom
Last active March 14, 2018 06:41
Show Gist options
  • Save markotom/825ce9992f47fa5b1d3ecc099697959d to your computer and use it in GitHub Desktop.
Save markotom/825ce9992f47fa5b1d3ecc099697959d to your computer and use it in GitHub Desktop.
Create token from server instead browser: https://www.conekta.io/es/docs/referencias/conekta-js
{
"auth_token": "key_FP3nXcyUyqef8xsZJkbpTjQ",
"conekta_client_user_agent": "{\"agent\":\"Conekta JavascriptBindings/0.3.0\"}",
"card": {
"number": "4242424242424242",
"name": "Javier Pedreiro",
"exp_year": "2020",
"exp_month": "12",
"cvc": "123",
"address": {
"street1": "Calle 123 Int 404",
"street2": "Col. Condesa",
"city": "Ciudad de Mexico",
"state": "Distrito Federal",
"zip": "12345",
"country": "Mexico"
}
}
}
#!/bin/bash
curl -XPOST -H "Content-Type: application/json" -d @payload.json https://api.conekta.io/tokens
@markotom
Copy link
Author

markotom commented Mar 14, 2018

Requiere un request header adicional:

Accept: application/vnd.conekta-v0.3.0+json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment