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

use_cursorboolean
A flag to indicate if cursor based pagination should be used
nextstring
An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data
previousstring
An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data

Response

200Request successful
statusboolean
messagestring
dataobject
GET/apple-pay/domain
curl 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.data
Response
{
  "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

domainNamerequiredstring
The domain or subdomain for your application

Response

200Responses from the Transaction Initialize endpoint
statusboolean
An indicator
messagestring
A short description of the response
POST/apple-pay/domain
curl https://api.paystack.co/apple-pay/domain \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domainName": "example.com"
  }' \
  -X POST
import { 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.data
Response
{
  "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

domainNamerequiredstring
The domain or subdomain for your application

Response

200Request successful
statusboolean
messagestring
dataobject
DELETE/apple-pay/domain
curl https://api.paystack.co/apple-pay/domain \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domainName": "example.com"
  }' \
  -X DELETE
import { 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.data
Response
{
  "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
}