Endpoints for Services Supported with Apple Pay {#applepay-ref-2-endpoints-applepay-services}
=============================================================================================

This topic lists the `REST` API endpoints that you use to request the services supported with Apple Pay.

Authorizing a Payment
---------------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/payments`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments`

Processing a Sale
-----------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/payments`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments`  
Make sure to set the processingInformation.capture field to `true`.

Reversing an Authorization
--------------------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/reversals`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/reversals`  
Replace the `{id}` portion of the URL with the transaction ID of the payment that you want to reverse. The transaction ID is returned in the [id](https://developer.smartpayfuse.barclaycard/docs/barclays/en-us/api-fields/reference/all/rest/api-fields/id.md "") field of the response to the authorization request. Example value: 7359642011156554503954

Capturing a Payment
-------------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/captures`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/captures`  
Replace the `{id}` portion of the URL with the transaction ID of the payment that you want to capture. The transaction ID is returned in the [id](https://developer.smartpayfuse.barclaycard/docs/barclays/en-us/api-fields/reference/all/rest/api-fields/id.md "") field of the response to the authorization request. Example value: 7359642011156554503954

Processing a Refund
-------------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/refunds`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/payments/{id}/refunds`  
Replace the `{id}` portion of the URL with the transaction ID of the capture request for the payment you are refunding. The transaction ID is returned in the [id](https://developer.smartpayfuse.barclaycard/docs/barclays/en-us/api-fields/reference/all/rest/api-fields/id.md "") field of the capture request. Example value: 7359642011156554503954

Voiding a Capture
-----------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/v2/captures/{id}/voids`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/v2/captures/{id}/voids`  
Replace the `{id}` portion of the URL with the transaction ID of the capture that you want to void. The transaction ID is returned in the [id](https://developer.smartpayfuse.barclaycard/docs/barclays/en-us/api-fields/reference/all/rest/api-fields/id.md "") field of the response to the capture request. Example value: 7359642011156554503954

Voiding a Credit
----------------

Production: `POST ``https://api.merchant-services.bankofamerica.com``/pts/v2/credits/{id}/voids`  
Test: `POST ``https://apitest.merchant-services.bankofamerica.com``/pts/v2/credits/{id}/voids`  
Replace the `{id}` portion of the URL with the transaction ID of the credit you want to void. The transaction ID is returned in the [id](https://developer.smartpayfuse.barclaycard/docs/barclays/en-us/api-fields/reference/all/rest/api-fields/id.md "") field of the response to the credit request. Example value: 7359642011156554503954
