Documentation

Payment submission

Last updated Nov 2, 2020

This article describes how to send a payment submission using the access token you generated earlier.


Introduction

There are two important things you must have done before continuing any further:

  1. Set up your client certificate correctly.
  2. Be in possession of an access token as a result of the hybrid flow. This access token represents user consent for this payment.

If you have not completed both of these steps, you should refer back to earlier articles to complete them:

Calling the payment API

You can find the payment submission definition in the Open Banking standard.

Note

You can save time and directly send the payment submission immediately after exchanging the authorization code. See the code sample in the ForgeRock sample project.

Here is an example request:

$ curl -X POST \ 'https://rs.aspsp.dev-ob.forgerock.financial:443/open-banking/v1.1/payment-submissions' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ6aXAiOiJOT05FIiwia2lkIjoiRm9sN0lwZEtlTFptekt0Q0VnaTFMRGhTSXpNPSIsImFsZyI6IkVTMjU2In0.eyJzdWIiOiJkZW1vIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiODg1NjgyYTEtMDFiNS00NjgxLWE2ODAtZGVlYjNkMjFjOWQwIiwiaXNzIjoiaHR0cHM6Ly9hcy5hc3BzcC5kZXYtb2IuZm9yZ2Vyb2NrLmZpbmFuY2lhbDo4NDQzL29hdXRoMi9vcGVuYmFua2luZyIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6ImE2ODcxZTQ2LWU3MGMtNDA5MS1iM2JjLWIxOGQ3OTY4NTY4ZCIsIm5vbmNlIjoiNWE2YjIwYTAzMmE5ZmI1MzIxYTcwNmYzIiwiYXVkIjoiOGY1YmI2ZmEtOTZiMC00NmEzLWFjOWUtMzZjNjExMDM2MzI2IiwibmJmIjoxNTE2OTcwMTg5LCJncmFudF90eXBlIjoiYXV0aG9yaXphdGlvbl9jb2RlIiwic2NvcGUiOlsib3BlbmlkIiwicGF5bWVudHMiLCJhY2NvdW50cyJdLCJhdXRoX3RpbWUiOjE1MTY5Njg2NzAwMDAsImNsYWltcyI6IntcImlkX3Rva2VuXCI6e1wiYWNyXCI6e1widmFsdWVcIjpcInVybjpvcGVuYmFua2luZzpwc2QyOnNjYVwiLFwiZXNzZW50aWFsXCI6dHJ1ZX0sXCJvcGVuYmFua2luZ19pbnRlbnRfaWRcIjp7XCJ2YWx1ZVwiOlwiUDU2Zjg5YWVjLTY1NjgtNDM3MC04ZDZiLTFmY2Y3MDBlYTY4NVwiLFwiZXNzZW50aWFsXCI6dHJ1ZX19LFwidXNlcmluZm9cIjp7XCJvcGVuYmFua2luZ19pbnRlbnRfaWRcIjp7XCJ2YWx1ZVwiOlwiUDU2Zjg5YWVjLTY1NjgtNDM3MC04ZDZiLTFmY2Y3MDBlYTY4NVwiLFwiZXNzZW50aWFsXCI6dHJ1ZX19fSIsInJlYWxtIjoiL29wZW5iYW5raW5nIiwiZXhwIjoxNTE2OTczNzg5LCJpYXQiOjE1MTY5NzAxODksImV4cGlyZXNfaW4iOjM2MDAsImp0aSI6ImFhZTJhYzA1LWE5MjEtNDE2My04NTE2LTA5MzhiZDdlOTNkMSJ9.gFZa_oJf3tlbwyaDq4GceQ8_79Uq07P-uQOCIDNqZ-ExMsbCYp3yhz1sw3V9_oYoFV6iPUjdTFtga9OhUDFgyQ' \ -H 'Content-Type: application/json' \ -H 'x-fapi-customer-ip-address: 104.25.212.99' \ -H 'x-fapi-customer-last-logged-time: Sun, 10 Sep 2017 19:43:31 UTC' \ -H 'x-fapi-financial-id: 0015800001041REAAY' \ -H 'x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d' \ -H 'x-idempotency-key: FRESCO.21302.GFX.20' \ -d '{ "Data": { "PaymentId": "P56f89aec-6568-4370-8d6b-1fcf700ea685", "Initiation": { "InstructionIdentification": "ACME412", "EndToEndIdentification": "FRESCO.21302.GFX.20", "InstructedAmount": { "Amount": "165.88", "Currency": "GBP" }, "CreditorAccount": { "SchemeName": "SortCodeAccountNumber", "Identification": "08080021325698", "Name": "ACME Inc", "SecondaryIdentification": "0002" }, "RemittanceInformation": { "Reference": "FRESCO-101", "Unstructured": "Internal ops code 5120101" } } }, "Risk": { "PaymentContextCode": "EcommerceGoods", "MerchantCategoryCode": "5967", "MerchantCustomerIdentification": "053598653254", "DeliveryAddress": { "AddressLine": [ "Flat 7", "Acacia Lodge" ], "StreetName": "Acacia Avenue", "BuildingNumber": "27", "PostCode": "GU31 2ZZ", "TownName": "Sparsholt", "CountySubDivision": [ "Wessex" ], "Country": "UK" } } }'

Here is the response we received from the code sample:

{ "Data": { "PaymentSubmissionId": "35757b4b-00ef-4eca-94c1-da8a25a8e550", "PaymentId": "P56f89aec-6568-4370-8d6b-1fcf700ea685", "Status": "AcceptedSettlementInProcess", "CreationDateTime": "2018-01-26T12:36:30+00:00" } }

Conclusion

You should now have sent a payment submission.


Copyright and Trademarks Copyright © 2020 ForgeRock, all rights reserved.