Endpoint #
URL:
https://crm-api-test.10npay.com/api/v1/IndividualPaymentMethod/{individualId}/card
Method: POST
Description: Create a new payment method for an individual.
Request Headers #
accept
:*/*
Authorization
:Bearer {Token}
Content-Type
:application/json-patch+json
Request Parameters #
Parameter | Type | Description |
---|---|---|
cardNumber | string | The card number |
cardAlias | string | Alias for the card |
cardHolderName | string | Card holder’s name |
cardType | string | Type of the card |
cvvOrCvcCode | string | CVV or CVC code |
validityMonth | string | Validity month of the card |
validityYear | string | Validity year of the card |
status | string | Status of the card |
currency | string | Currency type |
cardToken | string | Token associated with the card |
Example Request Payload #
{
"cardNumber": "4341792000000044",
"cardAlias": "p",
"cardHolderName": "Ivailo Petkov",
"cardType": "VISA",
"cvvOrCvcCode": "123",
"validityMonth": "04",
"validityYear": "25",
"status": "2",
"currency": "BGN",
"cardToken": "111111"
}
URL Example #
curl -X 'POST' \ 'https://crm-api-test.10npay.com/api/v1/IndividualPaymentMethod/740/card' \ -H 'accept: */*' \ -H 'Authorization: Bearer {Token}' \ -H 'Content-Type: application/json-patch+json' \ -d '{ "cardNumber": "4341792000000044", "cardAlias": "p", "cardHolderName": "Ivailo Petkov", "cardType": "VISA", "cvvOrCvcCode": "123", "validityMonth": "04", "validityYear": "25", "status": "2", "currency": "BGN", "cardToken": "111111" }'
Responses #
Success #
- Status Code:
200
- Description: Payment method created successfully.
Error: Bad Request #
- Status Code:
400
- Description: Payment method can’t be created.
- Response Schema:
{
"type": "string",
"title": "string",
"status": 400,
"detail": "string",
"instance": "string"
}
Field | Type | Description |
---|---|---|
type | string | Type of the error |
title | string | Title of the error |
status | integer | HTTP status code |
detail | string | Detailed error message |
instance | string | Instance identifier of the error |
Error: Not Found #
- Status Code:
404
- Description: Request property mismatched or not found.
Error: Server Error #
- Status Code:
500
- Description: Internal error occurred.