Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abacatepay/abacatepay-swift-sdk
under development
https://github.com/abacatepay/abacatepay-swift-sdk
apple ios ipados macos swift swiftui uikit vapor xcode
Last synced: 27 days ago
JSON representation
under development
- Host: GitHub
- URL: https://github.com/abacatepay/abacatepay-swift-sdk
- Owner: AbacatePay
- Created: 2024-12-02T20:26:44.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-02T22:47:17.000Z (about 1 month ago)
- Last Synced: 2024-12-09T13:56:32.836Z (about 1 month ago)
- Topics: apple, ios, ipados, macos, swift, swiftui, uikit, vapor, xcode
- Language: Swift
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# abacatepay-swift-sdk
AbacatePay Swift SDK for you to start receiving payments in seconds.## Example
```swift
import Foundation
import AbacatePaylet abacatePay = AbacatePay(apiKey: "{{ key }}")
let billingData = CreateBillingData(
frequency: .oneTime,
methods: [.pix],
products: [
.init(
externalId: "PLANO-PRO",
name: "PRO Plan",
quantity: 1,
price: 1000
)
],
returnUrl: "https://mysite.com/app",
completionUrl: "https://mysite.com/payment/success",
automaticTaxReceipt: true
)do {
let billing = try await abacatePay.billing.create(data: billingData)
print(billing)
/*
{
id: "bill_12345667",
url: "https://abacatepay.com/pay/bill_12345667",
amount: 1000,
status: "PENDING",
devMode: true,
methods: ["PIX"],
frequency: "ONE_TIME",
nextBilling: nil,
createdAt: "2024-11-04T18:38:28.573",
updatedAt: "2024-11-04T18:38:28.573",
}
*/
} catch {
print("Error creating billing:", error)
}
```