POST
/
v1
/
cards
import requests

client_id = <YOUR CLIENT ID>
public_key = <YOUR CLIENT TOKEN>

request = requests.post('https://api.malga.io/v1/cards', headers={
    "X-Client-Id": client_id,
    "X-Api-Key": publick_key
  }, json={
  "tokenId": "4918cfd2-b14a-4db2-ade4-d1b8a6bd40e2"              
})
print(request.json().get('cardId'))
{
  "id": "148d5db0-f1c3-439f-902d-f1f268086e1d",
  "status": "active",
  "statusReason": null,
  "createdAt": "2012-08-11T19:02:56.713Z",
  "clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
  "brand": "Visa",
  "cardHolderName": "JOAO DA SILVA",
  "cvvChecked": true,
  "fingerprint": "cbd4a441-c63c-4dee-ac6b-bfa7fa1df818",
  "first6digits": "401959",
  "last4digits": "9339",
  "customerId": "82aba896-9e37-45b6-aa90-d510c9050596",
  "expirationMonth": "12",
  "expirationYear": "2026",
  "transactionRequests": [
    {
      "id": "edd0d86a-76d0-4c2c-b924-1528510a5a32",
      "createdAt": "2023-09-25T18:09:59.001Z",
      "providerId": "5ce68ed3-2213-423b-8eaf-9d8c4b40df2b",
      "providerType": "SANDBOX",
      "requestStatus": "success",
      "requestType": "zero_dollar",
      "responseTs": "32ms"
    }
  ]
}

Authorizations

X-Client-Id
string
header
required
X-Api-Key
string
header
required

Body

application/json

Create credit card

The body is of type object.

Response

201
application/json

Created

The response is of type object.