{"id":15192155,"url":"https://github.com/edbeer/paymentapi","last_synced_at":"2026-03-04T03:01:45.042Z","repository":{"id":65014277,"uuid":"568839671","full_name":"Edbeer/paymentapi","owner":"Edbeer","description":"golang payment","archived":false,"fork":false,"pushed_at":"2023-02-14T09:37:14.000Z","size":300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T02:36:00.574Z","etag":null,"topics":["docker","docker-compose","golang","payment","postgres","redis"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Edbeer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-21T14:18:49.000Z","updated_at":"2023-02-05T12:11:04.000Z","dependencies_parsed_at":"2023-02-18T23:31:02.796Z","dependency_job_id":null,"html_url":"https://github.com/Edbeer/paymentapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Edbeer/paymentapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edbeer%2Fpaymentapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edbeer%2Fpaymentapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edbeer%2Fpaymentapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edbeer%2Fpaymentapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Edbeer","download_url":"https://codeload.github.com/Edbeer/paymentapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edbeer%2Fpaymentapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","golang","payment","postgres","redis"],"created_at":"2024-09-27T21:05:31.695Z","updated_at":"2026-03-04T03:01:45.019Z","avatar_url":"https://github.com/Edbeer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![schema.jpg](img/schema.jpg)\n\n### The above figure is a state transition in the payment process.\n\n* Create payment: Acceptance of payment\n* Capture payment: Successful payment\n* Refund payment: Refunded payment, if there is a refund\n* Cancel payment: Cancel create payment\n* Failed: Failed Payment\n\n## Create payment\nCreate payment ENDPOINT:\n```\nPOST HTTP://localhost:8080/payment/auth\n```\n\nHTTP Header:\n```\nFrom: dadece5d-a1b9-4335-97b8-4180aa4ef4dd // merchant id\n```\n\nPayment request:\n```\n{\n  \"id\": \"43369ead-1205-4259-80ed-c0fa29450aba\", // buyer's id account\n  \"order_id\": \"1\",\n  \"amount\": 55,\n  \"currency\": \"RUB\",\n  \"card_number\": 444444444444444,\n  \"card_expiry_month\": 12,\n  \"card_expiry_year\": 24,\n  \"card_security_code\": 924\n}\n```\n\nResponce:\n```\n{\n  \"id\": \"43369ead-1205-4259-80ed-c0fa29450aba\", // payment id\n  \"status\": \"Approved\"\n}\n```\n\n## Capture payment\nCreate payment ENDPOINT:\n```\nPOST HTTP://localhost:8080/payment/capture/{id} // auth payment id\n```\n\nHTTP Header:\n```\nFrom: dadece5d-a1b9-4335-97b8-4180aa4ef4dd // merchant id\n```\n\nPaid request:\n```\n{\n  \"order_id\": \"1\",\n  \"payment_id\": \"0b4e4d2b-bee1-4221-bc68-089d546a795d\", // auth payment id\n  \"amount\": 55\n}\n```\n\nResponce:\n```\n{\n  \"id\": \"e4b63fc5-c156-48c0-9080-7f6bd66b6667\", // capture paiment id\n  \"status\": \"Successful payment\"\n}\n```\n\n## Refund payment\nCreate payment ENDPOINT:\n```\nPOST HTTP://localhost:8080/payment/refund/{id} // capture payment id\n```\n\nHTTP Header:\n```\nFrom: dadece5d-a1b9-4335-97b8-4180aa4ef4dd // merchant id\n```\n\nPaid request:\n```\n{\n  \"order_id\": \"1\",\n  \"payment_id\": \"e4b63fc5-c156-48c0-9080-7f6bd66b6667\", // capture payment id\n  \"amount\": 55\n}\n```\n\nResponce:\n```\n{\n  \"id\": \"067c1909-60cb-4fa4-b52f-6127ddbff4c3\",\n  \"status\": \"Successful refund\"\n}\n```\n\n## Cancel payment\nCreate payment ENDPOINT:\n```\nPOST HTTP://localhost:8080/payment/cancel/{id} // auth payment id\n```\n\nHTTP Header:\n```\nFrom: dadece5d-a1b9-4335-97b8-4180aa4ef4dd // merchant id\n```\n\nPaid request:\n```\n{\n  \"order_id\": \"1\",\n  \"payment_id\": \"0b4e4d2b-bee1-4221-bc68-089d546a795d\", // auth payment id\n  \"amount\": 55\n}\n```\n\nResponce:\n```\n{\n  \"id\": \"af75b5fb-1af6-4517-8057-f140fbcac913\", // cancel id\n  \"status\": \"Successful cancel\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedbeer%2Fpaymentapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedbeer%2Fpaymentapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedbeer%2Fpaymentapi/lists"}