{"id":329,"date":"2024-06-14T14:35:19","date_gmt":"2024-06-14T14:35:19","guid":{"rendered":"https:\/\/developers.10npay.com\/?post_type=docs&#038;p=1043"},"modified":"2024-06-14T14:35:19","modified_gmt":"2024-06-14T14:35:19","password":"","slug":"create-payment-method-card","status":"publish","type":"docs","link":"https:\/\/developers.10npay.com\/bg\/docs\/create-payment-method-card\/","title":{"rendered":"Create Payment Method \u2013 EPAY"},"content":{"rendered":"<h4>1. Initiate Card Saving<\/h4>\n<p>Endpoint<\/p>\n<p><strong>URL:<\/strong> https:\/\/crm-api-test.10npay.com\/api\/v1\/epay\/save-card-initiate\/{individualId}<br \/>\n<strong>Method:<\/strong> GET<\/p>\n<p>URL Parameters<\/p>\n<p>individualId (integer): The ID of the individual from the CRM database mapped with the user_id from the app.<\/p>\n<h5>Request<br \/>\nCurl Example<\/h5>\n<div class=\"dm-code-snippet dark default  dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"wrap language-php\"><\/p>\n<pre class=\"dm-pre-admin-side\">curl -X 'GET' \\ 'https:\/\/crm-api-test.10npay.com\/api\/v1\/epay\/save-card-initiate\/590' \\ -H 'accept: application\/json' \\ -H 'Authorization: Bearer your_token_here'<\/pre>\n<p><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div>\n<h5>Responses<\/h5>\n<p><strong>200 Success<\/strong><\/p>\n<p>A URL string that redirects the user to the ePay site.<\/p>\n<p><strong>Example Response<\/strong><br \/>\n&#8220;https:\/\/demo.epay.bg\/xdev\/mobile\/api\/start?APPID=7263798363938345851800386580252006607935300301942040476986705127&amp;DEVICEID=590&amp;KEY=12&amp;UTYPE=2&amp;lang=en&#8221;<\/p>\n<p><strong>400 Bad Request<\/strong><\/p>\n<p>Error details if the individual ID is invalid.<\/p>\n<p>Example Error Response<br \/>\n<div class=\"dm-code-snippet dark default  dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"wrap language-php\"><\/p>\n<pre class=\"dm-pre-admin-side\">{\r\n\t\"errors\": {\r\n\t\t\"Error\": [\r\n\t\t\t\"Individual Id must be valid.\"\r\n\t\t]\r\n\t},\r\n\t\"type\": \"https:\/\/tools.ietf.org\/html\/rfc7231#section-6.5.1\",\r\n\t\"title\": \"Bad Request\",\r\n\t\"status\": 400,\r\n\t\"traceId\": \"00-f3220977b746de7ffdb69ccf10832ce9-a79a1e023f1eb319-01\"\r\n}<\/pre>\n<p><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div><\/p>\n<h5><span style=\"font-size: 16px\">Notes<\/span><\/h5>\n<ul>\n<li>The URL provided by the endpoint should be followed.<\/li>\n<li>The only card that can be used for testing purposes is VISA 4341792000000044 with authorization code 111111.<\/li>\n<\/ul>\n<h5><span style=\"font-size: 16px\">Snippet<\/span><\/h5>\n<p>[codesnippet id=&#8221;50&#8243;]<\/p>\n<h4>2. Confirm Card Saving<\/h4>\n<p>Endpoint<\/p>\n<p><strong>URL:<\/strong> https:\/\/crm-api-test.10npay.com\/api\/v1\/epay\/save-card-confirm<\/p>\n<p><strong>Method:<\/strong> POST<\/p>\n<h5>Requests<\/h5>\n<p>Request Body<br \/>\n<div class=\"dm-code-snippet dark default  dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"no-wrap language-php\"><\/p>\n<pre class=\"dm-pre-admin-side\">{\r\n\t\"userId\": 590,\r\n\t\"requestId\": 1\r\n}<\/pre>\n<p><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div><\/p>\n<div class=\"dm-code-snippet dark default  dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"wrap language-php\"><\/p>\n<pre class=\"dm-pre-admin-side\">curl -X 'POST' \\ 'https:\/\/crm-api-test.10npay.com\/api\/v1\/epay\/save-card-confirm' \\ -H 'accept: *\/*' \\ -H 'Authorization: Bearer your_token_here' \\ -H 'Content-Type: application\/json-patch+json' \\ -d '{ \"userId\": 590, \"requestId\": 1 }'<\/pre>\n<p><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div>\n<h5>Responses<\/h5>\n<p><strong>200 Success<\/strong><\/p>\n<p>Empty response indicating success.<\/p>\n<p><strong>400 Bad Request<\/strong><\/p>\n<p>Error details if the request is invalid.<\/p>\n<p>Example Error Response<br \/>\n<div class=\"dm-code-snippet dark default  dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"no-wrap language-php\"><\/p>\n<pre class=\"dm-pre-admin-side\">{\r\n\t\"errors\": {\r\n\t\t\"Error\": [\r\n\t\t\t\"Invalid request.\"\r\n\t\t]\r\n\t},\r\n\t\"type\": \"https:\/\/tools.ietf.org\/html\/rfc7231#section-6.5.1\",\r\n\t\"title\": \"Bad Request\",\r\n\t\"status\": 400,\r\n\t\"traceId\": \"00-4b03d5f0f5fe80f1c1eac304d84cd582-d75aa7dcec7b672d-01\"\r\n}<\/pre>\n<p><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div><\/p>\n<h5>3. Usage of Saved Card<\/h5>\n<p>Once the card details are saved successfully, the user can use the saved card payment method for future transactions within the wallet application. The following steps outline the manual execution process:<\/p>\n<p>Redirect to ePay Site:<br \/>\nCall the save-card-initiate endpoint to get the ePay URL.<br \/>\nRedirect the user to the provided ePay URL.<br \/>\nThe user enters the required card payment method data on the ePay site.<\/p>\n<p>Save Card Payment Method:<br \/>\nAfter the user saves the card payment method successfully, they will be redirected back to the wallet app.<br \/>\nCall the save-card-confirm endpoint to save the token (card info) to Flexcube using the provided userId and requestId.<\/p>\n<p>Make Payments with Saved Card:<br \/>\nUse the saved card payment method for transactions by calling the pay-with-token endpoint in the wallet app.<\/p>\n<p>Important Notes<br \/>\nThe only available card that can be used is 4341792000000044.<br \/>\nThe card expiration date should be in the future.<br \/>\nThe cardholder name and CVV can be any valid values.<\/p>\n<p>By following these steps, users can securely save their card details and use them for seamless transactions within the 10NPay wallet application.<\/p>\n<h5><span style=\"font-size: 16px\">Save card snippet<\/span><\/h5>\n","protected":false},"excerpt":{"rendered":"<p>1. Initiate Card Saving Endpoint URL: https:\/\/crm-api-test.10npay.com\/api\/v1\/epay\/save-card-initiate\/{individualId} Method: GET URL Parameters individualId (integer): The ID of the individual from the CRM database mapped with the user_id from the app. Request Curl Example Responses 200 Success A URL string that redirects the user to the ePay site. Example Response &#8220;https:\/\/demo.epay.bg\/xdev\/mobile\/api\/start?APPID=7263798363938345851800386580252006607935300301942040476986705127&amp;DEVICEID=590&amp;KEY=12&amp;UTYPE=2&amp;lang=en&#8221; 400 Bad Request Error details if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[51],"doc_tag":[],"knowledge_base":[33],"class_list":["post-329","docs","type-docs","status-publish","hentry","doc_category-application-payment-methods","knowledge_base-10npay"],"year_month":"2026-05","word_count":600,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"10npaydev","author_nicename":"10npaydev","author_url":"https:\/\/developers.10npay.com\/bg\/author\/10npaydev\/"},"doc_category_info":[{"term_name":"Application Payment Methods","term_url":"https:\/\/developers.10npay.com\/bg\/docs\/10npay\/application-payment-methods\/"}],"doc_tag_info":[],"knowledge_base_info":[{"term_name":"10npay","term_url":"https:\/\/developers.10npay.com\/bg\/docs\/10npay\/","term_slug":"10npay"}],"knowledge_base_slug":["10npay"],"_links":{"self":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/docs\/329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":0,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/docs\/329\/revisions"}],"wp:attachment":[{"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/doc_category?post=329"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/doc_tag?post=329"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/developers.10npay.com\/bg\/wp-json\/wp\/v2\/knowledge_base?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}