{"id":43320421,"url":"https://github.com/xendit/xendit-sdk-ios","last_synced_at":"2026-02-01T22:33:15.823Z","repository":{"id":19301271,"uuid":"86437193","full_name":"xendit/xendit-sdk-ios","owner":"xendit","description":"Xendit SDK for iOS - Card token, 3DS authentication","archived":false,"fork":false,"pushed_at":"2023-12-11T03:24:55.000Z","size":46010,"stargazers_count":5,"open_issues_count":12,"forks_count":3,"subscribers_count":40,"default_branch":"master","last_synced_at":"2024-03-19T13:56:17.171Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/xendit/xendit-sdk-ios/releases","language":"Objective-C","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/xendit.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}},"created_at":"2017-03-28T08:53:12.000Z","updated_at":"2022-03-02T02:48:36.000Z","dependencies_parsed_at":"2022-07-27T00:16:06.156Z","dependency_job_id":null,"html_url":"https://github.com/xendit/xendit-sdk-ios","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/xendit/xendit-sdk-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-sdk-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-sdk-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-sdk-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-sdk-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xendit","download_url":"https://codeload.github.com/xendit/xendit-sdk-ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-sdk-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-01T22:33:15.263Z","updated_at":"2026-02-01T22:33:15.816Z","avatar_url":"https://github.com/xendit.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xendit-sdk-ios\nThe Xendit iOS SDK makes it easy to collect sensitive credit card information without that data ever having to touch your server.\n\n## Ownership\n\nTeam: [Credit Cards Team](https://www.draw.io/?state=%7B%22ids%22:%5B%221Vk1zqYgX2YqjJYieQ6qDPh0PhB2yAd0j%22%5D,%22action%22:%22open%22,%22userId%22:%22104938211257040552218%22%7D)\n\nSlack Channel: [#cards-dev](https://xendit.slack.com/messages/cards-dev)\n\nSlack Mentions: `@troops-cards`\n\n## Note\nOnly for real device\n\n## Requirements\nOur SDK is compatible with iOS apps supporting iOS 9.0 and above\n\n## Installation\nThere are two options to install Xendit iOS SDK:\n1. Cocoapods https://cocoapods.org/pods/Xendit\n2. Visit our releases page https://github.com/xendit/xendit-sdk-ios/releases and download the static framework Xendit.framework.zip\n\nIf you'd prefer another form of installation, please create a request in our issues page.\n\n## Examples\nVisit and try the XenditExample app to view how the SDK is used. Additionally, below are examples of how to create tokens and authentications.\n\n### Setting your public key\nSwift:\n```\nXendit.publishableKey = \"xnd_public_development_O4iFfuQhgLOsl8M9eeEYGzeWYNH3otV5w3Dh/BFj/mHW+72nCQR/\"\n```\n\nObjective-C:\n```\nXendit.publishableKey = @\"xnd_public_development_O4iFfuQhgLOsl8M9eeEYGzeWYNH3otV5w3Dh/BFj/mHW+72nCQR/\";\n```\n\n### Creating a token\n\nSwift:\n```\nlet cardData = CardData()\ncardData.cardNumber = \"4000000000000002\"\ncardData.cardExpMonth = \"12\"\ncardData.cardExpYear = \"2017\"\ncardData.cardCvn = \"123\"\ncardData.isMultipleUse = true\n\nXendit.createToken(fromViewController: self, cardData: cardData, shouldAuthenticate: true, onBehalfOf: \"user-id\") { (token, error) in\n    if (error != nil) {\n        // Handle error. Error is of type XenditError\n        return\n    }\n\n    // Handle successful tokenization. Token is of type XenditCCToken\n}\n```\n\nObjective-C:\n```\nXENCardData *cardData = [[XENCardData alloc] init];\ncardData.cardNumber = @\"4000000000000002\";\ncardData.cardExpMonth = @\"12\";\ncardData.cardExpYear = @\"2017\";\ncardData.cardCvn = @\"123\";\n\n[Xendit createTokenFromViewController:self cardData:cardData shouldAuthenticate:true onBehalfOf:\"user-id\" completion:^(XENCCToken * _Nullable token, XENError * _Nullable error) {\n    if (error != nil) {\n        // Handle error\n        return\n    }\n\n    // Handle successful tokenization\n}];\n```\n`createToken` accept 4 parameters: fromViewController, `cardData` object, optional `shouldAuthenticate` (boolean) and optional `onBehalfOf` (string). `shouldAuthenticate` will be set to true and `onBehalfOf` will be set to empty if you omit these parameters.\n\n### Creating a 3DS authentication\n\nSwift:\n```\nlet tokenID = \"sample-token-id\"\nlet amount = 75000\n\nXendit.createAuthentication(fromViewController: self, tokenId: tokenID!, amount: amount, onBehalfOf: \"user-id\") { (authentication, error) in\n    DispatchQueue.main.async {\n        self.activityIndicator.stopAnimating()\n    }\n\n    if (error != nil) {\n        // Handle error. Error is of type XenditError\n        return\n    }\n\n    // Handle successful authentication\n}\n```\n\nObjective-C:\n```\nNSString *tokenID = @\"sample-token-id\";\nint amount = 75000;\n\n[Xendit createAuthenticationFromViewController:self tokenId:tokenID amount:amount onBehalfOf:\"\" completion:^(XENAuthentication * _Nullable authentication, XENError * _Nullable error) {\n    if (err != nil) {\n        // Handle error\n        return\n    }\n\n    // Handle successful authentication\n}];\n```\n`createAuthentication` accept 4 parameters: fromViewController, tokenId, amount and optional `onBehalfOf` (string). `onBehalfOf` will be set to empty if you omit it, but is required when you passed it during `createToken`.\n\n### Creating a charge\nWhen you're ready to charge a card, use the private key on your backend to call the charge endpoint. See our API reference at https://xendit.github.io/apireference/#create-charge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fxendit-sdk-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxendit%2Fxendit-sdk-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fxendit-sdk-ios/lists"}