Submit and process electronic payments
Less than to read
Through Payments Out Service, you can submit and process electronic payments. To do this, you need to implement one of these workflows:
fileformatId
subscriptionId
The workflow you choose depends on the parameters your application populates in the batches of payments.
For more information about these parameters, go to the Consumer API reference.
Batch has fileformatId populated
In this workflow, your application must create a batch of payments with the fileformatId
parameter populated.
When the Consumer API receives the batch, it sends a webhook to the payment provider. The provider ID is contained in the batch, and notifies them that there’s a new batch of payments. To receive and process the webhook, the provider needs to implement a Webhook Notifications API.
The payment provider can then retrieve and process the batch. After each processing stage, they will update the batch status.
sequenceDiagram
participant Consumer as Consumer
participant C-API as Consumer API
participant P-API as Provider API
participant Provider as Provider
box Sage Network Payments Out Service
participant C-API
participant P-API
end
Consumer ->> C-API: POST Batch of payments
Note left of Consumer: Batch contains {fileFormatId} parameter
C-API ->> Consumer: 201
C-API ->> Provider: POST Batch of payments
Provider ->> P-API: 201
P-API ->> Consumer: 201
Note right of Provider: Payment provider needs to implement <br/> the Webhook notifications API
Provider ->> P-API: GET Batch of payments
P-API ->> Provider: 200
loop Process payments in batch
Provider ->> P-API: PATCH Payment/batch status <br/> Processing
P-API ->> Provider: 204
P-API ->> Consumer: Webhook Payment/batch status <br/> Processing
Note left of Consumer: Consuming application needs to implement <br/> the Webhook notifications API
Consumer ->> C-API: GET Batch of payments
C-API ->> Consumer: 200
Provider ->> Provider: Make payment
Provider ->> P-API: PATCH Payment/batch status <br/> ProcessingComplete
P-API ->> Provider: 204
P-API ->> Consumer: Webhook Payment/batch status <br/> ProcessingComplete
Consumer ->> C-API: GET Batch of payments
C-API ->> Consumer: 200
end
Batch has subscriptionId populated
To implement this workflow, you must have a subscription to a payment provider. For more information on how to create a subscription, go to the Consumer API reference.
In this workflow, your application must create a batch of payments with the subscriptionId
parameter populated.
When the Consumer API receives the batch, it sends a webhook to the payment provider. The provider is notified that a new batch has been received. To receive and process the webhook, the payment provider needs to implement a Webhook Notifications API.
The payment provider then retrieves and processes the batch. After each processing stage the payment provider updates the batch status.
When the Provider API receives the batch, it sends a webhook to the Sage application. To receive and process the webhook, the Sage application needs to implement a Webhook Notifications API.
sequenceDiagram
participant Consumer as Consumer
participant C-API as Consumer API
participant P-API as Provider API
participant Provider as Provider
box Sage Network Payments Out Service
participant C-API
participant P-API
end
Consumer ->> C-API: POST Batch of payments
Note left of Consumer: Batch contains {subscriptionId} parameter
C-API ->> Consumer: 201
C-API ->> Provider: POST Batch of payments
Provider ->> P-API: 201
P-API ->> Consumer: 201
Note right of Provider: Payment provider needs to implement <br/> the Webhook notifications API
Provider ->> P-API: GET Batch of payments
P-API ->> Provider: 200
loop Process payments in batch
Provider ->> P-API: PATCH Payment/batch status <br/> Processing
P-API ->> Provider: 204
P-API ->> Consumer: Webhook Payment/batch status <br/> Processing
Note left of Consumer: Consuming application needs to implement <br/> the Webhook notifications API
Consumer ->> C-API: GET Batch of payments
C-API ->> Consumer: 200
Provider ->> Provider: Make payment
Provider ->> P-API: PATCH Payment/batch status <br/> ProcessingComplete
P-API ->> Provider: 204
P-API ->> Consumer: Webhook Payment/batch status <br/> ProcessingComplete
Consumer ->> C-API: GET Batch of payments
C-API ->> Consumer: 200
end