Apple Pay
A collection of endpoints for managing application's top-level domain or subdomain accepting payment via Apple Pay
Copy link List Domains
Lists all registered domains on your integration. Returns an empty array if no domains have been added.
Query Parameters
A flag to indicate if cursor based pagination should be used
An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data
An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data
Response
200Request successful
GET
/apple-pay/domaincurl https://api.paystack.co/apple-pay/domain \
-H "Authorization: Bearer YOUR_SECRET_KEY"import { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.applePay.listDomain({
use_cursor: true,
next: "NEXT"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.apple_pay.list_domain({
use_cursor: true,
next: "NEXT"
})
puts response.dataResponse
{
"status": true,
"message": "Apple Pay registered domains retrieved",
"data": {
"domainNames": [
"example.com"
]
}
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Register Domain
Register a top-level domain or subdomain for your Apple Pay integration.
> This endpoint can only be called with one domain or subdomain at a time.
Request Body
The domain or subdomain for your application
Response
200Responses from the Transaction Initialize endpoint
An indicator
A short description of the response
POST
/apple-pay/domaincurl https://api.paystack.co/apple-pay/domain \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"domainName": "example.com"
}' \
-X POSTimport { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.applePay.registerDomain({
domainName: "example.com"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.apple_pay.register_domain({
domain_name: "example.com"
})
puts response.dataResponse
{
"status": true,
"message": "Domain successfully registered on Apple Pay"
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}Copy link Unregister Domain
Unregister a top-level domain or subdomain previously used for your Apple Pay integration.
Request Body
The domain or subdomain for your application
Response
200Request successful
DELETE
/apple-pay/domaincurl https://api.paystack.co/apple-pay/domain \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"domainName": "example.com"
}' \
-X DELETEimport { Paystack } from "@paystack/paystack-sdk";
const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });
const response = await paystack.applePay.unregisterDomain({
domainName: "example.com"
});
console.log(response.data);require "paystack"
paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))
response = paystack.apple_pay.unregister_domain({
domain_name: "example.com"
})
puts response.dataResponse
{
"status": true,
"message": "Domain successfully unregistered on Apple Pay"
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}{
"status": false,
"message": "An error occurred",
"meta": {
"nextStep": "string"
},
"type": "string",
"code": "validation_error",
"errorCodeMappingNotFound": true
}